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