permaculture playing cards
The moose likes EJB and other Java EE Technologies and the fly likes EntityContext object 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 "EntityContext object" Watch "EntityContext object" New topic

EntityContext object

Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 202
hello guys im a newbie in EJB...i just want to ask what is the use of the EntityContext object inside an EntityBean class?

Be Afraid...Be very Afraid...
Ashoke Bhowmick

Joined: Sep 10, 2002
Posts: 13
The EntityContext object provides the access to the runtime-context of the container that created the bean instance.
You can invoke methods on the EntityContext object to get the EJBObject associated with the bean , the PK object associated with it and various other info. Please refer to the EJB API for more details.
Rasmeet Devji

Joined: Dec 08, 2000
Posts: 17
Hi Paulo,
Just to add a little more to what is already been said, EJBContext is one of the 3 ways you could make callbacks to your EJB Container.
The others are your methods of the Session and Entity beans like ejbActivate(), ejbPassivate(), etc., and then we have the lookup() methods which look up the objects using the JNDI.
Dont you worry about EJB, you would fall in love with it
Good luck,
I agree. Here's the link:
subject: EntityContext object
It's not a secret anymore!