Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-2075

transaction-blueprint Coordinations should check existing TX

    XMLWordPrintableJSON

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

          Activity

            People

              ggrzybek Grzegorz Grzybek
              ggrzybek Grzegorz Grzybek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: