Grzegorz Grzybek created ARIES-2075:
---------------------------------------

             Summary: transaction-blueprint Coordinations should check existing 
TX
                 Key: ARIES-2075
                 URL: https://issues.apache.org/jira/browse/ARIES-2075
             Project: Aries
          Issue Type: Bug
    Affects Versions: transaction-blueprint-2.3.0
            Reporter: Grzegorz Grzybek
            Assignee: Grzegorz Grzybek


I have this unannotated method:
{code:java}
transactionManager.begin();
try {
        nestedTestService.testExternalTransaction();
} finally {
        transactionManager.rollback();
}
{code}

And this annotated {{nestedTestService.testExternalTransaction()}}:
{code:java}
@Transactional(TxType.REQUIRED)
public void testExternalTransaction() {
        TestEntity testEntity = testDao.createNew();
...
{code}

While the dao uses this EntityManager with the support from {{<jpa:enable />}}:
{code:java}
@PersistenceContext(unitName = "unit.1")
private EntityManager entityManager;
{code}

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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to