Package org.infinispan.transaction.lookup

Examples of org.infinispan.transaction.lookup.TransactionManagerLookup


         .transactionSynchronizationRegistryLookup(legacy.getTransactionSynchronizationRegistryLookup())
         .useEagerLocking(legacy.isUseEagerLocking())
         .useSynchronization(legacy.isUseSynchronizationForTransactions())
         .use1PcForAutoCommitTransactions(legacy.isUse1PcForAutoCommitTransactions());

      TransactionManagerLookup tmLookup = legacy.getTransactionManagerLookup();
      if (tmLookup != null) {
         builder.transaction().transactionManagerLookup(tmLookup);
      } else {
         String tmLookupClass = legacy.getTransactionManagerLookupClass();
         if (tmLookupClass != null) {
View Full Code Here


   private Configuration getDefaultRecoveryCacheConfig() {
      Configuration config = new Configuration();
      //the recovery cache should not participate in main cache's transactions, especially because removals
      // from this cache are executed in the context of a finalised transaction and cause issues.
      config.fluent().transaction().transactionManagerLookup(new TransactionManagerLookup() {
         @Override
         public TransactionManager getTransactionManager() throws Exception {
            return null;
         }
      });
View Full Code Here

   private static final Log log = LogFactory.getLog(TransactionManagerFactory.class);

   public <T> T construct(Class<T> componentType) {
      // See if we had a TransactionManager injected into our config
      TransactionManager transactionManager = null;
      TransactionManagerLookup lookup = configuration.getTransactionManagerLookup();

      if (lookup == null) {
         // Nope. See if we can look it up from JNDI
         if (configuration.getTransactionManagerLookupClass() != null) {
            lookup = (TransactionManagerLookup) Util.getInstance(configuration.getTransactionManagerLookupClass(), configuration.getClassLoader());
         }
      }

      try {
         if (lookup != null) {
            componentRegistry.wireDependencies(lookup);
            transactionManager = lookup.getTransactionManager();
         }
      }
      catch (Exception e) {
         log.info("failed looking up TransactionManager, will not use transactions", e);
      }
View Full Code Here

TOP

Related Classes of org.infinispan.transaction.lookup.TransactionManagerLookup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.