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 java.lang.Object
implements JTAEnvironmentBeanMBean

A JavaBean containing configuration properties for the JTA subsystem.

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

Constructor Summary
JTAEnvironmentBean()
           
 
Method Summary
 java.lang.String getJtaTMImplementation()
          Returns the classname of the javax.transaction.TransactionManager implementation.
 java.lang.String getJtaTMJNDIContext()
          Returns the JNDI bind name for the implementation of TransactionManager.
 java.lang.String getJtaTSRImplementation()
          Returns the classname of the javax.transaction.TransactionSynchronizationRegistry implementation.
 java.lang.String getJtaTSRJNDIContext()
          Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry.
 java.lang.String getJtaUTImplementation()
          Returns the classname of the javax.transaction.UserTransaction implementation.
 java.lang.String getJtaUTJNDIContext()
          Returns the JNDI bind name for the implementation of UserTransaction.
 java.lang.String getLastResourceOptimisationInterface()
          Returns the classname of the marker interface used to indicate a LastResource.
 java.lang.String getPropertiesFile()
          Returns the name of the properties file.
 int getXaBackoffPeriod()
          Deprecated. I'm not unsed, remove me.
 java.util.List<java.lang.String> getXaErrorHandlers()
          Returns the set of XAResourceMap implementation classnames used to configure XAException handling.
 java.util.List<java.lang.String> getXaRecoveryNodes()
          Returns the set of node identifiers for which recovery will be performed.
 java.util.List<java.lang.String> getXaResourceRecoveryInstances()
          Returns the set of XAResourceRecovery implementation classnames, 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 setJtaTMImplementation(java.lang.String jtaTMImplementation)
          Sets the classname of the javax.transaction.TransactionManager implementation.
 void setJtaTMJNDIContext(java.lang.String jtaTMJNDIContext)
          Sets the JNDI bind name for the implementation of TransactionManager.
 void setJtaTSRImplementation(java.lang.String jtaTSRImplementation)
          Sets the classname of the javax.transaction.TransactionSynchronizationRegistry implementation.
 void setJtaTSRJNDIContext(java.lang.String jtaTSRJNDIContext)
          Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.
 void setJtaUTImplementation(java.lang.String jtaUTImplementation)
          Sets the classname of the javax.transaction.UserTransaction implementation.
 void setJtaUTJNDIContext(java.lang.String jtaUTJNDIContext)
          Sets the JNDI bind name for the implementation of UserTransaction.
 void setLastResourceOptimisationInterface(java.lang.String lastResourceOptimisationInterface)
          Sets the classname of the marker interface used to indicate a LastResource.
 void setPropertiesFile(java.lang.String propertiesFile)
          Sets the name of the properties file.
 void setSupportSubtransactions(boolean supportSubtransactions)
          Sets if subtransactions should be allowed.
 void setXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)
          Sets if XAResources that can't be recovered should be assumed to have completed.
 void setXaBackoffPeriod(int xaBackoffPeriod)
          Sets the XA backoff period, in milliseconds.
 void setXaErrorHandlers(java.util.List<java.lang.String> xaErrorHandlers)
          Sets the names of the XAResourceMap classes used for XAException handling.
 void setXaRecoveryNodes(java.util.List<java.lang.String> xaRecoveryNodes)
          Sets the node identifiers for which recovery will be performed.
 void setXaResourceRecoveryInstances(java.util.List<java.lang.String> xaResourceRecoveryInstances)
          Sets 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

getPropertiesFile

public java.lang.String getPropertiesFile()
Returns the name of the properties file. Default: "" Equivalent deprecated property: com.arjuna.ats.jta.common.propertiesFile

Specified by:
getPropertiesFile in interface JTAEnvironmentBeanMBean
Returns:
the name of the properties file

setPropertiesFile

public void setPropertiesFile(java.lang.String propertiesFile)
Sets the name of the properties file.

Specified by:
setPropertiesFile in interface JTAEnvironmentBeanMBean
Parameters:
propertiesFile - the name of the properties file.

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.

Specified by:
setSupportSubtransactions in interface JTAEnvironmentBeanMBean
Parameters:
supportSubtransactions - true to enable subtransactions, false to disable.

getJtaTMImplementation

public java.lang.String getJtaTMImplementation()
Returns the classname of the javax.transaction.TransactionManager implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple" Equivalent deprecated property: com.arjuna.ats.jta.jtaTMImplementation

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

setJtaTMImplementation

public void setJtaTMImplementation(java.lang.String jtaTMImplementation)
Sets the classname of the javax.transaction.TransactionManager implementation.

Specified by:
setJtaTMImplementation in interface JTAEnvironmentBeanMBean
Parameters:
jtaTMImplementation - the name of a class which implements TransactionManager.

getJtaUTImplementation

public java.lang.String getJtaUTImplementation()
Returns the classname of the javax.transaction.UserTransaction implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple" Equivalent deprecated property: com.arjuna.ats.jta.jtaUTImplementation

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

setJtaUTImplementation

public void setJtaUTImplementation(java.lang.String jtaUTImplementation)
Sets the classname of the javax.transaction.UserTransaction implementation.

Specified by:
setJtaUTImplementation in interface JTAEnvironmentBeanMBean
Parameters:
jtaUTImplementation - the name of a class which implements UserTransaction.

getJtaTSRImplementation

public java.lang.String getJtaTSRImplementation()
Returns the classname of the javax.transaction.TransactionSynchronizationRegistry implementation. Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple" Equivalent deprecated property: com.arjuna.ats.jta.jtaTSRImplementation

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

setJtaTSRImplementation

public void setJtaTSRImplementation(java.lang.String jtaTSRImplementation)
Sets the classname of the javax.transaction.TransactionSynchronizationRegistry implementation.

Specified by:
setJtaTSRImplementation in interface JTAEnvironmentBeanMBean
Parameters:
jtaTSRImplementation - the name of a class which implements TransactionSynchronizationRegistry.

getXaBackoffPeriod

public int getXaBackoffPeriod()
Deprecated. I'm not unsed, remove me.

Returns the XA backoff period, in milliseconds. Default: 20000 milliseconds Equivalent deprecated property: com.arjuna.ats.jta.xaBackoffPeriod

Specified by:
getXaBackoffPeriod in interface JTAEnvironmentBeanMBean
Returns:
the XA backoff period, in milliseconds.

setXaBackoffPeriod

public void setXaBackoffPeriod(int xaBackoffPeriod)
Sets the XA backoff period, in milliseconds.

Specified by:
setXaBackoffPeriod in interface JTAEnvironmentBeanMBean
Parameters:
xaBackoffPeriod - the XA backoff period, in milliseconds.

getXaRecoveryNodes

public java.util.List<java.lang.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(java.util.List<java.lang.String> xaRecoveryNodes)
Sets the node identifiers for which recovery will be performed. The provided list will be copied, not retained.

Specified by:
setXaRecoveryNodes in interface JTAEnvironmentBeanMBean
Parameters:
xaRecoveryNodes - the set of node identifiers for which to perform recovery.

getXaResourceRecoveryInstances

public java.util.List<java.lang.String> getXaResourceRecoveryInstances()
Returns the set of XAResourceRecovery implementation classnames, 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:
getXaResourceRecoveryInstances in interface JTAEnvironmentBeanMBean
Returns:
the set of XAResourceRecovery implementations with their configuration data.

setXaResourceRecoveryInstances

public void setXaResourceRecoveryInstances(java.util.List<java.lang.String> xaResourceRecoveryInstances)
Sets the XAResourceRecovery implementations that will be used, each optionally including trailing configuration data. The provided list will be copied, not retained.

Specified by:
setXaResourceRecoveryInstances in interface JTAEnvironmentBeanMBean
Parameters:
xaResourceRecoveryInstances - the XAResourceRecovery implementaion classnames and configuration.

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.

Specified by:
setXaRollbackOptimization in interface JTAEnvironmentBeanMBean
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.

Specified by:
setXaAssumeRecoveryComplete in interface JTAEnvironmentBeanMBean
Parameters:
xaAssumeRecoveryComplete - true to enable completion assumption, false to disable.

getJtaUTJNDIContext

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

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

setJtaUTJNDIContext

public void setJtaUTJNDIContext(java.lang.String jtaUTJNDIContext)
Sets the JNDI bind name for the implementation of UserTransaction.

Specified by:
setJtaUTJNDIContext in interface JTAEnvironmentBeanMBean
Parameters:
jtaUTJNDIContext - the JNDI bind location for the UserTransaction interface.

getJtaTMJNDIContext

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

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

setJtaTMJNDIContext

public void setJtaTMJNDIContext(java.lang.String jtaTMJNDIContext)
Sets the JNDI bind name for the implementation of TransactionManager.

Specified by:
setJtaTMJNDIContext in interface JTAEnvironmentBeanMBean
Parameters:
jtaTMJNDIContext - the JNDI bind location for the TransactionManager interface.

getJtaTSRJNDIContext

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

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

setJtaTSRJNDIContext

public void setJtaTSRJNDIContext(java.lang.String jtaTSRJNDIContext)
Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.

Specified by:
setJtaTSRJNDIContext in interface JTAEnvironmentBeanMBean
Parameters:
jtaTSRJNDIContext - the JNDI bind location for the TransactionSynchronizationRegistry implementation.

getXaErrorHandlers

public java.util.List<java.lang.String> getXaErrorHandlers()
Returns the set of XAResourceMap implementation classnames 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:
getXaErrorHandlers in interface JTAEnvironmentBeanMBean
Returns:
a set of classnames, each an implementation of XAResourceMap.

setXaErrorHandlers

public void setXaErrorHandlers(java.util.List<java.lang.String> xaErrorHandlers)
Sets the names of the XAResourceMap classes used for XAException handling. The provided list will be copied, not retained.

Specified by:
setXaErrorHandlers in interface JTAEnvironmentBeanMBean
Parameters:
xaErrorHandlers - a set of names of classes, each implementing XAResourceMap.

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.

Specified by:
setXaTransactionTimeoutEnabled in interface JTAEnvironmentBeanMBean
Parameters:
xaTransactionTimeoutEnabled - true to enable setting XAResource timeouts, false to disable.

getLastResourceOptimisationInterface

public java.lang.String getLastResourceOptimisationInterface()
Returns the classname of the marker interface used to indicate a LastResource. Default: null. Equivalent deprecated property: com.arjuna.ats.jta.lastResourceOptimisationInterface

Specified by:
getLastResourceOptimisationInterface in interface JTAEnvironmentBeanMBean
Returns:
the classname of the market interface for LastResource handling.

setLastResourceOptimisationInterface

public void setLastResourceOptimisationInterface(java.lang.String lastResourceOptimisationInterface)
Sets the classname of the marker interface used to indicate a LastResource.

Specified by:
setLastResourceOptimisationInterface in interface JTAEnvironmentBeanMBean
Parameters:
lastResourceOptimisationInterface - the classname of the marker interface.