• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

EJB Handles  RSS feed

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Chetan Sahasrabudhe
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!