openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: EntityManagerFactory instances
Date Mon, 14 Jan 2008 18:19:56 GMT

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:
Sent from the OpenJPA Users mailing list archive at

View raw message