Is it safe to share cached remote homes between beans?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Prescott
Posted On:   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).




  1. 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?
  2. Is it harmful to share cached remote homes between beens?

Re: Is it safe to share cached remote homes between beans?

Posted By:   Bozidar_Dangubic  
Posted On:   Tuesday, January 22, 2002 09:52 AM


  1. it provides the current JNDI environment, i.e. the JNDI environment in which it was created. it is not based on which thread the request comes from.
  2. no, it is not harmful.
About | Sitemap | Contact