> One solution is to create a new EntitymanagerFactory in each method 
Construction of EntityManagerFactory is a costly affair. Hence repeated
construction should be avoided at all costs. An EMF is a good candidate for
access via JNDI (akin to DataSource), if one is available. 
Some form of singleton pattern is recommended.

-- 
View this message in context: 
http://n2.nabble.com/Where-to-initialize-the-entitymanger-factory-tp1485683p1486001.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to