Sunday, January 20, 2002 11:03 AM
After profiling our EJB-based application, we found that a lot of time was being spent in JNDI lookups for remote homes. We addressed this by caching the remote homes in a utility class.
Now, however, I've realized that the JNDI environment is unique to each bean (data sources used for BMP, for example, must be made available on a bean-by-bean basis in deployment descriptor).
How does the EJB container determine which JNDI environment to provide to a given bean? Is it based on which thread the request comes from?
Is it harmful to share cached remote homes between beens?