Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * JBoss, Home of Professional Open Source
    * Copyright 2009, Red Hat Middleware LLC, and individual contributors
    * as indicated by the @author tags.
    * See the copyright.txt in the distribution for a
    * full listing of individual contributors.
    * This copyrighted material is made available to anyone wishing to use,
    * modify, copy, or redistribute it subject to the terms and conditions
    * of the GNU Lesser General Public License, v. 2.1.
   * This program is distributed in the hope that it will be useful, but WITHOUT A
   * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
   * You should have received a copy of the GNU Lesser General Public License,
   * v.2.1 along with this distribution; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   * MA  02110-1301, USA.
   *
   * (C) 2009,
   * @author JBoss, a division of Red Hat.
   */
  package com.arjuna.ats.jta.common;
  
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  import  javax.transaction.TransactionManager;
  import  javax.transaction.TransactionSynchronizationRegistry;
  import  javax.transaction.UserTransaction;
  
A JavaBean containing configuration properties for the JTA subsystem.

Author(s):
Jonathan Halliday (jonathan.halliday@redhat.com)
  
  @PropertyPrefix(prefix = "com.arjuna.ats.jta.")
  public class JTAEnvironmentBean implements JTAEnvironmentBeanMBean
  {
      private volatile boolean supportSubtransactions = false;
  
      private volatile String transactionManagerClassName = "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple";
      private volatile TransactionManager transactionManager = null;
  
      private volatile String userTransactionClassName = "com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple";
      private volatile UserTransaction userTransaction = null;
  
      private volatile String transactionSynchronizationRegistryClassName = "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple";
      private volatile TransactionSynchronizationRegistry transactionSynchronizationRegistry = null;
  
      @ConcatenationPrefix(prefix = "com.arjuna.ats.jta.xaRecoveryNode")
      private volatile List<StringxaRecoveryNodes = new ArrayList<String>();
  
      @ConcatenationPrefix(prefix = "com.arjuna.ats.jta.recovery.XAResourceRecovery")
      private volatile List<StringxaResourceRecoveryClassNames = new ArrayList<String>();
      private volatile List<XAResourceRecoveryxaResourceRecoveries = null;
  
      private volatile List<StringxaResourceOrphanFilterClassNames = new ArrayList<String>();
      private volatile List<XAResourceOrphanFilterxaResourceOrphanFilters = null;
  
      private volatile boolean xaRollbackOptimization = false;
      private volatile boolean xaAssumeRecoveryComplete = false;
  
      // com.arjuna.ats.jta.utils.
      @FullPropertyName(name = "com.arjuna.ats.jta.utils.UTJNDIContext")
      private volatile String userTransactionJNDIContext = "java:/UserTransaction";
      @FullPropertyName(name = "com.arjuna.ats.jta.utils.TMJNDIContext")
      private volatile String transactionManagerJNDIContext =  "java:/TransactionManager";
      @FullPropertyName(name = "com.arjuna.ats.jta.utils.TSRJNDIContext")
      private volatile String transactionSynchronizationRegistryJNDIContext = "java:/TransactionSynchronizationRegistry";
  
      @ConcatenationPrefix(prefix = "com.arjuna.ats.jta.xaErrorHandler")
      private volatile List<StringxaResourceMapClassNames = new ArrayList<String>();
      private volatile List<XAResourceMapxaResourceMaps = null;
  
      private volatile boolean xaTransactionTimeoutEnabled = true;
  
      private volatile String lastResourceOptimisationInterfaceClassName = "com.arjuna.ats.jta.resources.LastResourceCommitOptimisation";
      private volatile Class lastResourceOptimisationInterface = null;
  
      private volatile String xaResourceRecordWrappingPluginClassName;
  
  	private int asyncCommitPoolSize = 10;
  
      private int orphanSafetyInterval = 20000;
      
      private String commitMarkableResourceTableName = "xids";
  
 
 	
 	
 
 
 
Returns true if subtransactions are allowed. Warning: subtransactions are not JTA spec compliant and most XA resource managers don't understand them. Default: false. Equivalent deprecated property: com.arjuna.ats.jta.supportSubtransactions

Returns:
true if subtransactions are enabled, false otherwise.
 
     public boolean isSupportSubtransactions()
     {
         return ;
     }

    
Sets if subtransactions should be allowed.

Parameters:
supportSubtransactions true to enable subtransactions, false to disable.
 
     public void setSupportSubtransactions(boolean supportSubtransactions)
     {
         this. = supportSubtransactions;
     }

    
Returns the class name of the javax.transaction.TransactionManager implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple" Equivalent deprecated property: com.arjuna.ats.jta.transactionManagerClassName

Returns:
the name of the class implementing TransactionManager.
 
     {
         return ;
     }

    
Sets the class name of the javax.transaction.TransactionManager implementation.

Parameters:
transactionManagerClassName the name of a class which implements TransactionManager.
 
     public void setTransactionManagerClassName(String transactionManagerClassName)
     {
         synchronized(this)
         {
             if(transactionManagerClassName == null)
             {
                 this. = null;
             }
             else if(!transactionManagerClassName.equals(this.))
             {
                 this. = null;
             }
             this. = transactionManagerClassName;
         }
     }

    
Returns an instance of a class implementing javax.transaction.TransactionManager. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log an appropriate warning and return null, not throw an exception.

Returns:
a javax.transaction.TransactionManager implementation instance, or null.
 
     public TransactionManager getTransactionManager()
     {
         if( == null &&  != null)
         {
             synchronized(this) {
                 if( == null &&  != null) {
                     TransactionManager instance = ClassloadingUtility.loadAndInstantiateClass(TransactionManager.class,  null);
                      = instance;
                 }
             }
         }
 
         return ;
     }

    
Sets the instance of javax.transaction.TransactionManager

Parameters:
instance an Object that implements javax.transaction.TransactionManager, or null.
 
     public void setTransactionManager(TransactionManager instance)
     {
         synchronized(this)
         {
             TransactionManager oldInstance = this.;
              = instance;
 
             if(instance == null)
             {
                 this. = null;
             }
             else if(instance != oldInstance)
             {
                 String name = ClassloadingUtility.getNameForClass(instance);
                 this. = name;
             }
         }
     }

    
Returns the class name of the javax.transaction.UserTransaction implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple" Equivalent deprecated property: com.arjuna.ats.jta.userTransactionClassName

Returns:
the name of the class implementing javax.transaction.UserTransaction.
 
     {
         return ;
     }

    
Sets the class name of the javax.transaction.UserTransaction implementation.

Parameters:
userTransactionClassName the name of a class which implements javax.transaction.UserTransaction.
 
     public void setUserTransactionClassName(String userTransactionClassName)
     {
         synchronized(this)
         {
             if(userTransactionClassName == null)
             {
                 this. = null;
             }
             else if(!userTransactionClassName.equals(this.))
             {
                 this. = null;
             }
             this. = userTransactionClassName;
         }
     }

    
Returns an instance of a class implementing javax.transaction.UserTransaction. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log an appropriate warning and return null, not throw an exception.

Returns:
a javax.transaction.UserTransaction implementation instance, or null.
 
     public UserTransaction getUserTransaction()
     {
           if( == null &&  != null)
         {
             synchronized (this) {
                 if( == null &&  != null) {
                     UserTransaction instance = ClassloadingUtility.loadAndInstantiateClass(UserTransaction.classnull);
                      = instance;
                 }
             }
         }
 
         return ;
     }

    
Sets the instance of javax.transaction.UserTransaction

Parameters:
instance an Object that implements javax.transaction.UserTransaction, or null.
 
     public void setUserTransaction(UserTransaction instance)
     {
         synchronized(this)
         {
             UserTransaction oldInstance = this.;
              = instance;
 
             if(instance == null)
             {
                 this. = null;
             }
             else if(instance != oldInstance)
             {
                 String name = ClassloadingUtility.getNameForClass(instance);
                 this. = name;
             }
         }
     }

    
Returns the class name of the javax.transaction.TransactionSynchronizationRegistry implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple" Equivalent deprecated property: com.arjuna.ats.jta.transactionSynchronizationRegistryClassName

Returns:
the name of the class implementing javax.transaction.TransactionSynchronizationRegistry.
 
     {
     }

    
Sets the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.

Parameters:
transactionSynchronizationRegistryClassName the name of a class which implements TransactionSynchronizationRegistry.
 
     public void setTransactionSynchronizationRegistryClassName(String transactionSynchronizationRegistryClassName)
     {
         synchronized(this)
         {
             if(transactionSynchronizationRegistryClassName == null)
             {
                 this. = null;
             }
             else if(!transactionSynchronizationRegistryClassName.equals(this.))
             {
                 this. = null;
             }
             this. = transactionSynchronizationRegistryClassName;
         }
     }

    
Returns an instance of a class implementing javax.transaction.transactionSynchronizationRegistry. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log an appropriate warning and return null, not throw an exception.

Returns:
a javax.transaction.TransactionSynchronizationRegistry implementation instance, or null.
 
     public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
     {
         {
             synchronized (this) {
                 if( == null &&  != null) {
                     TransactionSynchronizationRegistry instance = ClassloadingUtility.loadAndInstantiateClass(TransactionSynchronizationRegistry.classnull);
                      = instance;
                 }
             }
         }
 
         return ;
     }

    
Sets the instance of javax.transaction.TransactionSynchronizationRegistry

Parameters:
instance an Object that implements javax.transaction.TransactionSynchronizationRegistry, or null.
 
     public void setTransactionSynchronizationRegistry(TransactionSynchronizationRegistry instance)
     {
         synchronized(this)
         {
             TransactionSynchronizationRegistry oldInstance = this.;
              = instance;
 
             if(instance == null)
             {
                 this. = null;
             }
             else if(instance != oldInstance)
             {
                 String name = ClassloadingUtility.getNameForClass(instance);
                 this. = name;
             }
         }
     }

    
Returns the set of node identifiers for which recovery will be performed. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix: com.arjuna.ats.jta.xaRecoveryNode

Returns:
the set of node identifiers for which to perform recovery.
 
     public List<StringgetXaRecoveryNodes()
     {
        return new ArrayList<String>();
     }



    
Sets the node identifiers for which recovery will be performed. The provided list will be copied, not retained.

Parameters:
xaRecoveryNodes the set of node identifiers for which to perform recovery.
 
     public void setXaRecoveryNodes(List<StringxaRecoveryNodes)
     {
         if(xaRecoveryNodes == null) {
             this. = new ArrayList<String>(); 
         } else {
             this. = new ArrayList<String>(xaRecoveryNodes);
         }
     }

    
Returns the set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix: com.arjuna.ats.jta.recovery.XAResourceRecovery

Returns:
the set of XAResourceRecovery implementations with their configuration data.
 
     {
         synchronized(this)
         {
             return new ArrayList<String>();
         }
     }

    
Sets the class names of the XAResourceRecovery implementations that will be used, each optionally including trailing configuration data. The provided list will be copied, not retained.

Parameters:
xaResourceRecoveryClassNames the XAResourceRecovery implementation class names and configuration.
 
     public void setXaResourceRecoveryClassNames(List<StringxaResourceRecoveryClassNames)
     {
         synchronized(this)
         {
             if(xaResourceRecoveryClassNames == null)
             {
                 this. = null;
                 this. = new ArrayList<String>();
             }
             else if(!xaResourceRecoveryClassNames.equals(this.))
             {
                 this. = null;
                 this. = new ArrayList<String>(xaResourceRecoveryClassNames);
             }
         }
     }

    
Returns the set of XAResourceRecovery instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.

Returns:
the set of XAResourceRecovery instances.
 
     {
         synchronized(this)
         {
             if( == null) {
                 List<XAResourceRecoveryinstances = ClassloadingUtility.loadAndInstantiateClassesWithInit(XAResourceRecovery.class);
                  = instances;
             }
             return new ArrayList<XAResourceRecovery>();
         }
     }

    
Sets the instances of XAResourceRecovery. The provided list will be copied, not retained.

Parameters:
xaResourceRecoveries the set of XAResourceRecovery instances.
 
     public void setXaResourceRecoveries(List<XAResourceRecoveryxaResourceRecoveries)
     {
         synchronized(this)
         {
             if(xaResourceRecoveries == null)
             {
                 this. = new ArrayList<XAResourceRecovery>();
                 this. = new ArrayList<String>();
             }
             else
             {
                 this. = new ArrayList<XAResourceRecovery>(xaResourceRecoveries);
                 List<Stringnames = ClassloadingUtility.getNamesForClasses(this.);
                 this. = names;
             }
         }
     }

    
Returns a list of names of classes that implement XAResourceOrphanFilter. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix:

Returns:
a list of XAResourceOrphanFilter implementation class names.
 
     {
         synchronized(this)
         {
             return new ArrayList<String>();
         }
     }

    
Sets the class names of XAResourceOrphanFilter implementations. List elements should be names of classes that implement XAResourceOrphanFilter. The provided list will be copied, not retained.

Parameters:
xaResourceOrphanFilterClassNames a list of XAResourceOrphanFilter implementation classes.
 
     public void setXaResourceOrphanFilterClassNames(List<StringxaResourceOrphanFilterClassNames)
     {
         synchronized(this)
         {
             if(xaResourceOrphanFilterClassNames == null)
             {
                 this. = new ArrayList<XAResourceOrphanFilter>();
                 this. = new ArrayList<String>();
             }
             else if(!xaResourceOrphanFilterClassNames.equals(this.))
             {
                 this. = null;
                 this. = new ArrayList<String>(xaResourceOrphanFilterClassNames);
             }
         }
     }

    
Returns the set of XAResourceOrphanFilter instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.

Returns:
the set of XAResourceOrphanFilter instances.
 
     {
         synchronized(this)
         {
             if( == null) {
                 List<XAResourceOrphanFilterinstances = ClassloadingUtility.loadAndInstantiateClassesWithInit(XAResourceOrphanFilter.class);
                  = instances;
             }
             return new ArrayList<XAResourceOrphanFilter>();
         }
     }

    
Sets the instances of XAResourceOrphanFilter. The provided list will be copied, not retained.

Parameters:
xaResourceOrphanFilters the set of XAResourceOrphanFilter instances.
 
     public void setXaResourceOrphanFilters(List<XAResourceOrphanFilterxaResourceOrphanFilters)
     {
         synchronized(this)
         {
             if(xaResourceOrphanFilters == null)
             {
                 this. = new ArrayList<XAResourceOrphanFilter>();
                 this. = new ArrayList<String>();
             }
             else
             {
                 this. = new ArrayList<XAResourceOrphanFilter>(xaResourceOrphanFilters);
                 List<Stringnames = ClassloadingUtility.getNamesForClasses(this.);
                 this. = names;
             }
         }
     }

    
Returns if connections associated to XAResources that fail during prepare should be cleaned up immediately. TODO move to JDBC module as it's only for our own connection manager? Default: false. Equivalent deprecated property: com.arjuna.ats.jta.xaRollbackOptimization

Returns:
true for cleanup during prepare, false for cleanup during phase two rollback.
 
     public boolean isXaRollbackOptimization()
     {
         return ;
     }

    
Sets if failed resources should be cleaned up during prepare or during phase two.

Parameters:
xaRollbackOptimization true for immediate cleanup, false for phase two cleanup.
 
     public void setXaRollbackOptimization(boolean xaRollbackOptimization)
     {
         this. = xaRollbackOptimization;
     }

    
Returns if XAResources that can't be recovered should be assumed to have completed. WARNING: enabling this property is not recommended and may cause inconsistency if your recovery configuration is incorrect or resource managers are not available. Default: false. Equivalent deprecated property: com.arjuna.ats.jta.xaAssumeRecoveryComplete

Returns:
true for assumed completion, false for no such assumption.
 
     public boolean isXaAssumeRecoveryComplete()
     {
         return ;
     }

    
Sets if XAResources that can't be recovered should be assumed to have completed.

Parameters:
xaAssumeRecoveryComplete true to enable completion assumption, false to disable.
 
     public void setXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)
     {
         this. = xaAssumeRecoveryComplete;
     }

    
Returns the JNDI bind name for the implementation of UserTransaction. Default: "java:/UserTransaction" Equivalent deprecated property: com.arjuna.ats.jta.utils.UTJNDIContext

Returns:
the JNDI bind location for the UserTransaction interface.
 
     {
         return ;
     }

    
Sets the JNDI bind name for the implementation of UserTransaction.

Parameters:
userTransactionJNDIContext the JNDI bind location for the UserTransaction interface.
 
     public void setUserTransactionJNDIContext(String userTransactionJNDIContext)
     {
         this. = userTransactionJNDIContext;
     }

    
Returns the JNDI bind name for the implementation of TransactionManager. Default: "java:/TransactionManager" Equivalent deprecated property: com.arjuna.ats.jta.utils.TMJNDIContext

Returns:
the JNDI bind location for the TransactionManager interface.
 
     {
         return ;
     }

    
Sets the JNDI bind name for the implementation of TransactionManager.

Parameters:
transactionManagerJNDIContext the JNDI bind location for the TransactionManager interface.
 
     public void setTransactionManagerJNDIContext(String transactionManagerJNDIContext)
     {
         this. = transactionManagerJNDIContext;
     }

    
Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry. Default: "java:/TransactionSynchronizationRegistry" Equivalent deprecated property: com.arjuna.ats.jta.utils.TSRJNDIContext

Returns:
the JNDI bind location for the TransactionSynchronizationRegistry interface.
 
     {
     }

    
Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.

Parameters:
transactionSynchronizationRegistryJNDIContext the JNDI bind location for the TransactionSynchronizationRegistry implementation.
 
     public void setTransactionSynchronizationRegistryJNDIContext(String transactionSynchronizationRegistryJNDIContext)
     {
         this. = transactionSynchronizationRegistryJNDIContext;
     }

    
Returns the set of XAResourceMap implementation class names used to configure XAException handling. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix: com.arjuna.ats.jta.xaErrorHandler

Returns:
a set of class names, each an implementation of XAResourceMap.
 
     {
         synchronized(this)
         {
             return new ArrayList<String>();
         }
     }

    
Sets the names of the XAResourceMap classes used for XAException handling. The provided list will be copied, not retained.

Parameters:
xaResourceMapClassNames a set of names of classes, each implementing XAResourceMap.
 
     public void setXaResourceMapClassNames(List<StringxaResourceMapClassNames)
     {
         synchronized(this)
         {
             if(xaResourceMapClassNames == null)
             {
                 this. = null;
                 this. = new ArrayList<String>();
             }
             else if(!xaResourceMapClassNames.equals(this.))
             {
                 this. = null;
                 this. = new ArrayList<String>(xaResourceMapClassNames);
             }
         }
     }

    
Returns the set of XAResourceMap instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.

Returns:
the set of XAResourceMap instances.
 
     {
         synchronized(this)
         {
             if( == null) {
                 List<XAResourceMapinstances = ClassloadingUtility.loadAndInstantiateClassesWithInit(XAResourceMap.class);
                  = instances;
             }
             return new ArrayList<XAResourceMap>();
         }
     }

    
Sets the instances of XAResourceMap. The provided list will be copied, not retained.

Parameters:
xaResourceMaps the set of XAResourceMap instances.
 
     public void setXaResourceMaps(List<XAResourceMapxaResourceMaps)
     {
         synchronized(this)
         {
             if(xaResourceMaps == null)
             {
                 this. = new ArrayList<XAResourceMap>();
                 this. = new ArrayList<String>();
             }
             else
             {
                 this. = new ArrayList<XAResourceMap>(xaResourceMaps);
                 List<Stringnames = ClassloadingUtility.getNamesForClasses(this.);
                 this. = names;
             }
         }
     }

    
Returns if the transaction timeout is passed on to the enlisted XAResources. Default: true. Equivalent deprecated property: com.arjuna.ats.jta.xaTransactionTimeoutEnabled

Returns:
true to pass transaction timeout configuration on to the XAResources, false to skip setting resource timeout.
 
     public boolean isXaTransactionTimeoutEnabled()
     {
         return ;
     }

    
Sets if the transaction timeout should be passed to the enlisted XAResource or not.

Parameters:
xaTransactionTimeoutEnabled true to enable setting XAResource timeouts, false to disable.
 
     public void setXaTransactionTimeoutEnabled(boolean xaTransactionTimeoutEnabled)
     {
         this. = xaTransactionTimeoutEnabled;
     }

    
Returns the class name of the marker interface used to indicate a LastResource. Default: null. Equivalent deprecated property: com.arjuna.ats.jta.lastResourceOptimisationInterfaceClassName

Returns:
the class name of the market interface for LastResource handling.
 
     {
     }

    
Sets the class name of the marker interface used to indicate a LastResource.

Parameters:
lastResourceOptimisationInterfaceClassName the class name of the marker interface.
 
     public void setLastResourceOptimisationInterfaceClassName(String lastResourceOptimisationInterfaceClassName)
     {
         synchronized(this)
         {
             if(lastResourceOptimisationInterfaceClassName == null)
             {
                 this. = null;
             }
             else if(!lastResourceOptimisationInterfaceClassName.equals(this.))
             {
                 this. = null;
             }
             this. = lastResourceOptimisationInterfaceClassName;
         }
     }

    
Returns the Class representing the marker interface for LastResource. If there is no Class set and loading fails, this method will log an appropriate warning and return null, not throw an exception.

Returns:
the LastResource marker interface.
 
     {
             synchronized(this) {
                 if( == null &&  != null) {
                      = ClassloadingUtility.loadClass();
                 }
             }
         }
 
         return ;
     }

    
Sets a Class to use as the marker interface for LastResource

Parameters:
clazz a marker interface Class, or null.
 
     public void setLastResourceOptimisationInterface(Class clazz)
     {
         synchronized(this)
         {
             Class oldClazz = this.;
              = clazz;
 
             if(clazz == null)
             {
                 this. = null;
             }
             else if(clazz != oldClazz)
             {
                 String name = ClassloadingUtility.getNameForClass(clazz);
                 this. = name;
             }
         }
     }

    
Returns the class name of the XAResourceRecordWrappingPlugin implementation. Default: null

Returns:
the name of the class implementing XAResourceRecordWrappingPlugin.
 
     {
     }

    
Sets the class name of the XAResourceRecordWrappingPlugin implementation.

Parameters:
xaResourceRecordWrappingPluginClassName the name of a class which implements XAResourceRecordWrappingPlugin.
 
     public void setXaResourceRecordWrappingPluginClassName(String xaResourceRecordWrappingPluginClassName)
     {
         synchronized(this)
         {
             if(xaResourceRecordWrappingPluginClassName == null)
             {
                 this. = null;
             }
             else if(!xaResourceRecordWrappingPluginClassName.equals(this.))
             {
                 this. = null;
             }
             this. = xaResourceRecordWrappingPluginClassName;
         }
     }

    
Returns an instance of a class implementing XAResourceRecordWrappingPlugin. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log an appropriate warning and return null, not throw an exception.

Returns:
a XAResourceRecordWrappingPlugin implementation instance, or null.
 
     {
         if( == null &&  != null)
         {
             synchronized(this) {
                 if( == null &&  != null) {
                     XAResourceRecordWrappingPlugin instance = ClassloadingUtility.loadAndInstantiateClass(XAResourceRecordWrappingPlugin.class,  null);
                      = instance;
                 }
             }
         }
 
         return ;
     }

    
Sets the instance of XAResourceRecordWrappingPlugin

Parameters:
instance an Object that implements XAResourceRecordWrappingPlugin, or null.
 
     {
         synchronized(this)
         {
             XAResourceRecordWrappingPlugin oldInstance = this.;
              = instance;
 
             if(instance == null)
             {
                 this. = null;
             }
             else if(instance != oldInstance)
             {
                 String name = ClassloadingUtility.getNameForClass(instance);
                 this. = name;
             }
         }
     }
 
 	public int getAsyncCommitPoolSize() {
 	}
 
     public void setAsyncCommitPoolSize(int asyncCommitPoolSize) {
 		this. = asyncCommitPoolSize;
 	}
 
     public int getOrphanSafetyInterval() {
         return ;
     }

    
Set the amount of time to wait before deciding if the Xid is orphaned. It is important because if this is too short and a transaction completes between the two recovery scan phases the xids from the RM will be considered as orphaned. Although this does not cause data integrity issues it can appear unsettling.

Parameters:
orphanSafetyInterval
 
     public void setOrphanSafetyInterval(int orphanSafetyInterval) {
         this. = orphanSafetyInterval;
     }

Get the name of the table to use for storing commit markable resources commit state notifiers in.

Returns:
	}

Set the name of the table to use for storing commit markable resources commit state notifiers in.

Parameters:
commitMarkableResourceTableName The name of the table.
			String commitMarkableResourceTableName) {
		this. = commitMarkableResourceTableName;
	}

Get the name of the table to use for storing commit markable resources commit state notifiers in.

Returns:
		synchronized (this) {
	}

Set the name of the table to use for storing commit markable resources commit state notifiers in.

Parameters:
commitMarkableResourceTableName The name of the table.
			Map<StringStringcommitMarkableResourceTableNameMap) {
		synchronized (this) {
			if (commitMarkableResourceTableNameMap == null) {
else if (!commitMarkableResourceTableNameMap
						commitMarkableResourceTableNameMap);
	}

Retrieve the list of JNDI names that will be queried for committed 1PC resources that were enlisted in 2PC transactions.

Returns:
The list of JNDI names
		synchronized (this) {
	}

Set the list of JNDI names to apply a special LastResource algorithm that allows us to store data about the transaction in the resource manager to determine the outcome of the resource after crash/ If you change the list of jndinames you _can't_ change the JNDI name of the connections until they have been recovered.

Parameters:
commitMarkableResourceJNDINames The list of JNDI names
			List<StringcommitMarkableResourceJNDINames) {
		synchronized (this) {
			if (commitMarkableResourceJNDINames == null) {
else if (!commitMarkableResourceJNDINames
						commitMarkableResourceJNDINames);
	}

If this returns true, a synchronization is registered by the CommitMarkableResourceRecord to delete records as soon as the transaction completes.

Returns:
Whether to perform immediate cleanup of CRRs
	}

Notify the transaction manager to delete resource records immediately after a transaction commits.

Parameters:
performImmediateCleanupOfCommitMarkableResourceBranches
			boolean performImmediateCleanupOfCommitMarkableResourceBranches) {
		this. = performImmediateCleanupOfCommitMarkableResourceBranches;
	}

Allow the default policy of whether to use a synchronization to remove the branch should be overriden.

Returns:
		synchronized (this) {
	}

Allow the default policy of whether to use a synchronization to remove the branch should be overriden.

Parameters:
commitMarkableResourceTableName The name of the table.
			Map<StringBooleanperformImmediateCleanupOfCommitMarkableResourceBranchesMap) {
		synchronized (this) {
			if (performImmediateCleanupOfCommitMarkableResourceBranchesMap == null) {
else if (!performImmediateCleanupOfCommitMarkableResourceBranchesMap
						performImmediateCleanupOfCommitMarkableResourceBranchesMap);
	}

If this is a positive number, use a batch to delete CommitMarkableResourceRecord from the database.

Returns:
-1 to prevent batching.
	}

Alter the default batch size or set to -1 to disable batch deletion of CommitMarkableResourceRecord from the database.

Parameters:
batchSize -1 to prevent batching.
	public void setCommitMarkableResourceRecordDeleteBatchSize(int batchSize) {
	}

Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.

Returns:
		synchronized (this) {
	}

Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.

Parameters:
commitMarkableResourceRecordDeleteBatchSizeMap size
			Map<StringIntegercommitMarkableResourceRecordDeleteBatchSizeMap) {
		synchronized (this) {
			if (commitMarkableResourceRecordDeleteBatchSizeMap == null) {
else if (!commitMarkableResourceRecordDeleteBatchSizeMap
						commitMarkableResourceRecordDeleteBatchSizeMap);
	}

If this is enabled we will tell the recovery module when we complete branches. This means they will not in normal mode need fetching from the database before we can delete them.

Returns:
	}

Allow the default policy of whether to use a synchronization to remove the branch should be overriden.

Returns:
			boolean notifyCommitMarkableResourceRecoveryModuleOfCompleteBranches) {
		this. = notifyCommitMarkableResourceRecoveryModuleOfCompleteBranches;
New to GrepCode? Check out our FAQ X