aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB Handles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB Handles" Watch "EJB Handles" New topic
Author

EJB Handles

Chetan Sahasrabudhe
Ranch Hand

Joined: Aug 09, 2004
Posts: 75
Hello,

Can anyone provide me the matrix for persisting EJB Handles

EJBObject Handle = What kind of beans (Stateless, Stateful, Entity, MDB)
EJBHome Handles = what kind of beans (Stateless, Stateful, entity, MDB)


Thanks & Regards<br />Chetan
Binoj Viswanathan
Ranch Hand

Joined: Feb 25, 2003
Posts: 85
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 ....


binoj v


SCJP 1.4(98%)<br />SCBCD1.3 (100%)<br />SCWCD 1.4 (93%)(w/o prep..n)
Chetan Sahasrabudhe
Ranch Hand

Joined: Aug 09, 2004
Posts: 75
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.
Binoj Viswanathan
Ranch Hand

Joined: Feb 25, 2003
Posts: 85
its true.

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......


binoj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Handles