Package org.apache.ignite.cache.jta.jndi

## Class CacheJndiTmLookup

- java.lang.Object
- - org.apache.ignite.cache.jta.jndi.CacheJndiTmLookup

- All Implemented Interfaces:
    `CacheTmLookup`

      public class CacheJndiTmLookup
      extends Object
      implements CacheTmLookup

  Implementation of `CacheTmLookup` interface that is using list of JNDI names to find TM.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CacheJndiTmLookup()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<String>` | `getJndiNames()` | Gets a list of JNDI names.
    `@Nullable javax.transaction.TransactionManager` | `getTm()` | Gets Transaction Manager (TM).
    `void` | `setJndiNames​(List<String> jndiNames)` | Sets a list of JNDI names used by this TM.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CacheJndiTmLookup

          public CacheJndiTmLookup()

  - ### Method Detail

    - #### getJndiNames

          public List<String> getJndiNames()

      Gets a list of JNDI names.
      Returns:
        List of JNDI names that is used to find TM.

    - #### setJndiNames

          public void setJndiNames​(List<String> jndiNames)

      Sets a list of JNDI names used by this TM.
      Parameters:
        `jndiNames` - List of JNDI names that is used to find TM.

    - #### getTm

          @Nullable
          public @Nullable javax.transaction.TransactionManager getTm()
                                                               throws IgniteException

      Gets Transaction Manager (TM).
      Specified by:
        `getTm` in interface `CacheTmLookup`
      Returns:
        TM or `null` if TM cannot be looked up.
      Throws:
        `IgniteException` - In case of error.