O'Reilly logo

Sams Teach Yourself EJB in 21 Days by Krishna Kothapalli, Ragae Ghaly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Entity Bean Methods

The entity bean class implements the javax.ejb.EntityBean interface. Therefore, you need to implement the setEntityContext, unsetEntityContext, ejbActivate, ejbPassivate, ejbLoad, ejbStore, and ejbRemove methods defined in the javax.ejb.EntityBean interface. The bean may implement ejbCreate<method>(...) methods (and corresponding ejbPostCreate<method>(...) methods) used to initialize the bean instance. In addition, the bean class can implement business methods, home methods and remove methods. We'll discuss each of them in detail in the following sections.

setEntityContext and unsetEntityContext Methods

The EJB container calls the setEntityContext method to set the associated entity context. The entity context provides access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required