Package com.arjuna.ats.jta.common
Class JTAEnvironmentBean
- java.lang.Object
-
- 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
Constructors Constructor Description JTAEnvironmentBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAsyncCommitPoolSize()Returns maximum size of a thread pool, used to execute asynchronous commits.java.util.List<java.lang.String>getCommitMarkableResourceJNDINames()Retrieve the list of JNDI names that will be queried for committed 1PC resources that were enlisted in 2PC transactions.intgetCommitMarkableResourceRecordDeleteBatchSize()If this is a positive number, use a batch to delete CommitMarkableResourceRecord from the database.java.util.Map<java.lang.String,java.lang.Integer>getCommitMarkableResourceRecordDeleteBatchSizeMap()Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.java.util.Map<java.lang.String,java.lang.String>getCommitMarkableResourceTableNameMap()Get the name of the table to use for storing commit markable resources commit state notifiers in.java.lang.StringgetDefaultCommitMarkableTableName()Get the name of the table to use for storing commit markable resources commit state notifiers in.java.lang.ClassgetLastResourceOptimisationInterface()Returns the Class representing the marker interface for LastResource.java.lang.StringgetLastResourceOptimisationInterfaceClassName()Returns the class name of the marker interface used to indicate a LastResource.intgetOrphanSafetyInterval()java.util.Map<java.lang.String,java.lang.Boolean>getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap()Allow the default policy of whether to use a synchronization to remove the branch should be overriden.javax.transaction.TransactionManagergetTransactionManager()Returns an instance of a class implementing javax.transaction.TransactionManager.java.lang.StringgetTransactionManagerClassName()Returns the class name of the javax.transaction.TransactionManager implementation.java.lang.StringgetTransactionManagerJNDIContext()Returns the JNDI bind name for the implementation of TransactionManager.javax.transaction.TransactionSynchronizationRegistrygetTransactionSynchronizationRegistry()Returns an instance of a class implementing javax.transaction.transactionSynchronizationRegistry.java.lang.StringgetTransactionSynchronizationRegistryClassName()Returns the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.java.lang.StringgetTransactionSynchronizationRegistryJNDIContext()Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry.javax.transaction.UserTransactiongetUserTransaction()Returns an instance of a class implementing javax.transaction.UserTransaction.java.lang.StringgetUserTransactionClassName()Returns the class name of the javax.transaction.UserTransaction implementation.java.lang.StringgetUserTransactionJNDIContext()Returns the JNDI bind name for the implementation of UserTransaction.org.jboss.tm.usertx.UserTransactionOperationsProvidergetUserTransactionOperationsProvider()Returning singleton instance ofUserTransactionOperationsProviderinstantiated based based on name specified bysetUserTransactionOperationsProviderClassName(String).
When class name is redefined during runtime there should be instantiated new provider.java.lang.StringgetUserTransactionOperationsProviderClassName()Get class name that is used asUserTransactionOperationsProviderjava.util.List<java.lang.String>getXaRecoveryNodes()Returns the set of node identifiers for which recovery will be performed.java.util.List<java.lang.String>getXaResourceIsSameRMClassNames()Returns the class names of the XAResource types whose isSameRM method is overridden to return false.java.util.List<java.lang.String>getXaResourceMapClassNames()Returns the set of XAResourceMap implementation class names used to configure XAException handling.java.util.List<XAResourceMap>getXaResourceMaps()Returns the set of XAResourceMap instances.java.util.List<java.lang.String>getXaResourceOrphanFilterClassNames()Returns a list of names of classes that implement XAResourceOrphanFilter.java.util.List<XAResourceOrphanFilter>getXaResourceOrphanFilters()Returns the set of XAResourceOrphanFilter instances.com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugingetXAResourceRecordWrappingPlugin()Returns an instance of a class implementing XAResourceRecordWrappingPlugin.java.lang.StringgetXaResourceRecordWrappingPluginClassName()Returns the class name of the XAResourceRecordWrappingPlugin implementation.java.util.List<XAResourceRecovery>getXaResourceRecoveries()Returns the set of XAResourceRecovery instances.java.util.List<java.lang.String>getXaResourceRecoveryClassNames()Returns the set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it.booleanisNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches()If this is enabled we will tell the recovery module when we complete branches.booleanisPerformImmediateCleanupOfCommitMarkableResourceBranches()If this returns true, a synchronization is registered by the CommitMarkableResourceRecord to delete records as soon as the transaction completes.booleanisStrictJTA12DuplicateXAENDPROTOErr()Returns true if we would treat XAER_PROTO out of duplicate xar as an error.booleanisSupportSubtransactions()Returns true if subtransactions are allowed.booleanisTransactionToThreadListenersEnabled()Returns true if the listeners announcing of the change of the thread transaction association happens.booleanisXaAssumeRecoveryComplete()Returns if XAResources that can't be recovered should be assumed to have completed.booleanisXaRollbackOptimization()Returns if connections associated to XAResources that fail during prepare should be cleaned up immediately.booleanisXaTransactionTimeoutEnabled()Returns if the transaction timeout is passed on to the enlisted XAResources.voidsetAsyncCommitPoolSize(int asyncCommitPoolSize)Sets maximum size of a thread pool, used to execute asynchronous commits.voidsetCommitMarkableResourceJNDINames(java.util.List<java.lang.String> commitMarkableResourceJNDINames)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.voidsetCommitMarkableResourceRecordDeleteBatchSize(int batchSize)Alter the default batch size or set to -1 to disable batch deletion of CommitMarkableResourceRecord from the database.voidsetCommitMarkableResourceRecordDeleteBatchSizeMap(java.util.Map<java.lang.String,java.lang.Integer> commitMarkableResourceRecordDeleteBatchSizeMap)Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.voidsetCommitMarkableResourceTableNameMap(java.util.Map<java.lang.String,java.lang.String> commitMarkableResourceTableNameMap)Set the name of the table to use for storing commit markable resources commit state notifiers in.voidsetDefaultCommitMarkableResourceTableName(java.lang.String commitMarkableResourceTableName)Set the name of the table to use for storing commit markable resources commit state notifiers in.voidsetLastResourceOptimisationInterface(java.lang.Class clazz)Sets a Class to use as the marker interface for LastResourcevoidsetLastResourceOptimisationInterfaceClassName(java.lang.String lastResourceOptimisationInterfaceClassName)Sets the class name of the marker interface used to indicate a LastResource.voidsetNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches(boolean notifyCommitMarkableResourceRecoveryModuleOfCompleteBranches)Allow the default policy of whether to use a synchronization to remove the branch should be overriden.voidsetOrphanSafetyInterval(int orphanSafetyInterval)Set the amount of time to wait before deciding if the Xid is orphaned.voidsetPerformImmediateCleanupOfCommitMarkableResourceBranches(boolean performImmediateCleanupOfCommitMarkableResourceBranches)Notify the transaction manager to delete resource records immediately after a transaction commits.voidsetPerformImmediateCleanupOfCommitMarkableResourceBranchesMap(java.util.Map<java.lang.String,java.lang.Boolean> performImmediateCleanupOfCommitMarkableResourceBranchesMap)Allow the default policy of whether to use a synchronization to remove the branch should be overriden.voidsetStrictJTA12DuplicateXAENDPROTOErr(boolean strictJTA12DuplicateXAENDPROTOErr)Sets if to not allow non-JTA 1.2 XAR to return XAER_PROTO out of duplicate XAR xa_end callsvoidsetSupportSubtransactions(boolean supportSubtransactions)Sets if subtransactions should be allowed.voidsetTransactionManager(javax.transaction.TransactionManager instance)Sets the instance of javax.transaction.TransactionManagervoidsetTransactionManagerClassName(java.lang.String transactionManagerClassName)Sets the class name of the javax.transaction.TransactionManager implementation.voidsetTransactionManagerJNDIContext(java.lang.String transactionManagerJNDIContext)Sets the JNDI bind name for the implementation of TransactionManager.voidsetTransactionSynchronizationRegistry(javax.transaction.TransactionSynchronizationRegistry instance)Sets the instance of javax.transaction.TransactionSynchronizationRegistryvoidsetTransactionSynchronizationRegistryClassName(java.lang.String transactionSynchronizationRegistryClassName)Sets the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.voidsetTransactionSynchronizationRegistryJNDIContext(java.lang.String transactionSynchronizationRegistryJNDIContext)Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.voidsetTransactionToThreadListenersEnabled(boolean transactionToThreadListenersEnabled)Define if transaction to thread associtaion listeners should be enabled.voidsetUserTransaction(javax.transaction.UserTransaction instance)Sets the instance of javax.transaction.UserTransactionvoidsetUserTransactionClassName(java.lang.String userTransactionClassName)Sets the class name of the javax.transaction.UserTransaction implementation.voidsetUserTransactionJNDIContext(java.lang.String userTransactionJNDIContext)Sets the JNDI bind name for the implementation of UserTransaction.voidsetUserTransactionOperationsProviderClassName(java.lang.String providerClassName)Setting of class name that definesUserTransactionOperationsProvider.voidsetXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)Sets if XAResources that can't be recovered should be assumed to have completed.voidsetXaRecoveryNodes(java.util.List<java.lang.String> xaRecoveryNodes)Sets the node identifiers for which recovery will be performed.voidsetXaResourceIsSameRMClassNames(java.util.List<java.lang.String> xaResourceIsSameRMClassNames)Sets the class names of the XAResource types whose isSameRM method is overridden to return false.voidsetXaResourceMapClassNames(java.util.List<java.lang.String> xaResourceMapClassNames)Sets the names of the XAResourceMap classes used for XAException handling.voidsetXaResourceMaps(java.util.List<XAResourceMap> xaResourceMaps)Sets the instances of XAResourceMap.voidsetXaResourceOrphanFilterClassNames(java.util.List<java.lang.String> xaResourceOrphanFilterClassNames)Sets the class names of XAResourceOrphanFilter implementations.voidsetXaResourceOrphanFilters(java.util.List<XAResourceOrphanFilter> xaResourceOrphanFilters)Sets the instances of XAResourceOrphanFilter.voidsetXAResourceRecordWrappingPlugin(com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecordWrappingPlugin instance)Sets the instance of XAResourceRecordWrappingPluginvoidsetXaResourceRecordWrappingPluginClassName(java.lang.String xaResourceRecordWrappingPluginClassName)Sets the class name of the XAResourceRecordWrappingPlugin implementation.voidsetXaResourceRecoveries(java.util.List<XAResourceRecovery> xaResourceRecoveries)Sets the instances of XAResourceRecovery.voidsetXaResourceRecoveryClassNames(java.util.List<java.lang.String> xaResourceRecoveryClassNames)Sets the class names of the XAResourceRecovery implementations that will be used, each optionally including trailing configuration data.voidsetXaRollbackOptimization(boolean xaRollbackOptimization)Sets if failed resources should be cleaned up during prepare or during phase two.voidsetXaTransactionTimeoutEnabled(boolean xaTransactionTimeoutEnabled)Sets if the transaction timeout should be passed to the enlisted XAResource or not.
-
-
-
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:
isSupportSubtransactionsin interfaceJTAEnvironmentBeanMBean- 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 java.lang.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:
getTransactionManagerClassNamein interfaceJTAEnvironmentBeanMBean- Returns:
- the name of the class implementing TransactionManager.
-
setTransactionManagerClassName
public void setTransactionManagerClassName(java.lang.String transactionManagerClassName)
Sets the class name of the javax.transaction.TransactionManager implementation.- Parameters:
transactionManagerClassName- the name of a class which implements TransactionManager.
-
getTransactionManager
public javax.transaction.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(javax.transaction.TransactionManager instance)
Sets the instance of javax.transaction.TransactionManager- Parameters:
instance- an Object that implements javax.transaction.TransactionManager, or null.
-
getUserTransactionClassName
public java.lang.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:
getUserTransactionClassNamein interfaceJTAEnvironmentBeanMBean- Returns:
- the name of the class implementing javax.transaction.UserTransaction.
-
setUserTransactionClassName
public void setUserTransactionClassName(java.lang.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 javax.transaction.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(javax.transaction.UserTransaction instance)
Sets the instance of javax.transaction.UserTransaction- Parameters:
instance- an Object that implements javax.transaction.UserTransaction, or null.
-
getTransactionSynchronizationRegistryClassName
public java.lang.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:
getTransactionSynchronizationRegistryClassNamein interfaceJTAEnvironmentBeanMBean- Returns:
- the name of the class implementing javax.transaction.TransactionSynchronizationRegistry.
-
setTransactionSynchronizationRegistryClassName
public void setTransactionSynchronizationRegistryClassName(java.lang.String transactionSynchronizationRegistryClassName)
Sets the class name of the javax.transaction.TransactionSynchronizationRegistry implementation.- Parameters:
transactionSynchronizationRegistryClassName- the name of a class which implements TransactionSynchronizationRegistry.
-
getTransactionSynchronizationRegistry
public javax.transaction.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(javax.transaction.TransactionSynchronizationRegistry instance)
Sets the instance of javax.transaction.TransactionSynchronizationRegistry- Parameters:
instance- an Object that implements javax.transaction.TransactionSynchronizationRegistry, or null.
-
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:
getXaRecoveryNodesin interfaceJTAEnvironmentBeanMBean- 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.- Parameters:
xaRecoveryNodes- the set of node identifiers for which to perform recovery.
-
getXaResourceRecoveryClassNames
public java.util.List<java.lang.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:
getXaResourceRecoveryClassNamesin interfaceJTAEnvironmentBeanMBean- Returns:
- the set of XAResourceRecovery implementations with their configuration data.
-
setXaResourceRecoveryClassNames
public void setXaResourceRecoveryClassNames(java.util.List<java.lang.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 java.util.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(java.util.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 java.util.List<java.lang.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:
getXaResourceOrphanFilterClassNamesin interfaceJTAEnvironmentBeanMBean- Returns:
- a list of XAResourceOrphanFilter implementation class names.
-
setXaResourceOrphanFilterClassNames
public void setXaResourceOrphanFilterClassNames(java.util.List<java.lang.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 java.util.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(java.util.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:
isXaRollbackOptimizationin interfaceJTAEnvironmentBeanMBean- 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:
isXaAssumeRecoveryCompletein interfaceJTAEnvironmentBeanMBean- 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 java.lang.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:
getUserTransactionJNDIContextin interfaceJTAEnvironmentBeanMBean- Returns:
- the JNDI bind location for the UserTransaction interface.
-
setUserTransactionJNDIContext
public void setUserTransactionJNDIContext(java.lang.String userTransactionJNDIContext)
Sets the JNDI bind name for the implementation of UserTransaction.- Parameters:
userTransactionJNDIContext- the JNDI bind location for the UserTransaction interface.
-
getTransactionManagerJNDIContext
public java.lang.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:
getTransactionManagerJNDIContextin interfaceJTAEnvironmentBeanMBean- Returns:
- the JNDI bind location for the TransactionManager interface.
-
setTransactionManagerJNDIContext
public void setTransactionManagerJNDIContext(java.lang.String transactionManagerJNDIContext)
Sets the JNDI bind name for the implementation of TransactionManager.- Parameters:
transactionManagerJNDIContext- the JNDI bind location for the TransactionManager interface.
-
getTransactionSynchronizationRegistryJNDIContext
public java.lang.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:
getTransactionSynchronizationRegistryJNDIContextin interfaceJTAEnvironmentBeanMBean- Returns:
- the JNDI bind location for the TransactionSynchronizationRegistry interface.
-
setTransactionSynchronizationRegistryJNDIContext
public void setTransactionSynchronizationRegistryJNDIContext(java.lang.String transactionSynchronizationRegistryJNDIContext)
Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.- Parameters:
transactionSynchronizationRegistryJNDIContext- the JNDI bind location for the TransactionSynchronizationRegistry implementation.
-
getXaResourceMapClassNames
public java.util.List<java.lang.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:
getXaResourceMapClassNamesin interfaceJTAEnvironmentBeanMBean- Returns:
- a set of class names, each an implementation of XAResourceMap.
-
setXaResourceMapClassNames
public void setXaResourceMapClassNames(java.util.List<java.lang.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 java.util.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(java.util.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:
isXaTransactionTimeoutEnabledin interfaceJTAEnvironmentBeanMBean- 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 java.lang.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:
getLastResourceOptimisationInterfaceClassNamein interfaceJTAEnvironmentBeanMBean- Returns:
- the class name of the market interface for LastResource handling.
-
setLastResourceOptimisationInterfaceClassName
public void setLastResourceOptimisationInterfaceClassName(java.lang.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 java.lang.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(java.lang.Class clazz)
Sets a Class to use as the marker interface for LastResource- Parameters:
clazz- a marker interface Class, or null.
-
getXaResourceRecordWrappingPluginClassName
public java.lang.String getXaResourceRecordWrappingPluginClassName()
Returns the class name of the XAResourceRecordWrappingPlugin implementation. Default: null- Returns:
- the name of the class implementing XAResourceRecordWrappingPlugin.
-
setXaResourceRecordWrappingPluginClassName
public void setXaResourceRecordWrappingPluginClassName(java.lang.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.
-
getAsyncCommitPoolSize
public int getAsyncCommitPoolSize()
Returns maximum size of a thread pool, used to execute asynchronous commits.- Returns:
- maximum size of a thread pool, used to execute asynchronous commits.
-
setAsyncCommitPoolSize
public void setAsyncCommitPoolSize(int asyncCommitPoolSize)
Sets maximum size of a thread pool, used to execute asynchronous commits.- Parameters:
asyncCommitPoolSize- maximum size of a thread pool, used to execute asynchronous commits.
-
getOrphanSafetyInterval
public int getOrphanSafetyInterval()
-
setOrphanSafetyInterval
public void setOrphanSafetyInterval(int orphanSafetyInterval)
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-
-
getDefaultCommitMarkableTableName
public java.lang.String getDefaultCommitMarkableTableName()
Get the name of the table to use for storing commit markable resources commit state notifiers in.- Returns:
- the default table name
-
setDefaultCommitMarkableResourceTableName
public void setDefaultCommitMarkableResourceTableName(java.lang.String commitMarkableResourceTableName)
Set the name of the table to use for storing commit markable resources commit state notifiers in.- Parameters:
commitMarkableResourceTableName- The name of the table.
-
getCommitMarkableResourceTableNameMap
public java.util.Map<java.lang.String,java.lang.String> getCommitMarkableResourceTableNameMap()
Get the name of the table to use for storing commit markable resources commit state notifiers in.- Returns:
- the table name map
-
setCommitMarkableResourceTableNameMap
public void setCommitMarkableResourceTableNameMap(java.util.Map<java.lang.String,java.lang.String> commitMarkableResourceTableNameMap)
Set the name of the table to use for storing commit markable resources commit state notifiers in.- Parameters:
commitMarkableResourceTableNameMap- The name of the table.
-
getCommitMarkableResourceJNDINames
public java.util.List<java.lang.String> getCommitMarkableResourceJNDINames()
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
-
setCommitMarkableResourceJNDINames
public void setCommitMarkableResourceJNDINames(java.util.List<java.lang.String> commitMarkableResourceJNDINames)
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
-
isPerformImmediateCleanupOfCommitMarkableResourceBranches
public boolean isPerformImmediateCleanupOfCommitMarkableResourceBranches()
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
-
setPerformImmediateCleanupOfCommitMarkableResourceBranches
public void setPerformImmediateCleanupOfCommitMarkableResourceBranches(boolean performImmediateCleanupOfCommitMarkableResourceBranches)
Notify the transaction manager to delete resource records immediately after a transaction commits.- Parameters:
performImmediateCleanupOfCommitMarkableResourceBranches-
-
getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap
public java.util.Map<java.lang.String,java.lang.Boolean> getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap()
Allow the default policy of whether to use a synchronization to remove the branch should be overriden.- Returns:
- whether to perform immediate cleanup of branches or batch them
-
setPerformImmediateCleanupOfCommitMarkableResourceBranchesMap
public void setPerformImmediateCleanupOfCommitMarkableResourceBranchesMap(java.util.Map<java.lang.String,java.lang.Boolean> performImmediateCleanupOfCommitMarkableResourceBranchesMap)
Allow the default policy of whether to use a synchronization to remove the branch should be overriden.- Parameters:
performImmediateCleanupOfCommitMarkableResourceBranchesMap- The name of the table.
-
getCommitMarkableResourceRecordDeleteBatchSize
public int getCommitMarkableResourceRecordDeleteBatchSize()
If this is a positive number, use a batch to delete CommitMarkableResourceRecord from the database.- Returns:
- -1 to prevent batching.
-
setCommitMarkableResourceRecordDeleteBatchSize
public void setCommitMarkableResourceRecordDeleteBatchSize(int batchSize)
Alter the default batch size or set to -1 to disable batch deletion of CommitMarkableResourceRecord from the database.- Parameters:
batchSize- -1 to prevent batching.
-
getCommitMarkableResourceRecordDeleteBatchSizeMap
public java.util.Map<java.lang.String,java.lang.Integer> getCommitMarkableResourceRecordDeleteBatchSizeMap()
Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.- Returns:
- the maximum batch size to clean up
-
setCommitMarkableResourceRecordDeleteBatchSizeMap
public void setCommitMarkableResourceRecordDeleteBatchSizeMap(java.util.Map<java.lang.String,java.lang.Integer> commitMarkableResourceRecordDeleteBatchSizeMap)
Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.- Parameters:
commitMarkableResourceRecordDeleteBatchSizeMap- size
-
isNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches
public boolean isNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches()
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:
- whether to notify CMR module
-
setNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches
public void setNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches(boolean notifyCommitMarkableResourceRecoveryModuleOfCompleteBranches)
Allow the default policy of whether to use a synchronization to remove the branch should be overriden.
-
setUserTransactionOperationsProviderClassName
public void setUserTransactionOperationsProviderClassName(java.lang.String providerClassName)
Setting of class name that defines
UserTransactionOperationsProvider. The provider is later used to get more info aboutUserTransaction.When null is set then default provider implementation is used which is
#defaultTransactionOperationsProviderClassName.- Parameters:
providerClassName- class name implementingUserTransactionOperationsProvider
-
getUserTransactionOperationsProviderClassName
public java.lang.String getUserTransactionOperationsProviderClassName()
Get class name that is used asUserTransactionOperationsProvider- Returns:
- class name implementing
UserTransactionOperationsProvider
-
getUserTransactionOperationsProvider
public org.jboss.tm.usertx.UserTransactionOperationsProvider getUserTransactionOperationsProvider()
Returning singleton instance ofUserTransactionOperationsProviderinstantiated based based on name specified bysetUserTransactionOperationsProviderClassName(String).
When class name is redefined during runtime there should be instantiated new provider.- Returns:
- instance of class implementing
UserTransactionOperationsProvider
-
isStrictJTA12DuplicateXAENDPROTOErr
public boolean isStrictJTA12DuplicateXAENDPROTOErr()
Returns true if we would treat XAER_PROTO out of duplicate xar as an error. Default: false.- Returns:
- true if we treat XAER_PROTO out of duplicate xar as errors
-
setStrictJTA12DuplicateXAENDPROTOErr
public void setStrictJTA12DuplicateXAENDPROTOErr(boolean strictJTA12DuplicateXAENDPROTOErr)
Sets if to not allow non-JTA 1.2 XAR to return XAER_PROTO out of duplicate XAR xa_end calls- Parameters:
strictJTA12DuplicateXAENDPROTOErr- true to enable, false to disable.
-
isTransactionToThreadListenersEnabled
public boolean isTransactionToThreadListenersEnabled()
Returns true if the listeners announcing of the change of the thread transaction association happens. This functionality was deprecated with introduction of WFTC for WFLY. WFTC implements the listeners differently. The thread transaction association listener is needed by JPA WFLY integration.- Returns:
- true to if listeners handling is permitted, false to when is not enabled
-
setTransactionToThreadListenersEnabled
public void setTransactionToThreadListenersEnabled(boolean transactionToThreadListenersEnabled)
Define if transaction to thread associtaion listeners should be enabled.- Parameters:
transactionToThreadListenersEnabled- true to enable listeners handling, false to disable
-
getXaResourceIsSameRMClassNames
public java.util.List<java.lang.String> getXaResourceIsSameRMClassNames()
Returns the class names of the XAResource types whose isSameRM method is overridden to return false. This override is useful because some drivers do not implement isSameRM correctly. Default: empty list.- Returns:
- the class names of XAResource types that should be overriden.
-
setXaResourceIsSameRMClassNames
public void setXaResourceIsSameRMClassNames(java.util.List<java.lang.String> xaResourceIsSameRMClassNames)
Sets the class names of the XAResource types whose isSameRM method is overridden to return false. This override is useful because some drivers do not implement isSameRM correctly.- Parameters:
xaResourceIsSameRMClassNames- the class names of XAResource types that should be overriden.
-
-