[jboss-cvs] JBossAS SVN: r66084 - trunk/transaction/src/main/org/jboss/tm.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 12 06:21:09 EDT 2007


Author: adrian at jboss.org
Date: 2007-10-12 06:21:09 -0400 (Fri, 12 Oct 2007)
New Revision: 66084

Added:
   trunk/transaction/src/main/org/jboss/tm/TransactionManagerServiceMBean.java
Log:
[JBAS-4516] - Clebert deleted the wrong one

Copied: trunk/transaction/src/main/org/jboss/tm/TransactionManagerServiceMBean.java (from rev 66036, trunk/transaction/src/main/org/jboss/tm/TransactionManagerServiceMBean.java)
===================================================================
--- trunk/transaction/src/main/org/jboss/tm/TransactionManagerServiceMBean.java	                        (rev 0)
+++ trunk/transaction/src/main/org/jboss/tm/TransactionManagerServiceMBean.java	2007-10-12 10:21:09 UTC (rev 66084)
@@ -0,0 +1,375 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tm;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.system.ServiceMBean;
+import org.jboss.tm.integrity.TransactionIntegrityFactory;
+import org.jboss.tm.recovery.RecoveryLoggerInstance;
+
+/**
+ * TransactionManagerService MBean interface.
+ *
+ * @see TxManager
+ * @version $Revision: 44337 $
+ */
+public interface TransactionManagerServiceMBean extends ServiceMBean, TransactionManagerFactory
+{
+   ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss:service=TransactionManager");
+
+   /**
+    * Set the Recover logger
+    * @param recoveryLogger
+    */
+   void setRecoveryLogger(RecoveryLoggerInstance recoveryLogger);
+   
+   /**
+    * Set the Integrity checker factory 
+    * 
+    * @param factory the integrity checker factory
+    */
+   void setTransactionIntegrityFactory(TransactionIntegrityFactory factory);
+
+   /**
+    * Describe <code>getGlobalIdsEnabled</code> method here.
+    * @return an <code>boolean</code> value
+    */
+   boolean getGlobalIdsEnabled();
+
+   /**
+    * Describe <code>setGlobalIdsEnabled</code> method here.
+    * @param newValue an <code>boolean</code> value
+    */
+   void setGlobalIdsEnabled(boolean newValue);
+
+   /**
+    * Is thread interruption enabled at transaction timeout
+    * @return true for interrupt threads, false otherwise
+    */
+   boolean isInterruptThreads();
+
+   /**
+    * Enable/disable thread interruption at transaction timeout.
+    * @param interruptThreads pass true to interrupt threads, false otherwise
+    */
+   void setInterruptThreads(boolean interruptThreads);
+
+   /**
+    * Describe <code>getTransactionTimeout</code> method here.
+    * @return an <code>int</code> value
+    */
+   int getTransactionTimeout();
+
+   /**
+    * Describe <code>setTransactionTimeout</code> method here.
+    * @param timeout an <code>int</code> value
+    */
+   void setTransactionTimeout(int timeout);
+
+   /**
+    * Gets the completion retry limit. This is the maximum number of times that
+    * the transaction manager retries a completion operation (either commit or
+    * rollback) on a resource (either a remote <code>Resource</code> or an 
+    * <code>XAResource</code>) that raised a transient exception. Whoever called 
+    * the transaction manager is blocked while the completion retries are 
+    * performed. If the completion retry limit is reached, the transaction
+    * manager abandons the retries and throws a heuristic hazard exception.  
+    * 
+    * @return the completion retry limit.
+    */
+   int getCompletionRetryLimit();
+
+   /**
+    * Sets the completion retry limit. This is the maximum number of times that
+    * the transaction manager retries a completion operation (either commit or
+    * rollback) on a resource (either a remote <code>Resource</code> or an 
+    * <code>XAResource</code>) that raised a transient exception. Whoever called 
+    * the transaction manager is blocked while the completion retries are 
+    * performed. If the completion retry limit is reached, the transaction
+    * manager abandons the retries and throws a heuristic hazard exception.  
+    * 
+    * @param maxCompletionRetries the completion retry limit.
+    */
+   void setCompletionRetryLimit(int maxCompletionRetries);
+   
+   /**
+    * Gets the completion retry timeout. The completion retry timeout is the 
+    * number of seconds that the transaction manager waits before retrying a 
+    * completion operation (either commit or rollback) on a resource (either a
+    * remote <code>Resource</code> or an <code>XAResource</code>) that raised a 
+    * transient exception. This is a blocking timeout (whoever called the 
+    * transaction manager is blocked until the commit or rollback is retried)
+    * and is applicable if the transaction manager did not report a heuristic
+    * hazard for the transaction. If a heuristic hazard has been reported, then
+    * the applicable timouts are the non-blocking ones: the XA retry timeout and 
+    * the prepared timeout.    
+    *
+    * @return the timeout (in seconds) for retrying a completion operation 
+    *         after a transient exception and before the transaction manager 
+    *         reports a heuristic hazard.
+    */
+   int getCompletionRetryTimeout();
+   
+   /**
+    * Sets the completion retry timeout. The completion retry timeout is the 
+    * number of seconds that the transaction manager waits before retrying a 
+    * completion operation (either commit or rollback) on a resource (either a
+    * remote <code>Resource</code> or an <code>XAResource</code>) that raised a 
+    * transient exception. This is a blocking timeout (whoever called the 
+    * transaction manager is blocked until the commit or rollback is retried)
+    * and is applicable if the transaction manager did not report a heuristic
+    * hazard for the transaction. If a heuristic hazard has been reported, then
+    * the applicable timouts are the non-blocking ones: the XA retry timeout and 
+    * the prepared timeout.    
+    * 
+    * @param seconds the timeout (in seconds) for retrying a completion 
+    *                operation after a transient exception and before the 
+    *                transaction manager reports a heuristic hazard. 
+    */
+   void setCompletionRetryTimeout(int seconds);
+   
+   /**
+    * Gets the XA retry timeout. After reaching the completion retry limit and
+    * reporting a heuristic hazard to its caller, the transaction manager will 
+    * still attempt to commit or rollback an XA resource that raised a
+    * transient exception. This is the time interval (in seconds) between XA 
+    * completion retries that is applicable if a heuristic hazard has been
+    * reported for a transaction.
+    *  
+    * @return the timeout (in seconds) for retrying commit or rollback 
+    *         operations on XA resources. 
+    */
+   int getXARetryTimeout();
+   
+   /**
+    * Sets the XA retry timeout. After reaching the completion retry limit and
+    * reporting a heuristic hazard to its caller, the transaction manager will 
+    * still attempt to commit or rollback an XA resource that raised a
+    * transient exception. This is the time interval (in seconds) between XA 
+    * completion retries that is applicable if a heuristic hazard has been
+    * reported for a transaction.
+    * 
+    * @param seconds the timeout (in seconds) for retrying commit or rollback
+    *                operations on XA resources.
+    */
+   void setXARetryTimeout(int seconds);
+   
+   /**
+    * Gets the prepared timeout. A transaction branch that is the prepared 
+    * state waits for an amount of time equal to the prepared timeout before 
+    * generating a call to <code>replayCompletion</code> on its recovery 
+    * coordinator.
+    * 
+    * @return the timeout (in seconds) for a transaction branch in the prepared 
+    *         state.
+    */
+   int getPreparedTimeout();
+   
+   /**
+    * Sets the prepared timeout. A transaction branch that is the prepared 
+    * state waits for an amount of time equal to the prepared timeout before 
+    * generating a call to <code>replayCompletion</code> on its recovery 
+    * coordinator.
+    * 
+    * @param seconds the timeout (in seconds) for a transaction branch in the 
+    *                    prepared state.
+    */
+   void setPreparedTimeout(int seconds);
+   
+   /**
+    * Gets the boolean attribute "root branch remembers heuristic decisions".
+    * If this attribute is true, the root branch remembers a heuristically
+    * completed transaction until explicitly told (through a call to the MBean
+    * operation <code>forget</code>) to forget that transaction. If this 
+    * attribute is false, the root branch immediately forgets a transaction
+    * when the transaction completes.
+    * 
+    * @return true if the root branch remember heuristic decisions, 
+    *         false otherwise.
+    */
+   boolean isRootBranchRemembersHeuristicDecisions();
+   
+   /**
+    * Sets the boolean attribute "root branch remembers heuristic decisions".
+    * If this attribute is true, the root branch remembers a heuristically
+    * completed transaction until explicitly told (through a call to the MBean
+    * operation <code>forget</code>) to forget that transaction. If this 
+    * attribute is false, the root branch immediately forgets a transaction
+    * when the transaction completes.
+    * 
+    * @param newValue true if the root branch should remember heuristic 
+    *                 decisions, false otherwise.
+    */
+   void setRootBranchRemembersHeuristicDecisions(boolean newValue);
+   
+   /**
+    * Gets the boolean attribute "report heuristic hazard as heuristic mixed".
+    * If this attribute is true, each of the commit methods of the JTA API 
+    * (<code>javax.transaction.Transaction.commit()</code>, 
+    * <code>javax.transaction.TransactionManager.commit()</code>, and
+    * <code>javax.transaction.UserTransaction.commit()</code>) throws a
+    * <code>HeuristicMixedException</code> to report a heuristic hazard to its 
+    * caller. If the attribute is false, those methods do not report heuristic
+    * hazards to their callers. In any case, transactions with heuristic hazard
+    * status are listed by the MBean operation 
+    * <code>listHeuristicallyCompletedTransactions()</code>.
+    *  
+    * @return true if a JTA commit throws <code>HeuristicMixedException</code>
+    *         to report a heuristic hazard to its caller, or false if a JTA
+    *         commit does not report a heuristic hazard to its caller. 
+    */
+   boolean isReportHeuristicHazardAsHeuristicMixed();
+   
+   /**
+    * Sets the boolean attribute "report heuristic hazard as heuristic mixed".
+    * If this attribute is true, each of the commit methods of the JTA API 
+    * (<code>javax.transaction.Transaction.commit()</code>, 
+    * <code>javax.transaction.TransactionManager.commit()</code>, and
+    * <code>javax.transaction.UserTransaction.commit()</code>) throws a
+    * <code>HeuristicMixedException</code> to report a heuristic hazard to its 
+    * caller. If the attribute is false, those methods do not report heuristic
+    * hazards to their callers. In any case, transactions with heuristic hazard
+    * status are listed by the MBean operation 
+    * <code>listHeuristicallyCompletedTransactions()</code>.
+    * 
+    * @param newValue true if a JTA commit should throw 
+    *         <code>HeuristicMixedException</code> to report a heuristic hazard
+    *         to its caller, or false if a JTA commit should not report a 
+    *         heuristic hazard to its caller.
+    */
+   void setReportHeuristicHazardAsHeuristicMixed(boolean newValue);
+   
+   /**
+    * mbean get-set pair for field xidFactory Get the value of xidFactory
+    * @return value of xidFactory
+    */
+   ObjectName getXidFactory();
+
+   /**
+    * Set the value of xidFactory
+    * @param xidFactory Value to assign to xidFactory
+    */
+   void setXidFactory(ObjectName xidFactory);
+
+   /**
+    * Get the xa terminator
+    * @return the xa terminator    
+    */
+   JBossXATerminator getXATerminator();
+
+   /**
+    * Counts the number of transactions
+    * @return the number of active transactions
+    */
+   long getTransactionCount();
+
+   /**
+    * The number of commits.
+    * @return the number of transactions that have been committed
+    */
+   long getCommitCount();
+
+   /**
+    * The number of rollbacks.
+    * @return the number of transactions that have been rolled back
+    */
+   long getRollbackCount();
+
+   /**
+    * Lists the in-doubt transactions. 
+    * 
+    * @return a string with a text listing of in-doubt transactions. 
+    */
+   String listInDoubtTransactions();
+   
+   /**
+    * Heuristically commits an in-doubt transaction.
+    * 
+    * @param localTransactionId the local id of the in-doubt transaction to be
+    *                           heuristically committed.
+    */
+   void heuristicallyCommit(long localTransactionId);
+   
+   /**
+    * Heuristically commits all in-doubt transactions.
+    */
+   void heuristicallyCommitAll();
+   
+   /**
+    * Heuristically rolls back an in-doubt transaction.
+    * 
+    * @param localTransactionId the local id of the in-doubt transaction to be
+    *                           heuristically rolled back.
+    */
+   void heuristicallyRollback(long localTransactionId);
+   
+   /**
+    * Heuristically rolls back all in-doubt transactions.
+    */
+   void heuristicallyRollbackAll();
+   
+   /**
+    * Lists the heuristically completed transactions coordinated by this
+    * transaction manager. A transaction that was heuristically completed
+    * by a call to <code>heuristicallyCommit(long localTransactionId)</code>,
+    * <code>heuristicallyCommitAll()</code>,
+    * <code>heuristicallyRollback(long localTransactionId)</code>, or
+    * <code>heuristicallyRollbackAll()</code> does not appear in the listing, 
+    * as that transaction had a foreign coordinator. 
+    * 
+    * @return a string with a text listing of heuristically completed
+    *         transactions.
+    */
+   String listHeuristicallyCompletedTransactions();
+   
+   /**
+    * Forgets a heuristically completed transaction coordinated by this 
+    * transaction manager.
+    * 
+    * @param localTransactionId the local id of a heuristically completed 
+    *                           transaction coordinated by this transaction 
+    *                           manager.
+    */
+   void forget(long localTransactionId);
+   
+   /**
+    * Forgets all heuristically completed transactions coordinated by this 
+    * transaction manager.
+    */
+   void forgetAll();
+   
+   /**
+    * The <code>registerXAExceptionFormatter</code> method
+    * @param clazz a <code>Class</code> value
+    * @param formatter a <code>XAExceptionFormatter</code> value
+    */
+   void registerXAExceptionFormatter(Class clazz, XAExceptionFormatter formatter);
+
+   /**
+    * The <code>unregisterXAExceptionFormatter</code> method
+    * @param clazz a <code>Class</code> value
+    */
+   void unregisterXAExceptionFormatter(Class clazz);
+
+}




More information about the jboss-cvs-commits mailing list