Hi, EJBObject Handle = Stateful For stateless there is each time a method is invoked its a new request even if its from same client.So vats the use of EJBObject handle...? For entity bean U hav better option with findByPrimaryKey.. MDBs .. no need to say
EJBHome Handles = Stateless, Stateful, entity Home handles can b used for all except MDBs avoiding lookup ....
EJBObject Handle = Stateful For stateless there is each time a method is invoked its a new request even if its from same client.So vats the use of EJBObject handle...? For entity bean U hav better option with findByPrimaryKey.. MDBs .. no need to say
findByPrimaryKey is still a home method, and hence I will need to perform my JNDI Lookup for the same.
If i archive my EJBObject for entity bean, will it help me skip JNDI calls and later findByPrimaryKey call.
So for entity beans the beter option is a archiv home handle and use findByPrimaryKey.(keep in mind that the bean wont cum out of pool ven its executing ejbFindByPrimaryKey)...U cn also use ejbObj handle. but in production env u may have other clients to ur "entity in DB" other than ur EntityBean.. so it cn throw NotSuchEntityException ven container calls ejbLoad or ejbStore for EntityBean instance......