[jboss-svn-commits] JBL Code SVN: r29046 - in labs/jbosstm/trunk: common/classes/com/arjuna/common/internal/util/logging and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 25 08:39:22 EDT 2009


Author: jhalliday
Date: 2009-08-25 08:39:22 -0400 (Tue, 25 Aug 2009)
New Revision: 29046

Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoordinatorEnvironmentBean.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java
   labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LoggingEnvironmentBean.java
   labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/simple/EnvironmentBeanTest.java
Log:
Additional bean config work, mainly javadocs. JBTM-596


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoordinatorEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoordinatorEnvironmentBean.java	2009-08-25 12:22:28 UTC (rev 29045)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoordinatorEnvironmentBean.java	2009-08-25 12:39:22 UTC (rev 29046)
@@ -68,245 +68,515 @@
     private String checkedActionFactory = null;
 
 
-    //    public static final String ACTION_STORE= "com.arjuna.ats.arjuna.coordinator.actionStore";
+    /**
+     * Returns the symbolic name for the action store type.
+     *
+     * Default: "HashedActionStore"
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.actionStore
+     *
+     * @return the action store name.
+     */
     public String getActionStore()
     {
         return actionStore;
     }
 
+    /**
+     * Sets the symbolic name of the action store.
+     *
+     * @param actionStore the action store name.
+     */
     public void setActionStore(String actionStore)
     {
         this.actionStore = actionStore;
     }
 
-//    public static final String ASYNC_COMMIT = "com.arjuna.ats.arjuna.coordinator.asyncCommit";
+    /**
+     * Returns true if anynchronous commit behaviour is enabled.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncCommit
+     *
+     * @return true if asynchronous commit is enabled, value otherwise.
+     */
     public boolean isAsyncCommit()
     {
         return asyncCommit;
     }
 
+    /**
+     * Sets if asynchronous commit behaviour should be enabled or not.
+     * Note: heuristics cannot be reported programatically if asynchronous commit is used.
+     *
+     * @param asyncCommit true to enable asynchronous commit, false to disable.
+     */
     public void setAsyncCommit(boolean asyncCommit)
     {
         this.asyncCommit = asyncCommit;
     }
 
-//    public static final String ASYNC_PREPARE = "com.arjuna.ats.arjuna.coordinator.asyncPrepare";
+    /**
+     * Returns true if asynchronous prepare behaviour is enabled.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncPrepare
+     *
+     * @return true if asynchronous prepare is enabled, false otherwise.
+     */
     public boolean isAsyncPrepare()
     {
         return asyncPrepare;
     }
 
+    /**
+     * Sets if asynchronous prepare behaviour should be enabled or not.
+     *
+     * @param asyncPrepare true to enable asynchronous prepare, false to disable.
+     */
     public void setAsyncPrepare(boolean asyncPrepare)
     {
         this.asyncPrepare = asyncPrepare;
     }
 
-//    public static final String ASYNC_ROLLBACK = "com.arjuna.ats.arjuna.coordinator.asyncRollback";
+    /**
+     * Returns true if asynchronous rollback behaviour is enabled.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncRollback
+     *
+     * @return true if asynchronous rollback is enabled, false otherwise.
+     */
     public boolean isAsyncRollback()
     {
         return asyncRollback;
     }
 
+    /**
+     * Sets if asynchronous rollback behaviour should be enabled or not.
+     *
+     * @param asyncRollback true to enable asynchronous rollback, false to disable.
+     */
     public void setAsyncRollback(boolean asyncRollback)
     {
         this.asyncRollback = asyncRollback;
     }
 
-//    public static final String COMMIT_ONE_PHASE = "com.arjuna.ats.arjuna.coordinator.commitOnePhase";
+    /**
+     * Returns true if one phase commit optimization is to be used.
+     *
+     * Default: true
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.commitOnePhase
+     *
+     * @return true if one phase commit is enabled, false otherwise.
+     */
     public boolean isCommitOnePhase()
     {
         return commitOnePhase;
     }
 
+    /**
+     * Sets if one phase commit behaviour is enabled or not.
+     *
+     * @param commitOnePhase true to enable, false to disable.
+     */
     public void setCommitOnePhase(boolean commitOnePhase)
     {
         this.commitOnePhase = commitOnePhase;
     }
 
-//    public static final String MAINTAIN_HEURISTICS = "com.arjuna.ats.arjuna.coordinator.maintainHeuristics";
+    /**
+     * Returns true if heuristic outcomes should be recorded.
+     *
+     * Default: true
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.maintainHeuristics
+     *
+     * @return true if heuristics should be recorded, false otherwise.
+     */
     public boolean isMaintainHeuristics()
     {
         return maintainHeuristics;
     }
 
+    /**
+     * Sets if heuristics should be recorded or not.
+     *
+     * @param maintainHeuristics true to enable recording of heuristics, false to disable.
+     */
     public void setMaintainHeuristics(boolean maintainHeuristics)
     {
         this.maintainHeuristics = maintainHeuristics;
     }
 
-//    public static final String TRANSACTION_LOG = "com.arjuna.ats.arjuna.coordinator.transactionLog";
+    /**
+     * Returns true if the transaction log should be distinct from the action store.
+     * 
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.transactionLog
+     *
+     * @return true for separate transaction log, false otherwise.
+     */
     public boolean isTransactionLog()
     {
         return transactionLog;
     }
 
+    /**
+     * Sets if the transaction log should be distinct from the action store.
+     *
+     * @param transactionLog true for sepatate store, false to disable.
+     */
     public void setTransactionLog(boolean transactionLog)
     {
         this.transactionLog = transactionLog;
     }
 
 
-
-//    public static final String TRANSACTION_LOG_WRITE_OPTIMISATION = "com.arjuna.ats.arjuna.coordinator.transactionLog.writeOptimisation";
+    /**
+     * Returns true if write optimisation protocol should be used for PersistenceRecord.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.transactionLog.writeOptimisation
+     *
+     * @return true if write optimisation is enabled, false otherwise.
+     */
     public boolean isWriteOptimisation()
     {
         return writeOptimisation;
     }
 
+    /**
+     * Sets if write optimization protocol should be used for PersistenceRecord.
+     *
+     * @param writeOptimisation true to enable write optimization, false to disable.
+     */
     public void setWriteOptimisation(boolean writeOptimisation)
     {
         this.writeOptimisation = writeOptimisation;
     }
 
-//    public static final String READONLY_OPTIMISATION = "com.arjuna.ats.arjuna.coordinator.readonlyOptimisation";
+    /**
+     * Returns true if handling of read only resources should be optimized.
+     *
+     * Default: true
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.readonlyOptimisation
+     *
+     * @return true if read only optimization is enabled, false otherwise.
+     */
     public boolean isReadonlyOptimisation()
     {
         return readonlyOptimisation;
     }
 
+    /**
+     * Sets if handling of read only resources should be optimized.
+     *
+     * @param readonlyOptimisation true to enable read only optimization, false to disable.
+     */
     public void setReadonlyOptimisation(boolean readonlyOptimisation)
     {
         this.readonlyOptimisation = readonlyOptimisation;
     }
 
-//    public static final String CLASSIC_PREPARE = "com.arjuna.ats.arjuna.coordinator.classicPrepare";
+    /**
+     * Returns true if the old sytle of prepare handling should be used for PersistenceRecord.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.classicPrepare
+     *
+     * @return true is classic prepare handling is enabled, false otherwise.
+     */
     public boolean isClassicPrepare()
     {
         return classicPrepare;
     }
 
+    /**
+     * Sets if old sytle prepare handling should be used for PersistenceRecord.
+     *
+     * @param classicPrepare true to enable classic prepare handling, false to disable.
+     */
     public void setClassicPrepare(boolean classicPrepare)
     {
         this.classicPrepare = classicPrepare;
     }
 
-//    public static final String ENABLE_STATISTICS = "com.arjuna.ats.arjuna.coordinator.enableStatistics";
+    /**
+     * Returns true if transaction statistics should be recorded.
+     * Note: Enabling statistics may have a slight performance impact due to locking on the counter variables.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.enableStatistics
+     * Effect: immediate.
+     *
+     * @return true if recording of transaction statistics is enabled, false otherwise.
+     */
     public boolean isEnableStatistics()
     {
         return enableStatistics;
     }
 
+    /**
+     * Sets if transaction statistics should be recorded or not.
+     *
+     * @param enableStatistics true to enable statistics gathering, false to disable.
+     */
     public void setEnableStatistics(boolean enableStatistics)
     {
         this.enableStatistics = enableStatistics;
     }
 
-//    public static final String SHARED_TRANSACTION_LOG = "com.arjuna.ats.arjuna.coordinator.sharedTransactionLog";
+    /**
+     * Returns if the transaction log sould be run in shared mode or not.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.sharedTransactionLog
+     *
+     * @return true if transaction log sharing is enabled, false otherwise.
+     */
     public boolean isSharedTransactionLog()
     {
         return sharedTransactionLog;
     }
 
+    /**
+     * Sets if the transaction log should be run in shared mode or not.
+     *
+     * @param sharedTransactionLog true to enable transaction log sharing, false to disable.
+     */
     public void setSharedTransactionLog(boolean sharedTransactionLog)
     {
         this.sharedTransactionLog = sharedTransactionLog;
     }
 
-//    public static final String START_DISABLED = "com.arjuna.ats.arjuna.coordinator.startDisabled";
+    /**
+     * Returns if the transaction manager should be created in a disabled state or not.
+     *
+     * Default: false (i.e. transaction manager is enabled on creation)
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.startDisabled
+     *
+     * @return true if the transaction manager will start in a disabled state, false otherwise.
+     */
     public boolean isStartDisabled()
     {
         return startDisabled;
     }
 
+    /**
+     * Sets if the transaction manager should be created in a disabled state or not.
+     *
+     * @param startDisabled true to start in a diabled state, false to start enabled.
+     */
     public void setStartDisabled(boolean startDisabled)
     {
         this.startDisabled = startDisabled;
     }
 
-//    public static final String TX_REAPER_MODE = "com.arjuna.ats.arjuna.coordinator.txReaperMode";
+    /**
+     * Returns the operating mode of the transaction timeout processing system.
+     *
+     * Default: "DYNAMIC"
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperMode
+     *
+     * @return the operating mode of the transaction reaper.
+     */
     public String getTxReaperMode()
     {
         return txReaperMode;
     }
 
+    /**
+     * Sets the operating mode of the transaction timeout processing system.
+     *
+     * @param txReaperMode the name of the required operating mode.
+     */
     public void setTxReaperMode(String txReaperMode)
     {
         this.txReaperMode = txReaperMode;
     }
 
-//    public static final String TX_REAPER_TIMEOUT = "com.arjuna.ats.arjuna.coordinator.txReaperTimeout";
+    /**
+     * Returns the timeout (wakeup) interval of the reaper's PERIODIC mode, in milliseconds.
+     *
+     * Default: 120000ms
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperTimeout
+     *
+     * @return the sleep interval of the transaction reaper, in milliseconds.
+     */
     public long getTxReaperTimeout()
     {
         return txReaperTimeout;
     }
 
+    /**
+     * Sets the timeout interval of the transaction reaper.
+     *
+     * @param txReaperTimeout the reaper sleep interval, in milliseconds.
+     */
     public void setTxReaperTimeout(long txReaperTimeout)
     {
         this.txReaperTimeout = txReaperTimeout;
     }
 
-//    public static final String TX_REAPER_CANCEL_WAIT_PERIOD = "com.arjuna.ats.arjuna.coordinator.txReaperCancelWaitPeriod";
+    /**
+     * Returns the number of millisecs delay afer a cancel is scheduled,
+	 * before the reaper tries to interrupt the worker thread executing the cancel.
+     *
+     * Default: 500ms
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperCancelWaitPeriod
+     *
+     * @return the reaper cancel wait period, in milliseconds.
+     */
     public long getTxReaperCancelWaitPeriod()
     {
         return txReaperCancelWaitPeriod;
     }
 
+    /**
+     * Sets the delay to allow a cancel to be processed before interrupting it.
+     *
+     * @param txReaperCancelWaitPeriod in milliseconds.
+     */
     public void setTxReaperCancelWaitPeriod(long txReaperCancelWaitPeriod)
     {
         this.txReaperCancelWaitPeriod = txReaperCancelWaitPeriod;
     }
 
-//    public static final String TX_REAPER_CANCEL_FAIL_WAIT_PERIOD = "com.arjuna.ats.arjuna.coordinator.txReaperCancelFailWaitPeriod";
+    /**
+     * Returns the number of millisecs delay afer a worker thread is interrupted,
+     * before the reaper writes the it off as a zombie and starts a new thread.
+     *
+     * Default: 500ms
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperCancelFailWaitPeriod
+     *
+     * @return the reaper cancel wait fail period, in milliseconds.
+     */
     public long getTxReaperCancelFailWaitPeriod()
     {
         return txReaperCancelFailWaitPeriod;
     }
 
+    /**
+     * Sets the delay to allow an interrupted cancel to be cleaned up.
+     *
+     * @param txReaperCancelFailWaitPeriod in milliseconds.
+     */
     public void setTxReaperCancelFailWaitPeriod(long txReaperCancelFailWaitPeriod)
     {
         this.txReaperCancelFailWaitPeriod = txReaperCancelFailWaitPeriod;
     }
 
-//    public static final String TX_REAPER_ZOMBIE_MAX = "com.arjuna.ats.arjuna.coordinator.txReaperZombieMax";
+    /**
+     * Returns the threshold for count of non-exited zombies at which
+     * the system starts logging error messages.
+     *
+     * Default: 8
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperZombieMax
+     *
+     * @return the number of zombie threads at which errors will start being reported.
+     */
     public int getTxReaperZombieMax()
     {
         return txReaperZombieMax;
     }
 
+    /**
+     * Sets the threshold number of zombie threads at which errors will start to be reported.
+     *
+     * @param txReaperZombieMax the number of threads.
+     */
     public void setTxReaperZombieMax(int txReaperZombieMax)
     {
         this.txReaperZombieMax = txReaperZombieMax;
     }
 
-//    public static final String DEFAULT_TIMEOUT = "com.arjuna.ats.arjuna.coordinator.defaultTimeout";
+    /**
+     * 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.arjuna.coordinator.defaultTimeout
+     *
+     * @return the default transaction lifetime, in seconds.
+     */
     public int getDefaultTimeout()
     {
         return defaultTimeout;
     }
 
+    /**
+     * Sets the default lifetime after which a transaction may be considered for timeout, in seconds.
+     *
+     * @param defaultTimeout the default transaction lifetime, in seconds.
+     */
     public void setDefaultTimeout(int defaultTimeout)
     {
         this.defaultTimeout = defaultTimeout;
     }
 
-//    public static final String TRANSACTION_STATUS_MANAGER_ENABLE = "com.arjuna.ats.arjuna.coordinator.transactionStatusManagerEnable";
+    /**
+     * Returns if the transaction status manager (TSM) service, needed for out of process recovery, should be provided or not.
+     *
+     * Default: true
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.transactionStatusManagerEnable
+     *
+     * @return true is the transaction status manager is enabled, false otherwise.
+     */
     public boolean isTransactionStatusManagerEnable()
     {
         return transactionStatusManagerEnable;
     }
 
+    /**
+     * Sets if the transaction status manager service should be provided or not.
+     *
+     * @param transactionStatusManagerEnable true to enable the TSM, false to disable.
+     */
     public void setTransactionStatusManagerEnable(boolean transactionStatusManagerEnable)
     {
         this.transactionStatusManagerEnable = transactionStatusManagerEnable;
     }
 
-//    public static final String BEFORECOMPLETION_WHEN_ROLLBACKONLY = "com.arjuna.ats.coordinator.beforeCompletionWhenRollbackOnly";
+    /**
+     * Returns if beforeCompletion should be called on Synchronizations when completing transactions that are marked rollback only.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.coordinator.beforeCompletionWhenRollbackOnly
+     *
+     * @return true if beforeCompletion will be called in rollback only cases, false otherwise.
+     */
     public boolean isBeforeCompletionWhenRollbackOnly()
     {
         return beforeCompletionWhenRollbackOnly;
     }
 
+    /**
+     * Sets if beforeCompletion should be called on transactions that are set rollback only.
+     *
+     * @param beforeCompletionWhenRollbackOnly true to call beforeCompletions on rollback only tx, false to skip them.
+     */
     public void setBeforeCompletionWhenRollbackOnly(boolean beforeCompletionWhenRollbackOnly)
     {
         this.beforeCompletionWhenRollbackOnly = beforeCompletionWhenRollbackOnly;
     }
 
-//    public static final String CHECKEDACTION_FACTORY = "com.arjuna.ats.coordinator.checkedActionFactory";
+    /**
+     * Returns the class name of an implementation of CheckedActionFactory
+     *
+     * Default: null
+     * Equivalent deprecated property: com.arjuna.ats.coordinator.checkedActionFactory
+     *
+     * @return the class name of the CheckedActionFactory implementation to use.
+     */
     public String getCheckedActionFactory()
     {
         return checkedActionFactory;
     }
 
+    /**
+     * Sets the class name of the checked CheckedActionFactory implementation.
+     *
+     * @param checkedActionFactory the name of a class that implements CheckedActionFactory.
+     */
     public void setCheckedActionFactory(String checkedActionFactory)
     {
         this.checkedActionFactory = checkedActionFactory;

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java	2009-08-25 12:22:28 UTC (rev 29045)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java	2009-08-25 12:39:22 UTC (rev 29046)
@@ -27,6 +27,7 @@
 
 import java.util.List;
 import java.util.ArrayList;
+import java.io.File;
 
 /**
  * A JavaBean containing assorted configuration properties for the core transaction system.
@@ -43,7 +44,7 @@
     private List<String> staticInventoryElements = new ArrayList<String>();
 
     @FullPropertyName(name = "com.arjuna.ats.arjuna.common.varDir")
-    private String varDir = null;
+    private String varDir = System.getProperty("user.dir") + File.separator + "var" + File.separator + "tmp";
 
     @FullPropertyName(name = "com.arjuna.ats.arjuna.xa.nodeIdentifier")
     private String nodeIdentifier = null;
@@ -64,21 +65,50 @@
 //    private String bindAddress;
 
 
+    /**
+     * Returns the name of the properties file.
+     *
+     * Default: ""
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.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;
     }
 
+    /**
+     * Returns a list of names of classes that implement InventoryElement.
+     * 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.internal.arjuna.inventory.staticInventoryImple
+     *
+     * @return a list of InventoryElement implementation class names.
+     */
     public List<String> getStaticInventoryElements()
     {
         return new ArrayList<String>(staticInventoryElements);
     }
 
+    /**
+     * Sets the inventory extensions.
+     * List elements should be names of classes that implement InventoryElement.
+     * The provided list will be copied, not retained.
+     *
+     * @param staticInventoryElements a list of InventoryElement implementation class names.
+     */
     public void setStaticInventoryElements(List<String> staticInventoryElements)
     {
         if(staticInventoryElements == null) {
@@ -88,82 +118,190 @@
         }
     }
 
+    /**
+     * Returns the 'var' directory path.
+     *
+     * Default: {user.dir}/var/tmp
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.common.varDir
+     *
+     * @return the 'var' directory name.
+     */
     public String getVarDir()
     {
         return varDir;
     }
 
+    /**
+     * Sets the 'var' directory path
+     *
+     * @param varDir the path to the 'var' directory.
+     */
     public void setVarDir(String varDir)
     {
         this.varDir = varDir;
     }
 
+    /**
+     * Returns the Node Identifier.
+     *
+     * Default: null
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.xa.nodeIdentifier
+     *
+     * @return the Node Identifier.
+     */
     public String getNodeIdentifier()
     {
         return nodeIdentifier;
     }
 
+    /**
+     * Sets the node identifier. Should be uniq amongst all instances that share resource managers or an objectstore.
+     *
+     * @param nodeIdentifier the Node Identifier.
+     */
     public void setNodeIdentifier(String nodeIdentifier)
     {
         this.nodeIdentifier = nodeIdentifier;
     }
 
+    /**
+     * Returns the port number for the Socket based process id implementation.
+     *
+     * Default: 0 (use any free port)
+     * Equivalent deprecated property: com.arjuna.ats.internal.arjuna.utils.SocketProcessIdPort
+     *
+     * @return the port number.
+     */
     public int getSocketProcessIdPort()
     {
         return socketProcessIdPort;
     }
 
+    /**
+     * Sets the port on which the socket based process id implementation will listen.
+     * Should be uniq amongst all instances on the same host.
+     * A value of 0 will result in a random port.
+     *
+     * @param socketProcessIdPort the port number to bind to.
+     */
     public void setSocketProcessIdPort(int socketProcessIdPort)
     {
         Utility.validatePortRange(socketProcessIdPort);
         this.socketProcessIdPort = socketProcessIdPort;
     }
 
+    /**
+     * Returns the maximum number of ports to search when looking for one that is free.
+     *
+     * Default: 1
+     * Equivalent deprecated property: com.arjuna.ats.internal.arjuna.utils.SocketProcessIdMaxPorts
+     *
+     * @return the maximum number of ports to try.
+     */
     public int getSocketProcessIdMaxPorts()
     {
         return socketProcessIdMaxPorts;
     }
 
+    /**
+     * Sets the maximum number of ports the socket process id implemention will try when searching to find one that is free.
+     *
+     * @param socketProcessIdMaxPorts the maximum number of ports to try.
+     */
     public void setSocketProcessIdMaxPorts(int socketProcessIdMaxPorts)
     {
         this.socketProcessIdMaxPorts = socketProcessIdMaxPorts;
     }
 
+    /**
+     * Returns the class name of the Process implementation to use.
+     *
+     * Default: "com.arjuna.ats.internal.arjuna.utils.SocketProcessId"
+     * Equivalent deprecated property: com.arjuna.ats.internal.arjuna.utils.processImplementation
+     *
+     * @return the name of a class implemeting Process.
+     */
     public String getProcessImplementation()
     {
         return processImplementation;
     }
 
+    /**
+     * Sets the class name of the Process implementation to use.
+     *
+     * @param processImplementation the name of a class implementing Process.
+     */
     public void setProcessImplementation(String processImplementation)
     {
         this.processImplementation = processImplementation;
     }
 
+    /**
+     * Returns the process id to use if ManualProcessId is selected. Should be uniq across all instances on the same host.
+     *
+     * Default: -1 (invalid, must be changed if used)
+     * Equivalent deprecated property: com.arjuna.ats.internal.arjuna.utils.pid
+     *
+     * @return the process id to use.
+     */
     public int getPid()
     {
         return pid;
     }
 
+    /**
+     * Sets the process id to use if ManualProcessId is selected.
+     * Should be on the range 1-65535 and uniq across all instances on the same host.
+     *
+     * @param pid the process id to use.
+     */
     public void setPid(int pid)
     {
         this.pid = pid;
     }
 
+    /**
+     * Returns if multiple last (i.e. one-phase) resources are allowed in the same transaction or not.
+     *
+     * Default: false
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.allowMultipleLastResources
+     *
+     * @return true if multiple last resources are permitted, false otherwise.
+     */
     public boolean isAllowMultipleLastResources()
     {
         return allowMultipleLastResources;
     }
 
+    /**
+     * Sets if multiple last (i.e. one-phase) resources are allowed in the same transaction or not.
+     * Caution: setting a value of true weakens transactional (ACID) guarantees and is not recommended.
+     *
+     * @param allowMultipleLastResources true if multiple 1PC resource should be permitted, false otherwise.
+     */
     public void setAllowMultipleLastResources(boolean allowMultipleLastResources)
     {
         this.allowMultipleLastResources = allowMultipleLastResources;
     }
 
+    /**
+     * Returns if the per-transaction warning on enlistment of multiple last resources is disabled or not.
+     *
+     * Default: false.
+     * Equivalent deprecated property: com.arjuna.ats.arjuna.disableMultipleLastResourcesWarning
+     *
+     * @return true if warning is disabled, false otherwise.
+     */
     public boolean isDisableMultipleLastResourcesWarning()
     {
         return disableMultipleLastResourcesWarning;
     }
 
+    /**
+     * Sets if the per-transaction warning on enlistment of multiple last resource is disabled or not.
+     *
+     * @param disableMultipleLastResourcesWarning true to disable the warning, false otherwise.
+     */
     public void setDisableMultipleLastResourcesWarning(boolean disableMultipleLastResourcesWarning)
     {
         this.disableMultipleLastResourcesWarning = disableMultipleLastResourcesWarning;

Modified: labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LoggingEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LoggingEnvironmentBean.java	2009-08-25 12:22:28 UTC (rev 29045)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LoggingEnvironmentBean.java	2009-08-25 12:39:22 UTC (rev 29046)
@@ -43,7 +43,7 @@
     private String loggingSystem = "log4j";
 
     @FullPropertyName(name = "com.arjuna.common.util.logging.DebugLevel")
-    private String debugLevel = "0xffffffff";
+    private String debugLevel = "0x00000000";
 
     @FullPropertyName(name = "com.arjuna.common.util.logging.FacilityLevel")
     private String facilityLevel = "0xffffffff";
@@ -53,7 +53,7 @@
 
 
     /**
-     * Returns the language code. ISO language code as used with Locale objects.
+     * Returns the language code. ISO language code format as used with Locale objects.
      * 
      * Default: "en"
      * Equivalent deprecated property: com.arjuna.common.util.logging.language
@@ -66,7 +66,7 @@
     }
 
     /**
-     * Sets the language code. Use ISO language code as with Locale objects.
+     * Sets the language code. Use ISO language code format as with Locale objects.
      *
      * @param language the ISO language code.
      */
@@ -76,7 +76,7 @@
     }
 
     /**
-     * Returns the country code. ISO country code as used with Locale objects.
+     * Returns the country code. ISO country code format as used with Locale objects.
      *
      * Default: "US"
      * Equivalent deprecated property: com.arjuna.common.util.logging.country
@@ -89,7 +89,7 @@
     }
 
     /**
-     * Sets the country code. Use ISO country code as with Locale objects.
+     * Sets the country code. Use ISO country code format as with Locale objects.
      *
      * @param country the ISO country code.
      */
@@ -147,7 +147,7 @@
     /**
      * Returns the debug log level in hex form.
      *
-     * Default: "0xffffffff"
+     * Default: "0x00000000"
      * Equivalent deprecated property: com.arjuna.common.util.logging.DebugLevel
      *
      * @return the debug log level.

Modified: labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/simple/EnvironmentBeanTest.java
===================================================================
--- labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/simple/EnvironmentBeanTest.java	2009-08-25 12:22:28 UTC (rev 29045)
+++ labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/simple/EnvironmentBeanTest.java	2009-08-25 12:39:22 UTC (rev 29046)
@@ -42,8 +42,9 @@
         DummyEnvironmentBean testBean = new DummyEnvironmentBean();
         DummyPropertyManager testManager = new DummyPropertyManager(testBean.getProperties());
         BeanPopulator.configureFromPropertyManager(testBean, testManager);
-        Set<String> expectedKeys = testBean.getProperties().stringPropertyNames();
 
+        Set<Object> expectedKeys = testBean.getProperties().keySet();
+
         assertTrue( testManager.usedKeys.containsAll(expectedKeys) );
     }
 }



More information about the jboss-svn-commits mailing list