Class JTAEnvironmentBean
- All Implemented Interfaces:
JTAEnvironmentBeanMBean
- Author:
- Jonathan Halliday (jonathan.halliday@redhat.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns maximum size of a thread pool, used to execute asynchronous commits.Retrieve the list of JNDI names that will be queried for committed 1PC resources that were enlisted in 2PC transactions.int
If this is a positive number, use a batch to delete CommitMarkableResourceRecord from the database.Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.Get the name of the table to use for storing commit markable resources commit state notifiers in.Get the name of the table to use for storing commit markable resources commit state notifiers in.Returns the Class representing the marker interface for LastResource.Returns the class name of the marker interface used to indicate a LastResource.int
Allow the default policy of whether to use a synchronization to remove the branch should be overriden.jakarta.transaction.TransactionManager
Returns an instance of a class implementing jakarta.transaction.TransactionManager.Returns the class name of the jakarta.transaction.TransactionManager implementation.Returns the JNDI bind name for the implementation of TransactionManager.jakarta.transaction.TransactionSynchronizationRegistry
Returns an instance of a class implementing javax.transaction.transactionSynchronizationRegistry.Returns the class name of the jakarta.transaction.TransactionSynchronizationRegistry implementation.Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry.jakarta.transaction.UserTransaction
Returns an instance of a class implementing jakarta.transaction.UserTransaction.Returns the class name of the jakarta.transaction.UserTransaction implementation.Returns the JNDI bind name for the implementation of UserTransaction.org.jboss.tm.usertx.UserTransactionOperationsProvider
Returning singleton instance ofUserTransactionOperationsProvider
instantiated based based on name specified bysetUserTransactionOperationsProviderClassName(String)
.
When class name is redefined during runtime there should be instantiated new provider.Get class name that is used asUserTransactionOperationsProvider
Returns the set of node identifiers for which recovery will be performed.Returns the class names of the XAResource types whose isSameRM method is overridden to return false.Returns the set of XAResourceMap implementation class names used to configure XAException handling.Returns the set of XAResourceMap instances.Returns a list of names of classes that implement XAResourceOrphanFilter.Returns the set of XAResourceOrphanFilter instances.Returns an instance of a class implementing XAResourceRecordWrappingPlugin.Returns the class name of the XAResourceRecordWrappingPlugin implementation.Returns the set of XAResourceRecovery instances.Returns the set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it.boolean
If this is enabled we will tell the recovery module when we complete branches.boolean
If this returns true, a synchronization is registered by the CommitMarkableResourceRecord to delete records as soon as the transaction completes.boolean
Returns true if we would treat XAER_PROTO out of duplicate xar as an error.boolean
Returns true if subtransactions are allowed.boolean
Returns true if the listeners announcing of the change of the thread transaction association happens.boolean
Returns if XAResources that can't be recovered should be assumed to have completed.boolean
Deprecated.boolean
Returns if the transaction timeout is passed on to the enlisted XAResources.void
setAsyncCommitPoolSize
(int asyncCommitPoolSize) Sets maximum size of a thread pool, used to execute asynchronous commits.void
setCommitMarkableResourceJNDINames
(List<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/void
setCommitMarkableResourceRecordDeleteBatchSize
(int batchSize) Alter the default batch size or set to -1 to disable batch deletion of CommitMarkableResourceRecord from the database.void
setCommitMarkableResourceRecordDeleteBatchSizeMap
(Map<String, Integer> commitMarkableResourceRecordDeleteBatchSizeMap) Allow the default policy of a batch size to delete CommitMarkableResourceRecord from the database.void
setCommitMarkableResourceTableNameMap
(Map<String, String> commitMarkableResourceTableNameMap) Set the name of the table to use for storing commit markable resources commit state notifiers in.void
setDefaultCommitMarkableResourceTableName
(String commitMarkableResourceTableName) Set the name of the table to use for storing commit markable resources commit state notifiers in.void
Sets a Class to use as the marker interface for LastResourcevoid
setLastResourceOptimisationInterfaceClassName
(String lastResourceOptimisationInterfaceClassName) Sets the class name of the marker interface used to indicate a LastResource.void
setNotifyCommitMarkableResourceRecoveryModuleOfCompleteBranches
(boolean notifyCommitMarkableResourceRecoveryModuleOfCompleteBranches) Allow the default policy of whether to use a synchronization to remove the branch should be overriden.void
setOrphanSafetyInterval
(int orphanSafetyInterval) Set the amount of time to wait before deciding if the Xid is orphaned.void
setPerformImmediateCleanupOfCommitMarkableResourceBranches
(boolean performImmediateCleanupOfCommitMarkableResourceBranches) Notify the transaction manager to delete resource records immediately after a transaction commits.void
setPerformImmediateCleanupOfCommitMarkableResourceBranchesMap
(Map<String, Boolean> performImmediateCleanupOfCommitMarkableResourceBranchesMap) Allow the default policy of whether to use a synchronization to remove the branch should be overriden.void
setStrictJTA12DuplicateXAENDPROTOErr
(boolean strictJTA12DuplicateXAENDPROTOErr) Sets if to not allow non-JTA 1.2 XAR to return XAER_PROTO out of duplicate XAR xa_end callsvoid
setSupportSubtransactions
(boolean supportSubtransactions) Sets if subtransactions should be allowed.void
setTransactionManager
(jakarta.transaction.TransactionManager instance) Sets the instance of jakarta.transaction.TransactionManagervoid
setTransactionManagerClassName
(String transactionManagerClassName) Sets the class name of the jakarta.transaction.TransactionManager implementation.void
setTransactionManagerJNDIContext
(String transactionManagerJNDIContext) Sets the JNDI bind name for the implementation of TransactionManager.void
setTransactionSynchronizationRegistry
(jakarta.transaction.TransactionSynchronizationRegistry instance) Sets the instance of jakarta.transaction.TransactionSynchronizationRegistryvoid
setTransactionSynchronizationRegistryClassName
(String transactionSynchronizationRegistryClassName) Sets the class name of the jakarta.transaction.TransactionSynchronizationRegistry implementation.void
setTransactionSynchronizationRegistryJNDIContext
(String transactionSynchronizationRegistryJNDIContext) Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.void
setTransactionToThreadListenersEnabled
(boolean transactionToThreadListenersEnabled) Define if transaction to thread associtaion listeners should be enabled.void
setUserTransaction
(jakarta.transaction.UserTransaction instance) Sets the instance of jakarta.transaction.UserTransactionvoid
setUserTransactionClassName
(String userTransactionClassName) Sets the class name of the jakarta.transaction.UserTransaction implementation.void
setUserTransactionJNDIContext
(String userTransactionJNDIContext) Sets the JNDI bind name for the implementation of UserTransaction.void
setUserTransactionOperationsProviderClassName
(String providerClassName) Setting of class name that definesUserTransactionOperationsProvider
.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
setXaResourceIsSameRMClassNames
(List<String> xaResourceIsSameRMClassNames) Sets the class names of the XAResource types whose isSameRM method is overridden to return false.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
Sets the instance of XAResourceRecordWrappingPluginvoid
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) Deprecated.void
setXaTransactionTimeoutEnabled
(boolean xaTransactionTimeoutEnabled) Sets if the transaction timeout should be passed to the enlisted XAResource or not.
-
Constructor Details
-
JTAEnvironmentBean
public JTAEnvironmentBean()
-
-
Method Details
-
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 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
Returns the class name of the jakarta.transaction.TransactionManager implementation.Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple" Equivalent deprecated property: com.arjuna.ats.jta.transactionManagerClassName
- Specified by:
getTransactionManagerClassName
in interfaceJTAEnvironmentBeanMBean
- Returns:
- the name of the class implementing TransactionManager.
-
setTransactionManagerClassName
Sets the class name of the jakarta.transaction.TransactionManager implementation.- Parameters:
transactionManagerClassName
- the name of a class which implements TransactionManager.
-
getTransactionManager
public jakarta.transaction.TransactionManager getTransactionManager()Returns an instance of a class implementing jakarta.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 jakarta.transaction.TransactionManager implementation instance, or null.
-
setTransactionManager
public void setTransactionManager(jakarta.transaction.TransactionManager instance) Sets the instance of jakarta.transaction.TransactionManager- Parameters:
instance
- an Object that implements jakarta.transaction.TransactionManager, or null.
-
getUserTransactionClassName
Returns the class name of the jakarta.transaction.UserTransaction implementation.Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple" Equivalent deprecated property: com.arjuna.ats.jta.userTransactionClassName
- Specified by:
getUserTransactionClassName
in interfaceJTAEnvironmentBeanMBean
- Returns:
- the name of the class implementing jakarta.transaction.UserTransaction.
-
setUserTransactionClassName
Sets the class name of the jakarta.transaction.UserTransaction implementation.- Parameters:
userTransactionClassName
- the name of a class which implements jakarta.transaction.UserTransaction.
-
getUserTransaction
public jakarta.transaction.UserTransaction getUserTransaction()Returns an instance of a class implementing jakarta.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 jakarta.transaction.UserTransaction implementation instance, or null.
-
setUserTransaction
public void setUserTransaction(jakarta.transaction.UserTransaction instance) Sets the instance of jakarta.transaction.UserTransaction- Parameters:
instance
- an Object that implements jakarta.transaction.UserTransaction, or null.
-
getTransactionSynchronizationRegistryClassName
Returns the class name of the jakarta.transaction.TransactionSynchronizationRegistry implementation.Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple" Equivalent deprecated property: com.arjuna.ats.jta.transactionSynchronizationRegistryClassName
- Specified by:
getTransactionSynchronizationRegistryClassName
in interfaceJTAEnvironmentBeanMBean
- Returns:
- the name of the class implementing jakarta.transaction.TransactionSynchronizationRegistry.
-
setTransactionSynchronizationRegistryClassName
public void setTransactionSynchronizationRegistryClassName(String transactionSynchronizationRegistryClassName) Sets the class name of the jakarta.transaction.TransactionSynchronizationRegistry implementation.- Parameters:
transactionSynchronizationRegistryClassName
- the name of a class which implements TransactionSynchronizationRegistry.
-
getTransactionSynchronizationRegistry
public jakarta.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 jakarta.transaction.TransactionSynchronizationRegistry implementation instance, or null.
-
setTransactionSynchronizationRegistry
public void setTransactionSynchronizationRegistry(jakarta.transaction.TransactionSynchronizationRegistry instance) Sets the instance of jakarta.transaction.TransactionSynchronizationRegistry- Parameters:
instance
- an Object that implements jakarta.transaction.TransactionSynchronizationRegistry, or null.
-
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- the set of node identifiers for which to perform recovery.
-
setXaRecoveryNodes
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
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- the set of XAResourceRecovery implementations with their configuration data.
-
setXaResourceRecoveryClassNames
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
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
Sets the instances of XAResourceRecovery. The provided list will be copied, not retained.- Parameters:
xaResourceRecoveries
- the set of XAResourceRecovery instances.
-
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- a list of XAResourceOrphanFilter implementation class names.
-
setXaResourceOrphanFilterClassNames
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
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
Sets the instances of XAResourceOrphanFilter. The provided list will be copied, not retained.- Parameters:
xaResourceOrphanFilters
- the set of XAResourceOrphanFilter instances.
-
isXaRollbackOptimization
Deprecated.Deprecated: This method will be removed in the next major release
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- true for cleanup during prepare, false for cleanup during phase two rollback.
-
setXaRollbackOptimization
Deprecated.Deprecated This method will be removed in the next major release
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 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
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- the JNDI bind location for the UserTransaction interface.
-
setUserTransactionJNDIContext
Sets the JNDI bind name for the implementation of UserTransaction.- Parameters:
userTransactionJNDIContext
- the JNDI bind location for the UserTransaction interface.
-
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- the JNDI bind location for the TransactionManager interface.
-
setTransactionManagerJNDIContext
Sets the JNDI bind name for the implementation of TransactionManager.- Parameters:
transactionManagerJNDIContext
- the JNDI bind location for the TransactionManager interface.
-
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 interfaceJTAEnvironmentBeanMBean
- 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
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 interfaceJTAEnvironmentBeanMBean
- Returns:
- a set of class names, each an implementation of XAResourceMap.
-
setXaResourceMapClassNames
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
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
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 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
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 interfaceJTAEnvironmentBeanMBean
- 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
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
Sets a Class to use as the marker interface for LastResource- Parameters:
clazz
- a marker interface Class, or null.
-
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
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
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
Get the name of the table to use for storing commit markable resources commit state notifiers in.- Returns:
- the default table name
-
setDefaultCommitMarkableResourceTableName
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
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(Map<String, 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
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
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
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(Map<String, 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
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(Map<String, 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
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
Get class name that is used asUserTransactionOperationsProvider
- Returns:
- class name implementing
UserTransactionOperationsProvider
-
getUserTransactionOperationsProvider
public org.jboss.tm.usertx.UserTransactionOperationsProvider getUserTransactionOperationsProvider()Returning singleton instance ofUserTransactionOperationsProvider
instantiated 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
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
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.
-