Can I cache the context and ejb home references in the Service Locator?
I am trying to increase the performance of a system that makes calls to about 7 enterprise java beans. I have created a service locator object to help streamline this by putting all the jndi information here. This service locator is a singleton object. I was wondering if I could keep a local reference to the context inside this service locator so I don't have to get another reference without hurting anything. I would also like to cache and keep a reference to the EJB Home objects of all the beans on our system, and just pull the home out of the cache and call create on it rather than looking it up every time.. Can I do this or are there problems associated with this design? I'm not really sure what holding onto a home or context will do... Will this be more problematic for stateful/stateless session beans or entity beans?
Thanks
Nic

