[jboss-svn-commits] JBL Code SVN: r29150 - in labs/jbosstm/trunk: ArjunaJTA/jdbc/classes/com/arjuna/ats/jdbc/common and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Sep 2 10:35:12 EDT 2009
Author: jhalliday
Date: 2009-09-02 10:35:12 -0400 (Wed, 02 Sep 2009)
New Revision: 29150
Modified:
labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/common/TxojEnvironmentBean.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/jdbc/common/JDBCEnvironmentBean.java
labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java
Log:
Further EnvironmentBean javadoc. JBTM-596
Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/common/TxojEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/common/TxojEnvironmentBean.java 2009-09-02 14:32:56 UTC (rev 29149)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/common/TxojEnvironmentBean.java 2009-09-02 14:35:12 UTC (rev 29150)
@@ -38,77 +38,147 @@
private String propertiesFile = "";
private String lockStoreDir = System.getProperty("user.dir") + File.separator + "LockStore";
- private String lockStoreType;
+ private String lockStoreType = null;
private String multipleLockStore = null;
private String singleLockStore = TxOJNames.Implementation_LockStore_defaultStore().stringForm();
private boolean allowNestedLocking = true;
-// public static final String PROPERTIES_FILE = "com.arjuna.ats.txoj.common.propertiesFile";
+ /**
+ * Returns the name of the properties file.
+ *
+ * Default: ""
+ * Equivalent deprecated property: com.arjuna.ats.txoj.common.propertiesFile
+ *
+ * @return the name of the properties file
+ */
public String getPropertiesFile()
{
return propertiesFile;
}
+ /**
+ * Sets the name of the properties file.
+ *
+ * @param propertiesFile the name of the properties file.
+ */
public void setPropertiesFile(String propertiesFile)
{
this.propertiesFile = propertiesFile;
}
-// public static final String LOCKSTORE_DIR = "com.arjuna.ats.txoj.lockstore.lockStoreDir";
+ /**
+ * Returns the directory path used for storing persistent locks.
+ *
+ * Default: {user.dir}/LockStore
+ * Equivalent deprecated property: com.arjuna.ats.txoj.lockstore.lockStoreDir
+ *
+ * @return the path to the lock directory.
+ */
public String getLockStoreDir()
{
return lockStoreDir;
}
+ /**
+ * Sets the directory path to be used for storing persistent locks.
+ *
+ * @param lockStoreDir the path to the lock directory.
+ */
public void setLockStoreDir(String lockStoreDir)
{
this.lockStoreDir = lockStoreDir;
}
-// public static final String LOCKSTORE_TYPE = "com.arjuna.ats.txoj.lockstore.lockStoreType";
+ /**
+ * Returns the name of the lock store implementation.
+ *
+ * Default: null
+ * Equivalent deprecated property: com.arjuna.ats.txoj.lockstore.lockStoreType
+ *
+ * @deprecated I'm unused, remove me
+ * @return the name of the lock store implementation.
+ */
public String getLockStoreType()
{
return lockStoreType;
}
+ /**
+ * Sets the name of the lock store implementation.
+ *
+ * @param lockStoreType the name of the lock store implementation.
+ */
public void setLockStoreType(String lockStoreType)
{
this.lockStoreType = lockStoreType;
}
-// public static final String MULTIPLE_LOCKSTORE = "com.arjuna.ats.txoj.lockstore.multipleLockStore";
+ /**
+ * Returns the name of the multiple lock store implementation.
+ *
+ * Default: null
+ * Equivalent deprecated property: com.arjuna.ats.txoj.lockstore.multipleLockStore
+ *
+ * @return the name of the multiple lock store implementation.
+ */
public String getMultipleLockStore()
{
return multipleLockStore;
}
+ /**
+ * Sets the name of the multiple lock store implementation.
+ *
+ * @param multipleLockStore the name of the multiple lock store implementation.
+ */
public void setMultipleLockStore(String multipleLockStore)
{
this.multipleLockStore = multipleLockStore;
}
-// public static final String SINGLE_LOCKSTORE = "com.arjuna.ats.txoj.lockstore.singleLockStore";
+ /**
+ * Sets the name of the single lock store implementation.
+ *
+ * Default: "BasicLockStore" TODO test
+ * Equivalent deprecated property: com.arjuna.ats.txoj.lockstore.singleLockStore
+ *
+ * @return the name of the single lock store implementation.
+ */
public String getSingleLockStore()
{
return singleLockStore;
}
+ /**
+ * Sets the name of the single lock store implementation.
+ *
+ * @param singleLockStore the name of the single lock store implementation.
+ */
public void setSingleLockStore(String singleLockStore)
{
this.singleLockStore = singleLockStore;
}
-// public static final String ALLOW_NESTED_LOCKING = "com.arjuna.ats.txoj.lockstore.allowNestedLocking";
+ /**
+ * Returns if nested locking is allowed or not.
+ *
+ * Default: true
+ * Equivalent deprecated property: com.arjuna.ats.txoj.lockstore.allowNestedLocking
+ *
+ * @return true if nested locking is enabled, false otherwise.
+ */
public boolean isAllowNestedLocking()
{
return allowNestedLocking;
}
+ /**
+ * Sets if nested locking is allowed or not.
+ *
+ * @param allowNestedLocking true to enable, false to disable.
+ */
public void setAllowNestedLocking(boolean allowNestedLocking)
{
this.allowNestedLocking = allowNestedLocking;
}
-
-
-
}
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/jdbc/common/JDBCEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/jdbc/common/JDBCEnvironmentBean.java 2009-09-02 14:32:56 UTC (rev 29149)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/jdbc/common/JDBCEnvironmentBean.java 2009-09-02 14:35:12 UTC (rev 29150)
@@ -38,23 +38,47 @@
private int isolationLevel = Connection.TRANSACTION_SERIALIZABLE;
-// public static final String PROPERTIES_FILE = "com.arjuna.ats.jdbc.common.propertiesFile";
+ /**
+ * Returns the name of the properties file.
+ *
+ * Default: ""
+ * Equivalent deprecated property: com.arjuna.ats.jdbc.common.propertiesFile
+ *
+ * @return the name of the properties file
+ */
public String getPropertiesFile()
{
return propertiesFile;
}
+ /**
+ * Sets the name of the properties file.
+ *
+ * @param propertiesFile the name of the properties file.
+ */
public void setPropertiesFile(String propertiesFile)
{
this.propertiesFile = propertiesFile;
}
-// public static final String ISOLATION_LEVEL = "com.arjuna.ats.jdbc.isolationLevel";
+ /**
+ * Returns the default isolation level for tansactional database operations.
+ *
+ * Default: Connection.TRANSACTION_SERIALIZABLE
+ * Equivalent deprecated property: com.arjuna.ats.jdbc.isolationLevel"
+ *
+ * @return the default connection isolation level.
+ */
public int getIsolationLevel()
{
return isolationLevel;
}
+ /**
+ * Sets the default transaction isolation level for database operations.
+ *
+ * @param isolationLevel the default connection isolation level.
+ */
public void setIsolationLevel(int isolationLevel)
{
if(! (isolationLevel == Connection.TRANSACTION_READ_COMMITTED ||
Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java 2009-09-02 14:32:56 UTC (rev 29149)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java 2009-09-02 14:35:12 UTC (rev 29150)
@@ -69,77 +69,166 @@
private boolean xaTransactionTimeoutEnabled = true;
private String lastResourceOptimisationInterface = null;
-// public static final String PROPERTIES_FILE = "com.arjuna.ats.jta.common.propertiesFile";
+ /**
+ * Returns the name of the properties file.
+ *
+ * Default: ""
+ * Equivalent deprecated property: com.arjuna.ats.jta.common.propertiesFile
+ *
+ * @return the name of the properties file
+ */
public String getPropertiesFile()
{
return propertiesFile;
}
+ /**
+ * Sets the name of the properties file.
+ *
+ * @param propertiesFile the name of the properties file.
+ */
public void setPropertiesFile(String propertiesFile)
{
this.propertiesFile = propertiesFile;
}
-// public static final String SUPPORT_SUBTRANSACTIONS = "com.arjuna.ats.jta.supportSubtransactions";
+ /**
+ * 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
+ *
+ * @return true if subtransactions are enabled, false otherwise.
+ */
public boolean isSupportSubtransactions()
{
return supportSubtransactions;
}
+ /**
+ * Sets if subtransactions should be allowed.
+ *
+ * @param supportSubtransactions true to enable subtransactions, false to disable.
+ */
public void setSupportSubtransactions(boolean supportSubtransactions)
{
this.supportSubtransactions = supportSubtransactions;
}
-// public static final String JTA_TM_IMPLEMENTATION = "com.arjuna.ats.jta.jtaTMImplementation";
+ /**
+ * Returns the classname of the javax.transaction.TransactionManager implementation.
+ *
+ * Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"
+ * Equivalent deprecated property: com.arjuna.ats.jta.jtaTMImplementation
+ *
+ * @return the name of the class implementing TransactionManager.
+ */
public String getJtaTMImplementation()
{
return jtaTMImplementation;
}
+ /**
+ * Sets the classname of the javax.transaction.TransactionManager implementation.
+ *
+ * @param jtaTMImplementation the name of a class which implements TransactionManager.
+ */
public void setJtaTMImplementation(String jtaTMImplementation)
{
this.jtaTMImplementation = jtaTMImplementation;
}
-// public static final String JTA_UT_IMPLEMENTATION = "com.arjuna.ats.jta.jtaUTImplementation";
+ /**
+ * Returns the classname of the javax.transaction.UserTransaction implementation.
+ *
+ * Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"
+ * Equivalent deprecated property: com.arjuna.ats.jta.jtaUTImplementation
+ *
+ * @return the name of the class implementing javax.transaction.UserTransaction.
+ */
public String getJtaUTImplementation()
{
return jtaUTImplementation;
}
+ /**
+ * Sets the classname of the javax.transaction.UserTransaction implementation.
+ *
+ * @param jtaUTImplementation the name of a class which implements UserTransaction.
+ */
public void setJtaUTImplementation(String jtaUTImplementation)
{
this.jtaUTImplementation = jtaUTImplementation;
}
-// public static final String JTA_TSR_IMPLEMENTATION = "com.arjuna.ats.jta.jtaTSRImplementation";
+ /**
+ * Returns the classname of the javax.transaction.TransactionSynchronizationRegistry implementation.
+ *
+ * Default: "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple"
+ * Equivalent deprecated property: com.arjuna.ats.jta.jtaTSRImplementation
+ *
+ * @return the name of the class implementing javax.transaction.TransactionSynchronizationRegistry.
+ */
public String getJtaTSRImplementation()
{
return jtaTSRImplementation;
}
+ /**
+ * Sets the classname of the javax.transaction.TransactionSynchronizationRegistry implementation.
+ *
+ * @param jtaTSRImplementation the name of a class which implements TransactionSynchronizationRegistry.
+ */
public void setJtaTSRImplementation(String jtaTSRImplementation)
{
this.jtaTSRImplementation = jtaTSRImplementation;
}
-// public static final String XA_BACKOFF_PERIOD = "com.arjuna.ats.jta.xaBackoffPeriod";
+ /**
+ * Returns the XA backoff period, in milliseconds.
+ *
+ * Default: 20000 milliseconds
+ * Equivalent deprecated property: com.arjuna.ats.jta.xaBackoffPeriod
+ *
+ * @deprecated I'm not unsed, remove me.
+ * @return the XA backoff period, in milliseconds.
+ */
public int getXaBackoffPeriod()
{
return xaBackoffPeriod;
}
+ /**
+ * Sets the XA backoff period, in milliseconds.
+ *
+ * @param xaBackoffPeriod the XA backoff period, in milliseconds.
+ */
public void setXaBackoffPeriod(int xaBackoffPeriod)
{
this.xaBackoffPeriod = xaBackoffPeriod;
}
+ /**
+ * 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
+ *
+ * @return the set of node identifiers for which to perform recovery.
+ */
public List<String> getXaRecoveryNodes()
{
return new ArrayList<String>(xaRecoveryNodes);
}
+ /**
+ * Sets the node identifiers for which recovery will be performed.
+ * The provided list will be copied, not retained.
+ *
+ * @param xaRecoveryNodes the set of node identifiers for which to perform recovery.
+ */
public void setXaRecoveryNodes(List<String> xaRecoveryNodes)
{
if(xaRecoveryNodes == null) {
@@ -149,11 +238,28 @@
}
}
+ /**
+ * Returns the set of XAResourceRecovery implementation classnames,
+ * each of which may have configuration data appended to it.
+ * The returned list is a copy. May return an empty list, will not return null.
+ *
+ * Default: empty list.
+ * Equivalent deprecated property prefix: com.arjuna.ats.jta.recovery.XAResourceRecovery
+ *
+ * @return the set of XAResourceRecovery implementations with their configuration data.
+ */
public List<String> getXaResourceRecoveryInstances()
{
return new ArrayList<String>(xaResourceRecoveryInstances);
}
+ /**
+ * Sets the XAResourceRecovery implementations that will be used,
+ * each optionally including trailing configuration data.
+ * The provided list will be copied, not retained.
+ *
+ * @param xaResourceRecoveryInstances the XAResourceRecovery implementaion classnames and configuration.
+ */
public void setXaResourceRecoveryInstances(List<String> xaResourceRecoveryInstances)
{
if(xaResourceRecoveryInstances == null) {
@@ -163,92 +269,194 @@
}
}
- // public static final String XA_ROLLBACK_OPTIMIZATION = "com.arjuna.ats.jta.xaRollbackOptimization";
+ /**
+ * 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
+ *
+ * @return true for cleanup during prepare, false for cleanup during phase two rollback.
+ */
public boolean isXaRollbackOptimization()
{
return xaRollbackOptimization;
}
+ /**
+ * Sets if failed resources should be cleaned up during prepare or during phase two.
+ *
+ * @param xaRollbackOptimization true for immediate cleanup, false for phase two cleanup.
+ */
public void setXaRollbackOptimization(boolean xaRollbackOptimization)
{
this.xaRollbackOptimization = xaRollbackOptimization;
}
-// public static final String XA_ASSUME_RECOVERY_COMPLETE = "com.arjuna.ats.jta.xaAssumeRecoveryComplete";
+ /**
+ * 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
+ *
+ * @return true for assumed completion, false for no such assumption.
+ */
public boolean isXaAssumeRecoveryComplete()
{
return xaAssumeRecoveryComplete;
}
+ /**
+ * Sets if XAResources that can't be recovered should be assumed to have completed.
+ *
+ * @param xaAssumeRecoveryComplete true to enable completion assumption, false to disable.
+ */
public void setXaAssumeRecoveryComplete(boolean xaAssumeRecoveryComplete)
{
this.xaAssumeRecoveryComplete = xaAssumeRecoveryComplete;
}
-// public static final String UT_JNDI_CONTEXT = "com.arjuna.ats.jta.utils.UTJNDIContext";
+ /**
+ * Returns the JNDI bind name for the implementation of UserTransaction.
+ *
+ * Default: "java:/UserTransaction"
+ * Equivalent deprecated property: com.arjuna.ats.jta.utils.UTJNDIContext
+ *
+ * @return the JNDI bind location for the UserTransaction interface.
+ */
public String getJtaUTJNDIContext()
{
return jtaUTJNDIContext;
}
+ /**
+ * Sets the JNDI bind name for the implementation of UserTransaction.
+ *
+ * @param jtaUTJNDIContext the JNDI bind location for the UserTransaction interface.
+ */
public void setJtaUTJNDIContext(String jtaUTJNDIContext)
{
this.jtaUTJNDIContext = jtaUTJNDIContext;
}
-// public static final String TM_JNDI_CONTEXT = "com.arjuna.ats.jta.utils.TMJNDIContext";
+ /**
+ * Returns the JNDI bind name for the implementation of TransactionManager.
+ *
+ * Default: "java:/TransactionManager"
+ * Equivalent deprecated property: com.arjuna.ats.jta.utils.TMJNDIContext
+ *
+ * @return the JNDI bind location for the TransactionManager interface.
+ */
public String getJtaTMJNDIContext()
{
return jtaTMJNDIContext;
}
+ /**
+ * Sets the JNDI bind name for the implementation of TransactionManager.
+ *
+ * @param jtaTMJNDIContext the JNDI bind location for the TransactionManager interface.
+ */
public void setJtaTMJNDIContext(String jtaTMJNDIContext)
{
this.jtaTMJNDIContext = jtaTMJNDIContext;
}
-// public static final String TSR_JNDI_CONTEXT = "com.arjuna.ats.jta.utils.TSRJNDIContext";
+ /**
+ * Returns the JNDI bind name for the implementation of TransactionSynchronizationRegistry.
+ *
+ * Default: "java:/TransactionSynchronizationRegistry"
+ * Equivalent deprecated property: com.arjuna.ats.jta.utils.TSRJNDIContext
+ *
+ * @return the JNDI bind location for the TransactionSynchronizationRegistry interface.
+ */
public String getJtaTSRJNDIContext()
{
return jtaTSRJNDIContext;
}
+ /**
+ * Sets tje JNDI bind name for the implementation of TransactionSynchronizationRegistry.
+ *
+ * @param jtaTSRJNDIContext the JNDI bind location for the TransactionSynchronizationRegistry implementation.
+ */
public void setJtaTSRJNDIContext(String jtaTSRJNDIContext)
{
this.jtaTSRJNDIContext = jtaTSRJNDIContext;
}
+ /**
+ * Returns the set of XAResourceMap implementation classnames used to configure XAException handling.
+ * The returned list is a copy. May return an empty list, will not return null.
+ *
+ * Default: empty list.
+ * Equivalent deprecated property prefix: com.arjuna.ats.jta.xaErrorHandler
+ *
+ * @return a set of classnames, each an implementation of XAResourceMap.
+ */
public List<String> getXaErrorHandlers()
{
return new ArrayList<String>(xaErrorHandlers);
}
+ /**
+ * Sets the names of the XAResourceMap classes used for XAException handling.
+ * The provided list will be copied, not retained.
+ *
+ * @param xaErrorHandlers a set of names of classes, each implementing XAResourceMap.
+ */
public void setXaErrorHandlers(List<String> xaErrorHandlers)
{
if(xaErrorHandlers == null) {
this.xaErrorHandlers = new ArrayList<String>();
} else {
- this.xaErrorHandlers = new ArrayList(xaErrorHandlers);
+ this.xaErrorHandlers = new ArrayList<String>(xaErrorHandlers);
}
}
- // public static final String XA_TRANSACTION_TIMEOUT_ENABLED = "com.arjuna.ats.jta.xaTransactionTimeoutEnabled";
+ /**
+ * Returns if the transaction timeout is passed on to the enlisted XAResources.
+ *
+ * Default: true.
+ * Equivalent deprecated property: com.arjuna.ats.jta.xaTransactionTimeoutEnabled
+ *
+ * @return true to pass transaction timeout configuration on to the XAResources, false to skip setting resource timeout.
+ */
public boolean isXaTransactionTimeoutEnabled()
{
return xaTransactionTimeoutEnabled;
}
+ /**
+ * Sets if the transaction timeout should be passed to the enlisted XAResource or not.
+ *
+ * @param xaTransactionTimeoutEnabled true to enable setting XAResource timeouts, false to disable.
+ */
public void setXaTransactionTimeoutEnabled(boolean xaTransactionTimeoutEnabled)
{
this.xaTransactionTimeoutEnabled = xaTransactionTimeoutEnabled;
}
-// public static final String LAST_RESOURCE_OPTIMISATION_INTERFACE = "com.arjuna.ats.jta.lastResourceOptimisationInterface";
+ /**
+ * Returns the classname of the marker interface used to indicate a LastResource.
+ *
+ * Default: null.
+ * Equivalent deprecated property: com.arjuna.ats.jta.lastResourceOptimisationInterface
+ *
+ * @return the classname of the market interface for LastResource handling.
+ */
public String getLastResourceOptimisationInterface()
{
return lastResourceOptimisationInterface;
}
+ /**
+ * Sets the classname of the marker interface used to indicate a LastResource.
+ *
+ * @param lastResourceOptimisationInterface the classname of the marker interface.
+ */
public void setLastResourceOptimisationInterface(String lastResourceOptimisationInterface)
{
this.lastResourceOptimisationInterface = lastResourceOptimisationInterface;
More information about the jboss-svn-commits
mailing list