com.arjuna.ats.jta.common
Class JTAEnvironmentBean

java.lang.Object
  extended by com.arjuna.ats.jta.common.JTAEnvironmentBean
All Implemented Interfaces:
JTAEnvironmentBeanMBean

public class JTAEnvironmentBean
extends Object
implements JTAEnvironmentBeanMBean

A JavaBean containing configuration properties for the JTA subsystem.

Author:
Jonathan Halliday (jonathan.halliday@redhat.com)

Constructor Summary
JTAEnvironmentBean()
           
 
Method Summary
 Class getLastResourceOptimisationInterface()
          Returns the Class representing the marker interface for LastResource.
 String getLastResourceOptimisationInterfaceClassName()
          Returns the class name of the marker interface used to indicate a LastResource.
 TransactionManager getTransactionManager()
          Returns an instance of a class implementing javax.transaction.TransactionManager.
 String getTransactionManagerClassName()
          Returns the class name of the javax.transaction.TransactionManager implementation.
 String getTransactionManagerJNDIContext()
          Returns the JNDI bind name for the implementation of TransactionManager.
 TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
          Returns an instance of a class implementing javax.transaction.transactionSynchronizationRegistry.
 String getTransactionSynchronizationRegistryClassName()
          Returns the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.
 String getTransactionSynchronizationRegistryJNDIContext()
          Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry.
 UserTransaction getUserTransaction()
          Returns an instance of a class implementing javax.transaction.UserTransaction.
 String getUserTransactionClassName()
          Returns the class name of the javax.transaction.UserTransaction implementation.
 String getUserTransactionJNDIContext()
          Returns the JNDI bind name for the implementation of UserTransaction.
 List<String> getXaRecoveryNodes()
          Returns the set of node identifiers for which recovery will be performed.
 List<String> getXaResourceMapClassNames()
          Returns the set of XAResourceMap implementation class names used to configure XAException handling.
 List<XAResourceMap> getXaResourceMaps()
          Returns the set of XAResourceMap instances.
 List<String> getXaResourceOrphanFilterClassNames()
          Returns a list of names of classes that implement XAResourceOrphanFilter.
 List<XAResourceOrphanFilter> getXaResourceOrphanFilters()
          Returns the set of XAResourceOrphanFilter instances.
 com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugin getXAResourceRecordWrappingPlugin()
          Returns an instance of a class implementing XAResourceRecordWrappingPlugin.
 String getXaResourceRecordWrappingPluginClassName()
          Returns the class name of the XAResourceRecordWrappingPlugin implementation.
 List<XAResourceRecovery> getXaResourceRecoveries()
          Returns the set of XAResourceRecovery instances.
 List<String> getXaResourceRecoveryClassNames()
          Returns the set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it.
 boolean isSupportSubtransactions()
          Returns true if subtransactions are allowed.
 boolean isXaAssumeRecoveryComplete()
          Returns if XAResources that can't be recovered should be assumed to have completed.
 boolean isXaRollbackOptimization()
          Returns if connections associated to XAResources that fail during prepare should be cleaned up immediately.
 boolean isXaTransactionTimeoutEnabled()
          Returns if the transaction timeout is passed on to the enlisted XAResources.
 void setLastResourceOptimisationInterface(Class clazz)
          Sets a Class to use as the marker interface for LastResource
 void setLastResourceOptimisationInterfaceClassName(String lastResourceOptimisationInterfaceClassName)
          Sets the class name of the marker interface used to indicate a LastResource.
 void setSupportSubtransactions(boolean supportSubtransactions)
          Sets if subtransactions should be allowed.
 void setTransactionManager(TransactionManager instance)
          Sets the instance of javax.transaction.TransactionManager
 void setTransactionManagerClassName(String transactionManagerClassName)
          Sets the class name of the javax.transaction.TransactionManager implementation.
 void setTransactionManagerJNDIContext(String transactionManagerJNDIContext)
          Sets the JNDI bind name for the implementation of TransactionManager.
 void setTransactionSynchronizationRegistry(TransactionSynchronizationRegistry instance)
          Sets the instance of javax.transaction.TransactionSynchronizationRegistry
 void setTransactionSynchronizationRegistryClassName(String transactionSynchronizationRegistryClassName)
          Sets the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.
 void setTransactionSynchronizationRegistryJNDIContext(String transactionSynchronizationRegistryJNDIContext)
          Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.
 void setUserTransaction(UserTransaction instance)
          Sets the instance of javax.transaction.UserTransaction
 void setUserTransactionClassName(String userTransactionClassName)
          Sets the class name of the javax.transaction.UserTransaction implementation.
 void setUserTransactionJNDIContext(String userTransactionJNDIContext)
          Sets the JNDI bind name for the implementation of UserTransaction.
 void setXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)
          Sets if XAResources that can't be recovered should be assumed to have completed.
 void setXaRecoveryNodes(List<String> xaRecoveryNodes)
          Sets the node identifiers for which recovery will be performed.
 void setXaResourceMapClassNames(List<String> xaResourceMapClassNames)
          Sets the names of the XAResourceMap classes used for XAException handling.
 void setXaResourceMaps(List<XAResourceMap> xaResourceMaps)
          Sets the instances of XAResourceMap.
 void setXaResourceOrphanFilterClassNames(List<String> xaResourceOrphanFilterClassNames)
          Sets the class names of XAResourceOrphanFilter implementations.
 void setXaResourceOrphanFilters(List<XAResourceOrphanFilter> xaResourceOrphanFilters)
          Sets the instances of XAResourceOrphanFilter.
 void setXAResourceRecordWrappingPlugin(com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugin instance)
          Sets the instance of XAResourceRecordWrappingPlugin
 void setXaResourceRecordWrappingPluginClassName(String xaResourceRecordWrappingPluginClassName)
          Sets the class name of the XAResourceRecordWrappingPlugin implementation.
 void setXaResourceRecoveries(List<XAResourceRecovery> xaResourceRecoveries)
          Sets the instances of XAResourceRecovery.
 void setXaResourceRecoveryClassNames(List<String> xaResourceRecoveryClassNames)
          Sets the class names of the XAResourceRecovery implementations that will be used, each optionally including trailing configuration data.
 void setXaRollbackOptimization(boolean xaRollbackOptimization)
          Sets if failed resources should be cleaned up during prepare or during phase two.
 void setXaTransactionTimeoutEnabled(boolean xaTransactionTimeoutEnabled)
          Sets if the transaction timeout should be passed to the enlisted XAResource or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTAEnvironmentBean

public JTAEnvironmentBean()
Method Detail

isSupportSubtransactions

public boolean isSupportSubtransactions()
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

Specified by:
isSupportSubtransactions in interface JTAEnvironmentBeanMBean
Returns:
true if subtransactions are enabled, false otherwise.

setSupportSubtransactions

public void setSupportSubtransactions(boolean supportSubtransactions)
Sets if subtransactions should be allowed.

Parameters:
supportSubtransactions - true to enable subtransactions, false to disable.

getTransactionManagerClassName

public String getTransactionManagerClassName()
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

Specified by:
getTransactionManagerClassName in interface JTAEnvironmentBeanMBean
Returns:
the name of the class implementing TransactionManager.

setTransactionManagerClassName

public void setTransactionManagerClassName(String transactionManagerClassName)
Sets the class name of the javax.transaction.TransactionManager implementation.

Parameters:
transactionManagerClassName - the name of a class which implements TransactionManager.

getTransactionManager

public TransactionManager getTransactionManager()
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.

setTransactionManager

public void setTransactionManager(TransactionManager instance)
Sets the instance of javax.transaction.TransactionManager

Parameters:
instance - an Object that implements javax.transaction.TransactionManager, or null.

getUserTransactionClassName

public String getUserTransactionClassName()
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

Specified by:
getUserTransactionClassName in interface JTAEnvironmentBeanMBean
Returns:
the name of the class implementing javax.transaction.UserTransaction.

setUserTransactionClassName

public void setUserTransactionClassName(String userTransactionClassName)
Sets the class name of the javax.transaction.UserTransaction implementation.

Parameters:
userTransactionClassName - the name of a class which implements javax.transaction.UserTransaction.

getUserTransaction

public UserTransaction getUserTransaction()
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.

setUserTransaction

public void setUserTransaction(UserTransaction instance)
Sets the instance of javax.transaction.UserTransaction

Parameters:
instance - an Object that implements javax.transaction.UserTransaction, or null.

getTransactionSynchronizationRegistryClassName

public String getTransactionSynchronizationRegistryClassName()
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

Specified by:
getTransactionSynchronizationRegistryClassName in interface JTAEnvironmentBeanMBean
Returns:
the name of the class implementing javax.transaction.TransactionSynchronizationRegistry.

setTransactionSynchronizationRegistryClassName

public void setTransactionSynchronizationRegistryClassName(String transactionSynchronizationRegistryClassName)
Sets the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.

Parameters:
transactionSynchronizationRegistryClassName - the name of a class which implements TransactionSynchronizationRegistry.

getTransactionSynchronizationRegistry

public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
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.

setTransactionSynchronizationRegistry

public void setTransactionSynchronizationRegistry(TransactionSynchronizationRegistry instance)
Sets the instance of javax.transaction.TransactionSynchronizationRegistry

Parameters:
instance - an Object that implements javax.transaction.TransactionSynchronizationRegistry, or null.

getXaRecoveryNodes

public List<String> getXaRecoveryNodes()
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

Specified by:
getXaRecoveryNodes in interface JTAEnvironmentBeanMBean
Returns:
the set of node identifiers for which to perform recovery.

setXaRecoveryNodes

public void setXaRecoveryNodes(List<String> xaRecoveryNodes)
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.

getXaResourceRecoveryClassNames

public List<String> getXaResourceRecoveryClassNames()
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

Specified by:
getXaResourceRecoveryClassNames in interface JTAEnvironmentBeanMBean
Returns:
the set of XAResourceRecovery implementations with their configuration data.

setXaResourceRecoveryClassNames

public void setXaResourceRecoveryClassNames(List<String> xaResourceRecoveryClassNames)
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.

getXaResourceRecoveries

public List<XAResourceRecovery> getXaResourceRecoveries()
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.

setXaResourceRecoveries

public void setXaResourceRecoveries(List<XAResourceRecovery> xaResourceRecoveries)
Sets the instances of XAResourceRecovery. The provided list will be copied, not retained.

Parameters:
xaResourceRecoveries - the set of XAResourceRecovery instances.

getXaResourceOrphanFilterClassNames

public List<String> getXaResourceOrphanFilterClassNames()
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:

Specified by:
getXaResourceOrphanFilterClassNames in interface JTAEnvironmentBeanMBean
Returns:
a list of XAResourceOrphanFilter implementation class names.

setXaResourceOrphanFilterClassNames

public void setXaResourceOrphanFilterClassNames(List<String> xaResourceOrphanFilterClassNames)
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.

getXaResourceOrphanFilters

public List<XAResourceOrphanFilter> getXaResourceOrphanFilters()
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.

setXaResourceOrphanFilters

public void setXaResourceOrphanFilters(List<XAResourceOrphanFilter> xaResourceOrphanFilters)
Sets the instances of XAResourceOrphanFilter. The provided list will be copied, not retained.

Parameters:
xaResourceOrphanFilters - the set of XAResourceOrphanFilter instances.

isXaRollbackOptimization

public boolean isXaRollbackOptimization()
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

Specified by:
isXaRollbackOptimization in interface JTAEnvironmentBeanMBean
Returns:
true for cleanup during prepare, false for cleanup during phase two rollback.

setXaRollbackOptimization

public void setXaRollbackOptimization(boolean xaRollbackOptimization)
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.

isXaAssumeRecoveryComplete

public boolean isXaAssumeRecoveryComplete()
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

Specified by:
isXaAssumeRecoveryComplete in interface JTAEnvironmentBeanMBean
Returns:
true for assumed completion, false for no such assumption.

setXaAssumeRecoveryComplete

public void setXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)
Sets if XAResources that can't be recovered should be assumed to have completed.

Parameters:
xaAssumeRecoveryComplete - true to enable completion assumption, false to disable.

getUserTransactionJNDIContext

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

Specified by:
getUserTransactionJNDIContext in interface JTAEnvironmentBeanMBean
Returns:
the JNDI bind location for the UserTransaction interface.

setUserTransactionJNDIContext

public void setUserTransactionJNDIContext(String userTransactionJNDIContext)
Sets the JNDI bind name for the implementation of UserTransaction.

Parameters:
userTransactionJNDIContext - the JNDI bind location for the UserTransaction interface.

getTransactionManagerJNDIContext

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

Specified by:
getTransactionManagerJNDIContext in interface JTAEnvironmentBeanMBean
Returns:
the JNDI bind location for the TransactionManager interface.

setTransactionManagerJNDIContext

public void setTransactionManagerJNDIContext(String transactionManagerJNDIContext)
Sets the JNDI bind name for the implementation of TransactionManager.

Parameters:
transactionManagerJNDIContext - the JNDI bind location for the TransactionManager interface.

getTransactionSynchronizationRegistryJNDIContext

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

Specified by:
getTransactionSynchronizationRegistryJNDIContext in interface JTAEnvironmentBeanMBean
Returns:
the JNDI bind location for the TransactionSynchronizationRegistry interface.

setTransactionSynchronizationRegistryJNDIContext

public void setTransactionSynchronizationRegistryJNDIContext(String transactionSynchronizationRegistryJNDIContext)
Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.

Parameters:
transactionSynchronizationRegistryJNDIContext - the JNDI bind location for the TransactionSynchronizationRegistry implementation.

getXaResourceMapClassNames

public List<String> getXaResourceMapClassNames()
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

Specified by:
getXaResourceMapClassNames in interface JTAEnvironmentBeanMBean
Returns:
a set of class names, each an implementation of XAResourceMap.

setXaResourceMapClassNames

public void setXaResourceMapClassNames(List<String> xaResourceMapClassNames)
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.

getXaResourceMaps

public List<XAResourceMap> getXaResourceMaps()
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.

setXaResourceMaps

public void setXaResourceMaps(List<XAResourceMap> xaResourceMaps)
Sets the instances of XAResourceMap. The provided list will be copied, not retained.

Parameters:
xaResourceMaps - the set of XAResourceMap instances.

isXaTransactionTimeoutEnabled

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

Specified by:
isXaTransactionTimeoutEnabled in interface JTAEnvironmentBeanMBean
Returns:
true to pass transaction timeout configuration on to the XAResources, false to skip setting resource timeout.

setXaTransactionTimeoutEnabled

public void setXaTransactionTimeoutEnabled(boolean xaTransactionTimeoutEnabled)
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.

getLastResourceOptimisationInterfaceClassName

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

Specified by:
getLastResourceOptimisationInterfaceClassName in interface JTAEnvironmentBeanMBean
Returns:
the class name of the market interface for LastResource handling.

setLastResourceOptimisationInterfaceClassName

public void setLastResourceOptimisationInterfaceClassName(String lastResourceOptimisationInterfaceClassName)
Sets the class name of the marker interface used to indicate a LastResource.

Parameters:
lastResourceOptimisationInterfaceClassName - the class name of the marker interface.

getLastResourceOptimisationInterface

public Class getLastResourceOptimisationInterface()
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.

setLastResourceOptimisationInterface

public void setLastResourceOptimisationInterface(Class clazz)
Sets a Class to use as the marker interface for LastResource

Parameters:
clazz - a marker interface Class, or null.

getXaResourceRecordWrappingPluginClassName

public String getXaResourceRecordWrappingPluginClassName()
Returns the class name of the XAResourceRecordWrappingPlugin implementation. Default: null

Returns:
the name of the class implementing XAResourceRecordWrappingPlugin.

setXaResourceRecordWrappingPluginClassName

public void setXaResourceRecordWrappingPluginClassName(String xaResourceRecordWrappingPluginClassName)
Sets the class name of the XAResourceRecordWrappingPlugin implementation.

Parameters:
xaResourceRecordWrappingPluginClassName - the name of a class which implements XAResourceRecordWrappingPlugin.

getXAResourceRecordWrappingPlugin

public com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugin getXAResourceRecordWrappingPlugin()
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.

setXAResourceRecordWrappingPlugin

public void setXAResourceRecordWrappingPlugin(com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugin instance)
Sets the instance of XAResourceRecordWrappingPlugin

Parameters:
instance - an Object that implements XAResourceRecordWrappingPlugin, or null.


Copyright © 2012. All Rights Reserved.