Friday, March 13, 2009

Why do we have a remove method in both EJBHome and EJBObject (EJB)

Question :Why do we have a remove method in both EJBHome and EJBObject? (EJB)
Answer :With the EJBHome version of the remove, you are able to delete an entity
bean without first instantiating it (you can provide a PrimaryKey object as
a parameter to the remove method). The home version only works for
entity beans. On the other hand, the Remote interface version works on an
entity bean that you have already instantiated. In addition, the remote
version also works on session beans (stateless and statefull) to inform the
container of your loss of interest in this bean.

No comments: