• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Handles

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic