users@glassfish.java.net

Entity Manager transaction synchronization

From: <glassfish_at_javadesktop.org>
Date: Fri, 05 Dec 2008 17:03:05 PST

I thought an application managed entity manager automatically synchronizes with a JTA transaction only if it is created inside the transaction.

However, if I create the entity manager inside the post construct method of a stateless session bean, it is synchronized with the transaction that is started when the first call of a business method is performed (it isn't synchronized with the transactions of the following calls of a business method).

Is this behavoir intended ? Are there other situations where an application managed entity manager unexpectedly synchronizes with a transaction ?

Thanks for your information.
[Message sent by forum member 'ralph_jaus' (ralph_jaus)]

http://forums.java.net/jive/thread.jspa?messageID=320407