jsr338-experts@jpa-spec.java.net

[jsr338-experts] clarification needed regarding EntityManager pooling in J2EE environment

From: Christian Romberg <cromberg_at_versant.com>
Date: Thu, 10 May 2012 15:58:34 +0200

Dear group,

The spec (2.0) says, p.304, section 7.9.1, footnote 79:

"The container may choose to pool EntityManagers: it instead of creating
and closing in each case, it may acquire one from its pool
and call clear() on it."

What should happen with any property settings that were changed by the user?
E.g. setFlushMode or any vendor-specific properties?

Should clear() also reset them to the values configured for the
EntityManagerFactory?

I think this would make sense to get a clean, reusable EntityManager.

And if this is the common understanding of how clear() should work, I
suggest that we add
that in the spec.

Thank you!

Christian

-- 
Christian Romberg
Chief Engineer | Versant GmbH
(T) +49 40 60990-0
(F) +49 40 60990-113
(E) cromberg_at_versant.com
www.versant.com<http://www.google.com/url?q=http%3A%2F%2Fwww.versant.com%2F&sa=D&sntz=1&usg=AFrqEzeeEBc_gN_8mxtt8xDB0tjXDXQVlw>|
www.db4o.com<http://www.google.com/url?q=http%3A%2F%2Fwww.db4o.com%2F&sa=D&sntz=1&usg=AFrqEzdo3Q40RwKQPBtnPIuBYQd1diFxJQ>
-- 
Versant
GmbH is incorporated in Germany. Company registration number: HRB
54723, Amtsgericht Hamburg. Registered Office: Halenreie 42, 22359
Hamburg, Germany. Geschäftsführer: Bernhard Wöbker, Volker John
CONFIDENTIALITY
NOTICE: This e-mail message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential or
proprietary information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
immediately contact the sender by reply e-mail and destroy all copies of
the original message.