com.arjuna.ats.jts.common
Class JTSEnvironmentBean

java.lang.Object
  extended by com.arjuna.ats.jts.common.JTSEnvironmentBean
All Implemented Interfaces:
JTSEnvironmentBeanMBean

public class JTSEnvironmentBean
extends java.lang.Object
implements JTSEnvironmentBeanMBean

A JavaBean containing configuration properties for the JTS system.

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

Constructor Summary
JTSEnvironmentBean()
           
 
Method Summary
 int getAssumedObjectNotExist()
          Deprecated. I apply to Orbix only - remove me.
 int getCommitedTransactionRetryLimit()
          Returns the number of attempts to make to notify resources of a transaction commit during recovery.
 java.lang.String getContextPropMode()
          Returns the name of the context propagation mode.
 int getDefaultTimeout()
          Deprecated. use the Coordinator one instead.
 java.lang.String getInterposition()
          Returns the Xid format interposition strategy.
 java.lang.String getPropertiesFile()
          Returns the name of the properties file.
 java.lang.String getRecoveryManagerAddress()
          Returns the hostname on which the recovery manager will bind.
 int getRecoveryManagerPort()
          Returns the port number on which the recovery manager will listen.
 boolean isAlwaysPropagateContext()
          Returns if a transaction context should always be propagated on remote calls.
 boolean isCheckedTransactions()
          Returns if checked transactions should be used.
 boolean isIssueRecoveryRollback()
          Returns if resources will have rollback invoked explicitly on them by recovery.
 boolean isNeedTranContext()
          Returns if transaction context interceptors will require a context to be present.
 boolean isPropagateTerminator()
          Returns if a reference to the terminator should be included in the propagation context.
 boolean isSupportInterposedSynchronization()
          Returns if Synchronizations can be interposed i.e.
 boolean isSupportRollbackSync()
          Returns if Synchronizations should be fired on transaction rollback.
 boolean isSupportSubtransactions()
          Returns if subtransactions should be used in the JTS.
 boolean isTimeoutPropagation()
          Returns if the timeout value sent should be the time remaining or not.
 boolean isTransactionManager()
          Returns if an extenal transaction manager process should be used.
 void setAlwaysPropagateContext(boolean alwaysPropagateContext)
          Sets if a transaction context should always be propagated on remote calls.
 void setAssumedObjectNotExist(int assumedObjectNotExist)
          Sets the number of transient errors to allow before assuming an object is permanently unreachable.
 void setCheckedTransactions(boolean checkedTransactions)
          Sets if checked transactions should be used.
 void setCommitedTransactionRetryLimit(int commitedTransactionRetryLimit)
          Sets the number of attempts to make to notify resource of a transaction commit during recovery.
 void setContextPropMode(java.lang.String contextPropMode)
          Sets the name of the context propagation mode.
 void setDefaultTimeout(int defaultTimeout)
          Sets the default lifetime after which a transaction may be considered for timeout, in seconds.
 void setInterposition(java.lang.String interposition)
          Sets the Xid format interposition strategy.
 void setIssueRecoveryRollback(boolean issueRecoveryRollback)
          Sets if resources will have rollback invoked explicitly on them by recovery.
 void setNeedTranContext(boolean needTranContext)
          Sets if transaction context interceptors will require a context to be present.
 void setPropagateTerminator(boolean propagateTerminator)
          Sets if a reference to the terminator should be included in the propagation context.
 void setPropertiesFile(java.lang.String propertiesFile)
          Sets the name of the properties file.
 void setRecoveryManagerAddress(java.lang.String recoveryManagerAddress)
          Sets the hostname on which the recovery manager will bind.
 void setRecoveryManagerInetAddress(java.net.InetAddress inetAddress)
          Sets the InetAddress on which the recovery manager should bind.
 void setRecoveryManagerPort(int recoveryManagerPort)
          Sets the port number on which the recovery manager will listen.
 void setSupportInterposedSynchronization(boolean supportInterposedSynchronization)
          Sets if Synchronizations can be interposed.
 void setSupportRollbackSync(boolean supportRollbackSync)
          Sets if Synchronizations will be fired on transaction rollback.
 void setSupportSubtransactions(boolean supportSubtransactions)
          Sets if subtransactions are allowed in the JTS.
 void setTimeoutPropagation(boolean timeoutPropagation)
          Sets if the timeout value propagated should be time remaining or not.
 void setTransactionManager(boolean transactionManager)
          Sets if an external transaction manager process should be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTSEnvironmentBean

public JTSEnvironmentBean()
Method Detail

getPropertiesFile

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

Specified by:
getPropertiesFile in interface JTSEnvironmentBeanMBean
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 JTSEnvironmentBeanMBean
Parameters:
propertiesFile - the name of the properties file.

isTransactionManager

public boolean isTransactionManager()
Returns if an extenal transaction manager process should be used. Default: false Equivalent deprecated property: com.arjuna.ats.jts.transactionManager

Specified by:
isTransactionManager in interface JTSEnvironmentBeanMBean
Returns:
true for separate transaction manaager process, false for in-process.

setTransactionManager

public void setTransactionManager(boolean transactionManager)
Sets if an external transaction manager process should be used.

Specified by:
setTransactionManager in interface JTSEnvironmentBeanMBean
Parameters:
transactionManager - true to enable use of a separate transaction manager, false to disable.

isNeedTranContext

public boolean isNeedTranContext()
Returns if transaction context interceptors will require a context to be present. Default: false Equivalent deprecated property: com.arjuna.ats.jts.needTranContext

Specified by:
isNeedTranContext in interface JTSEnvironmentBeanMBean
Returns:
true if context is required, false for optional context.

setNeedTranContext

public void setNeedTranContext(boolean needTranContext)
Sets if transaction context interceptors will require a context to be present.

Specified by:
setNeedTranContext in interface JTSEnvironmentBeanMBean
Parameters:
needTranContext - true to require a transaction context, false if it is optional.

isAlwaysPropagateContext

public boolean isAlwaysPropagateContext()
Returns if a transaction context should always be propagated on remote calls. Default: false Equivalent deprecated property: com.arjuna.ats.jts.alwaysPropagateContext

Specified by:
isAlwaysPropagateContext in interface JTSEnvironmentBeanMBean
Returns:
true to always propagate, false to propagate selectively.

setAlwaysPropagateContext

public void setAlwaysPropagateContext(boolean alwaysPropagateContext)
Sets if a transaction context should always be propagated on remote calls.

Specified by:
setAlwaysPropagateContext in interface JTSEnvironmentBeanMBean
Parameters:
alwaysPropagateContext - true to always propagate, false to propagate selectively.

getInterposition

public java.lang.String getInterposition()
Returns the Xid format interposition strategy. Default: null Equivalent deprecated property: com.arjuna.ats.jts.interposition

Specified by:
getInterposition in interface JTSEnvironmentBeanMBean
Returns:
the name of the interposition implementation.

setInterposition

public void setInterposition(java.lang.String interposition)
Sets the Xid format interposition strategy.

Specified by:
setInterposition in interface JTSEnvironmentBeanMBean
Parameters:
interposition - the name of the interposition implementation.

isCheckedTransactions

public boolean isCheckedTransactions()
Returns if checked transactions should be used. Default: false Equivalent deprecated property: com.arjuna.ats.jts.checkedTransactions

Specified by:
isCheckedTransactions in interface JTSEnvironmentBeanMBean
Returns:
true if checked transactions are enabled, false otherwise.

setCheckedTransactions

public void setCheckedTransactions(boolean checkedTransactions)
Sets if checked transactions should be used.

Specified by:
setCheckedTransactions in interface JTSEnvironmentBeanMBean
Parameters:
checkedTransactions - true to enable checked transactions, false to disable.

isSupportSubtransactions

public boolean isSupportSubtransactions()
Returns if subtransactions should be used in the JTS. Note that this is distinct from the JTA module subtransaction option. Default: true Equivalent deprecated property: com.arjuna.ats.jts.supportSubtransactions

Specified by:
isSupportSubtransactions in interface JTSEnvironmentBeanMBean
Returns:
true if subtransactions are allowed, false otherwise.

setSupportSubtransactions

public void setSupportSubtransactions(boolean supportSubtransactions)
Sets if subtransactions are allowed in the JTS.

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

isSupportRollbackSync

public boolean isSupportRollbackSync()
Returns if Synchronizations should be fired on transaction rollback. Note: this is distinct from the coordinator's beforeCompletionWhenRollbackOnly option. Default: true Equivalent deprecated property: com.arjuna.ats.jts.supportRollbackSync

Specified by:
isSupportRollbackSync in interface JTSEnvironmentBeanMBean
Returns:
true if Synchronizations will run on transaction rollback, false if they will be skipped.

setSupportRollbackSync

public void setSupportRollbackSync(boolean supportRollbackSync)
Sets if Synchronizations will be fired on transaction rollback.

Specified by:
setSupportRollbackSync in interface JTSEnvironmentBeanMBean
Parameters:
supportRollbackSync - true to enable Synchronizations on rollback transactions, false to disable.

isSupportInterposedSynchronization

public boolean isSupportInterposedSynchronization()
Returns if Synchronizations can be interposed i.e. registered direct with the parent coordinator. Default: false Equivalent deprecated property: com.arjuna.ats.jts.supportInterposedSynchronization

Specified by:
isSupportInterposedSynchronization in interface JTSEnvironmentBeanMBean
Returns:
true for interposed (remote) Synchronization handling, false for local handling.

setSupportInterposedSynchronization

public void setSupportInterposedSynchronization(boolean supportInterposedSynchronization)
Sets if Synchronizations can be interposed.

Specified by:
setSupportInterposedSynchronization in interface JTSEnvironmentBeanMBean
Parameters:
supportInterposedSynchronization - true to enable interposition of synchronizations, false to disable.

getDefaultTimeout

public int getDefaultTimeout()
Deprecated. use the Coordinator one instead.

Returns the default interval after which a transaction may be considered for timeout, in seconds. Note: depending on the reaper mode and workload, transactions may not be timed out immediately. Default: 60 Equivalent deprecated property: com.arjuna.ats.jts.defaultTimeout

Specified by:
getDefaultTimeout in interface JTSEnvironmentBeanMBean
Returns:
the default transaction lifetime, in seconds.

setDefaultTimeout

public void setDefaultTimeout(int defaultTimeout)
Sets the default lifetime after which a transaction may be considered for timeout, in seconds.

Specified by:
setDefaultTimeout in interface JTSEnvironmentBeanMBean
Parameters:
defaultTimeout - the default transaction lifetime, in seconds.

isPropagateTerminator

public boolean isPropagateTerminator()
Returns if a reference to the terminator should be included in the propagation context. Default: false Equivalent deprecated property: com.arjuna.ats.jts.propagateTerminator

Specified by:
isPropagateTerminator in interface JTSEnvironmentBeanMBean
Returns:
true if the terminator should be propagated, false otherwise.

setPropagateTerminator

public void setPropagateTerminator(boolean propagateTerminator)
Sets if a reference to the terminator should be included in the propagation context.

Specified by:
setPropagateTerminator in interface JTSEnvironmentBeanMBean
Parameters:
propagateTerminator - true to enable propagation of the terminator, false to disable.

getContextPropMode

public java.lang.String getContextPropMode()
Returns the name of the context propagation mode. "CONTEXT" or "NONE" Default: null Equivalent deprecated property: com.arjuna.ats.jts.contextPropMode

Specified by:
getContextPropMode in interface JTSEnvironmentBeanMBean
Returns:
the name of the context propagation mode.

setContextPropMode

public void setContextPropMode(java.lang.String contextPropMode)
Sets the name of the context propagation mode.

Specified by:
setContextPropMode in interface JTSEnvironmentBeanMBean
Parameters:
contextPropMode - the name of the context propagation mode.

getRecoveryManagerPort

public int getRecoveryManagerPort()
Returns the port number on which the recovery manager will listen. Default: 4711 Equivalent deprecated property: com.arjuna.ats.jts.recoveryManagerPort

Specified by:
getRecoveryManagerPort in interface JTSEnvironmentBeanMBean
Returns:
the port number used by the recovery manager.

setRecoveryManagerPort

public void setRecoveryManagerPort(int recoveryManagerPort)
Sets the port number on which the recovery manager will listen.

Specified by:
setRecoveryManagerPort in interface JTSEnvironmentBeanMBean
Parameters:
recoveryManagerPort - the port number to use for the recovery manager.

getRecoveryManagerAddress

public java.lang.String getRecoveryManagerAddress()
Returns the hostname on which the recovery manager will bind. Default: "" Equivalent deprecated property: com.arjuna.ats.jts.recoveryManagerAddress

Specified by:
getRecoveryManagerAddress in interface JTSEnvironmentBeanMBean
Returns:
the hostname used by the recovery manager.

setRecoveryManagerAddress

public void setRecoveryManagerAddress(java.lang.String recoveryManagerAddress)
Sets the hostname on which the recovery manager will bind.

Specified by:
setRecoveryManagerAddress in interface JTSEnvironmentBeanMBean
Parameters:
recoveryManagerAddress - the hostname to use for the recovery manager.

setRecoveryManagerInetAddress

public void setRecoveryManagerInetAddress(java.net.InetAddress inetAddress)
Sets the InetAddress on which the recovery manager should bind. Mainly intended for use by strongly typed bean injection systems, this is a wrapper around the String form of the method.

Parameters:
inetAddress -

isTimeoutPropagation

public boolean isTimeoutPropagation()
Returns if the timeout value sent should be the time remaining or not. true for OTS 1.2 (time remaining), false for backwards compatible (total time) Default: true Equivalent deprecated property: com.arjuna.ats.jts.ots_1_0.timeoutPropagation

Specified by:
isTimeoutPropagation in interface JTSEnvironmentBeanMBean
Returns:
true for remaining time propagation, false for total time propagation.

setTimeoutPropagation

public void setTimeoutPropagation(boolean timeoutPropagation)
Sets if the timeout value propagated should be time remaining or not.

Specified by:
setTimeoutPropagation in interface JTSEnvironmentBeanMBean
Parameters:
timeoutPropagation - true for OTS 1.2 behaviour, false for backwards compatible.

isIssueRecoveryRollback

public boolean isIssueRecoveryRollback()
Returns if resources will have rollback invoked explicitly on them by recovery. Default: true Equivalent deprecated property: com.arjuna.ats.jts.recovery.issueRecoveryRollback

Specified by:
isIssueRecoveryRollback in interface JTSEnvironmentBeanMBean
Returns:
true for explicit rollback by recovery, false to skip this.

setIssueRecoveryRollback

public void setIssueRecoveryRollback(boolean issueRecoveryRollback)
Sets if resources will have rollback invoked explicitly on them by recovery.

Specified by:
setIssueRecoveryRollback in interface JTSEnvironmentBeanMBean
Parameters:
issueRecoveryRollback - true to enable explicit rollback, false to disable.

getCommitedTransactionRetryLimit

public int getCommitedTransactionRetryLimit()
Returns the number of attempts to make to notify resources of a transaction commit during recovery. Default: 3 Equivalent deprecated property: com.arjuna.ats.jts.recovery.commitTransactionRetryLimit

Specified by:
getCommitedTransactionRetryLimit in interface JTSEnvironmentBeanMBean
Returns:
the number of communication attempts to make.

setCommitedTransactionRetryLimit

public void setCommitedTransactionRetryLimit(int commitedTransactionRetryLimit)
Sets the number of attempts to make to notify resource of a transaction commit during recovery.

Specified by:
setCommitedTransactionRetryLimit in interface JTSEnvironmentBeanMBean
Parameters:
commitedTransactionRetryLimit - the number of communication attempts to make.

getAssumedObjectNotExist

public int getAssumedObjectNotExist()
Deprecated. I apply to Orbix only - remove me.

Returns the number of transient errors to allow before assuming an unreachable object is permanently gone. Default: 10 Equivalent deprecated property: com.arjuna.ats.jts.recovery.assumedObjectNotExist

Specified by:
getAssumedObjectNotExist in interface JTSEnvironmentBeanMBean
Returns:
the nubmer of transient errors to allow.

setAssumedObjectNotExist

public void setAssumedObjectNotExist(int assumedObjectNotExist)
Sets the number of transient errors to allow before assuming an object is permanently unreachable.

Specified by:
setAssumedObjectNotExist in interface JTSEnvironmentBeanMBean
Parameters:
assumedObjectNotExist - the number of attempts to allow.