Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
transaction-blueprint-2.3.0
-
None
-
None
Description
I have this unannotated method:
transactionManager.begin(); try { nestedTestService.testExternalTransaction(); } finally { transactionManager.rollback(); }
And this annotated nestedTestService.testExternalTransaction():
@Transactional(TxType.REQUIRED)
public void testExternalTransaction() {
TestEntity testEntity = testDao.createNew();
...
While the dao uses this EntityManager with the support from <jpa:enable />:
@PersistenceContext(unitName = "unit.1") private EntityManager entityManager;
The problem is that after ARIES-2050 fixes, org.apache.aries.transaction.TxInterceptorImpl#preCall() is not blindly creating new coordination if there's existing transaction.
ARIES-2050 fix was not complete (see also ARIES-2073) but also I've mishandled the scenario where transaction is created not by another TxInterceptorImpl.preCall(), but by manual javax.transaction.TransactionManager#begin() invocation.
Attachments
Issue Links
- is related to
-
ARIES-2050 Aries JPA 2.7 shouldn't always reuse EM instance from previous coordinations
- Resolved