wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes context in ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "context in ejb" Watch "context in ejb" New topic
Author

context in ejb

sivasri
Greenhorn

Joined: Jan 23, 2006
Posts: 1
hi all,
What is meant by Context,and what is the role of the context class in EJB's.
Please do reply.
regards,
sivasankari
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hello,
Context is a gateway through which EJB Bean could communicate to Container & retrive some information like.......Security roles of client(s) & Transactional Information (UserTransaction Ref. which is required for PTM using JTA)...Refer Java API Docs to get some more details.

Shrinivas
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Context can mean different things in the EJB world. :roll: For instance, on deployment every EJB home gets bound into the JNDI tree automatically under the name defined in its deployment properties. A client can then do a JNDI lookup to obtain the home interface (may need to narrow the object returned, will need to cast it).

There is also EJB context, transaction context, security context. There may be more, but that's enough for now!


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

"Sivasri"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: context in ejb