- Posted by: Marc Boorshtein
- Posted on: September 10 2002 20:03 EDT
I am trying to determine the best way to handle EJB initialization from a page-to-page basis. Would it be better to maintain my own cache/pool of initilized EJBs or rely on the app server to do this for me. I am curiose about this for both performance and usability reasons.
IDRS - http://idrs.sourceforge.net/
It is the responsibility of the container to handle EJB initialization/destruction, so you shouldn't (and you can't) try to intervene.
If you were referring to caching Home interfaces, then yes, you should definitely do that - unless the performance cost of making a JNDI lookup for the Home interface is acceptable in your application.
When caching home objects, ahould a pool of homes be cached or shouldn't I worry about a single home instance being a bottleneck?