Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15504

Support alternative JNDI locations for TransactionManager

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0
    • Component/s: camel-cdi
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Eg. Payara AS exports TransactionManager at JNDI.

      java:appserver/TransactionManager
      

      In Camel CDI is currently hardcoded JNDI

      java:/TransactionManager
      

      See https://stackoverflow.com/questions/55353883/apache-camel-in-payara-lookup-failed-for-java-transactionmanager

      Current solution is to remap this with web.xml, it would be nice to find way to make this configurable directly in Apache Camel.

       


      Alternate approach can be similar to Spring, which tries to resolve TransactionManager from following JNDI names - https://github.com/spring-projects/spring-framework/blob/master/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java

      public static final String DEFAULT_USER_TRANSACTION_NAME = "java:comp/UserTransaction";
      public static final String[] FALLBACK_TRANSACTION_MANAGER_NAMES =			new String[] {"java:comp/TransactionManager", "java:appserver/TransactionManager",					"java:pm/TransactionManager", "java:/TransactionManager"};
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bedla Jan Bednar
                Reporter:
                bedla Jan Bednar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: