First page Back Continue Last page Graphics
Continuation of Notes
Notes:
For example, getEJBHome( ) is useful if the bean wants to call any of the methods of its own home object.
SessionContext and EntityContext both extend EJBContext. They both provide a getEJBObject( ) method to let the bean get a reference to the skeleton representing it. (More on this shortly…) This method throws an exception if the bean is not in a valid state.
EntityContext also has a method to get the primary key for this bean instance: getPrimaryKey( ). It is useful for bean-managed persistence.