File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "context in ejb" Watch "context in ejb" New topic

context in ejb


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.
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
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.

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

Joined: Feb 05, 2001
Posts: 17276

Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it


Thanks! and welcome to the JavaRanch!


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: context in ejb
It's not a secret anymore!