Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jpa-dev] Can container EntityManagerFactory instances be RESOURCE_LOCAL?

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.

Now, the javadocs for PersistenceProvider#createContainerEntityManagerFactory(PersistenceUnitInfo, Map) do not indicate that it is an illegal state for a PersistenceUnitInfo to be supplied whose associated transaction type is PersistenceUnitTransactionType.RESOURCE_LOCAL.  But shouldn't it be?

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


Back to the top