[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jpa-dev] Can container EntityManagerFactory instances be RESOURCE_LOCAL?
|
Container managed persistence contexts (those injected with @PersistenceContext) must be JTA persistence units. Application managed persistence contexts (those injected with @PersistenceUnit) can be either JTA or RESOURCE_LOCAL. An application server's runtime is going to use PersistenceProvider.createContainerEntityManagerFactory() to create an EntityManagerFactory for both cases under the hood.
The specification says, in section 7.5, unambiguously IMHO:
An entity manager whose underlying transactions are controlled through JTA is termed a JTA entity manager.
[...]
A container-managed entity manager must be a JTA entity manager.
Note the last sentence.
Am I correct in assuming that a PersistenceUnitInfo instance whose getTransactionType() method returns PersistenceUnitTransactionType.RESOURCE_LOCAL must not be supplied to PersistenceProvider#crateContainerEntityManagerFactory(PersistenceUnitInfo, Map), even though the javadocs do not indicate its illegality?
Thanks,
Best,
Laird
_______________________________________________
jpa-dev mailing list
jpa-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jpa-dev