One EMF instance is preferred. The pros are
i) only a single configuration is required
ii) Each EMF uses a L2 cache (different than L1 cache of instances held in
each EntityManager/persistence context) for performance reasons. Using
single EMF will hit the same L2 cache.

There may be some packaging disciplines to make the same EMF
visible/available to both the containers within an Application Server.

If there exists a single-entry-point -- it may make sense to create EMF
there and bind it to JNDI for everyone to see. 

AFAIK, OpenJPA does not bind EMF to JNDI automatically (please cross-check,
this statement may not be accurate). 
   



-- 
View this message in context: 
http://www.nabble.com/EntityManagerFactory-instances-tp14789932p14807958.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to