Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-320

moving the entity-manager injection can break the default handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.3-incubating
    • 0.4
    • JPA-Module
    • None

    Description

      e.g. a refactoring from:

      public class TransactionalBean
      {
      @Inject
      private EntityManager entityManager;

      @Transactional
      public void executeInTransaction()

      { //... }
      }

      to

      public class TransactionalBean
      {
      @Inject
      private BeanA beanA;

      @Inject
      private BeanB beanB;

      @Transactional
      public void executeInTransaction()
      { this.beanA.doA(); this.beanB.doB(); }
      }

      public class BeanA
      {
      @Inject
      private EntityManager entityManager;

      public void doA()
      { //... }

      }

      public class BeanB
      {
      @Inject
      private EntityManager entityManager;

      public void doB()

      { //... }

      }

      isn't possible without using @Transactional(qualifier = Default.class) explicitly.

      Attachments

        Issue Links

          Activity

            People

              gpetracek Gerhard Petracek
              arg20 Gabriel Sosa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: