Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1070

provide some transaction manager locator OOTB

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • 2.0.0
    • None
    • None
    • None

    Description

      If you want to use a tx mgr with artemis you need to write a locator for it. Would be great to support it OOTB for well known server.

      For openejb it looks like

      import org.apache.activemq.artemis.service.extensions.transactions.TransactionManagerLocator;
      import org.apache.openejb.OpenEJB;
      
      import javax.transaction.TransactionManager;
      
      public class OpenEJBTransactionManagerLocator implements TransactionManagerLocator {
          @Override
          public TransactionManager getTransactionManager() {
              return OpenEJB.getTransactionManager();
          }
      }
      

      But it is also accessible through JNDI which would fit ost of servers.

      OpenJPA has a good class to lookup the transaction manager (see https://github.com/apache/openjpa/blob/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java#L55) maybe it can be used as a starting point to get impl automatic and just a flag to activate the tx mgr usage or not.

      wdyt?

      Attachments

        Activity

          People

            Unassigned Unassigned
            romain.manni-bucau Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: