• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EntityContext object

 
Paulo Aquino
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello guys im a newbie in EJB...i just want to ask what is the use of the EntityContext object inside an EntityBean class?
 
Ashoke Bhowmick
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Rasmeet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic