Class LookupNames

java.lang.Object
org.infinispan.commons.tx.lookup.LookupNames

public final class LookupNames extends Object
The JDNI and TransactionManager factories we know of.
Since:
9.3
Author:
Pedro Ruivo
  • Method Details

    • lookupKnownTransactionManagers

      public static Optional<javax.transaction.TransactionManager> lookupKnownTransactionManagers(ClassLoader classLoader)
      Lookup for TransactionManager.

      It looks up by JNDI first using lookupByJNDI() and then by TransactionManager factories, using lookupByTransactionManagerFactory(ClassLoader).

      Parameters:
      classLoader - The ClassLoader to be used by lookupByTransactionManagerFactory(ClassLoader)
      Returns:
      An Optional with the TransactionManager if found.
    • lookupByJNDI

      public static Optional<javax.transaction.TransactionManager> lookupByJNDI()
      Lookup for a TransactionManager by known JNDI names.
      Returns:
      An Optional with the TransactionManager if found.
    • lookupByTransactionManagerFactory

      public static Optional<javax.transaction.TransactionManager> lookupByTransactionManagerFactory(ClassLoader classLoader)
      Lookup a TransactionManager by factory.
      Parameters:
      classLoader - The ClassLoader to use to instantiate the factory.
      Returns:
      An Optional with the TransactionManager if found.