• 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: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

So many times, I have read about EJB Handles which the container creates for reviving the bean instances.

Still, I don't get a clear picture on what are these handles and why are they created by container?

We know that session beans don't survive the server crashes. If we have this point, then this handle concept is controversary. Meaning, if the session beans disappear, then using the handles the bean instances can be revived. Totally confused.

Can anyone help me to u/stand this better?

Thanks,
Guru
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guru,

You might like searching this forum for EJB Handels and find some good postings.
Without pretending that I would give you a satisfactory answer, I�d like to mention that in my opinion the benefit of using the EJB handles are because of two reasons:
  • They could be saved on the disk and used at a later time.
  • They might improve your performances since the clients won�t need to make subsequent JNDI calls.


  • However, from my own experience I could tell you that the technique might not be very popular in the real world. It also could lead you to subtle bugs, since the handle could be passed to different client threads. If the handle refers a SFSB you might be in trouble though: two different clients threads would share the same SFSB. I believe this will force the container to throw an error.
    Regards.
     
    Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic