Hi,
In section 7.9.1, we currently have the wording:
"
For the management of a transaction-scoped persistence context, if there
is no EntityManager already
associated with the JTA transaction:
* The container creates a new entity manager by calling
EntityManagerFactory.createEntityManager when the first invocation of an
entity manager with PersistenceContextType.TRANSACTION occurs within the
scope of a business method executing in the JTA transaction.
...
For stateful session beans with extended persistence contexts:
...
* When a business method of the stateful session bean is invoked, if the
stateful session bean uses container managed transaction demarcation,
and the entity manager is not already associated with the current JTA
transaction, the container associates the entity manager with the
current JTA transaction and, if the persistence context is of type
SynchronizationType.SYNCHRONIZED, the container calls
EntityManager.joinTransaction. If there is a different persistence
context already associated with the JTA transaction, the container
throws the EJBException.
...
"
My question is about the extended persistence context part. Do we
require the container to associate the entity manager with the JTA
transaction, at the time that the stateful session bean is invoked or
instead when the entity manager is invoked in the stateful session bean?
I just wanted to make sure that this section is clearly stating the
intended container requirement.
Scott