[jboss-svn-commits] JBL Code SVN: r20562 - in labs/jbosstm/trunk: XTS/sar/src/org/jboss/transactions/xts/recovery and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 17 10:43:10 EDT 2008


Author: jhalliday
Date: 2008-06-17 10:43:10 -0400 (Tue, 17 Jun 2008)
New Revision: 20562

Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
   labs/jbosstm/trunk/XTS/sar/src/org/jboss/transactions/xts/recovery/ACCoordinatorRecoveryModule.java
Log:
Changed the log level of periodic recovery pass messages from info to debug. This provides for silent running with normal log settings and is done mainly to make the JBossAS folks happy.  http://jira.jboss.com/jira/browse/JBTM-331  


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java	2008-06-17 12:34:31 UTC (rev 20561)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java	2008-06-17 14:43:10 UTC (rev 20562)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -68,7 +68,7 @@
        if (tsLogger.arjLogger.isDebugEnabled())
        {
 	   tsLogger.arjLogger.debug
-            ( DebugLevel.CONSTRUCTORS, 
+            ( DebugLevel.CONSTRUCTORS,
               VisibilityLevel.VIS_PUBLIC,
               FacilityCode.FAC_CRASH_RECOVERY,
               "AtomicActionRecoveryModule created" );
@@ -78,7 +78,7 @@
       {
          _transactionStore = TxControl.getStore() ;
       }
-      
+
       _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
    }
 
@@ -95,9 +95,9 @@
 
       try
       {
-	  if (tsLogger.arjLogger.isInfoEnabled())
+	  if (tsLogger.arjLogger.isDebugEnabled())
 	  {
-	      tsLogger.arjLogger.info( "StatusModule: first pass " );
+	      tsLogger.arjLogger.debug( "StatusModule: first pass " );
 	  }
 
 	  AtomicActions = _transactionStore.allObjUids( _transactionType, aa_uids );
@@ -120,11 +120,11 @@
 
    public void periodicWorkSecondPass()
    {
-       if (tsLogger.arjLogger.isInfoEnabled())
+       if (tsLogger.arjLogger.isDebugEnabled())
        {
-         tsLogger.arjLogger.info( "AtomicActionRecoveryModule: Second pass " );
+           tsLogger.arjLogger.debug( "AtomicActionRecoveryModule: Second pass " );
        }
-       
+
        processTransactionsStatus() ;
    }
 
@@ -133,7 +133,7 @@
        if (tsLogger.arjLogger.isDebugEnabled())
        {
 	   tsLogger.arjLogger.debug
-            ( DebugLevel.CONSTRUCTORS, 
+            ( DebugLevel.CONSTRUCTORS,
               VisibilityLevel.VIS_PUBLIC,
               FacilityCode.FAC_CRASH_RECOVERY,
               "AtomicActionRecoveryModule created" );
@@ -143,19 +143,19 @@
       {
          _transactionStore = TxControl.getStore() ;
       }
-      
+
       _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
       _transactionType = type;
 
     }
-    
+
    private void doRecoverTransaction( Uid recoverUid )
    {
       boolean commitThisTransaction = true ;
-      
+
       // Retrieve the transaction status from its original process.
       int theStatus = _transactionStatusConnectionMgr.getTransactionStatus( _transactionType, recoverUid ) ;
-                      
+
       boolean inFlight = isTransactionInMidFlight( theStatus ) ;
 
       String Status = ActionStatus.stringForm( theStatus ) ;
@@ -170,12 +170,12 @@
 		recoverUid.toString() + "\n ActionStatus is " + Status +
 		" in flight is " + inFlight ) ;
       }
-	 
+
       if ( ! inFlight )
       {
          try
          {
-            RecoverAtomicAction rcvAtomicAction = 
+            RecoverAtomicAction rcvAtomicAction =
                new RecoverAtomicAction( recoverUid, theStatus ) ;
 
             rcvAtomicAction.replayPhase2() ;
@@ -194,7 +194,7 @@
    private boolean isTransactionInMidFlight( int status )
    {
       boolean inFlight = false ;
-      
+
       switch ( status )
       {
          // these states can only come from a process that is still alive
@@ -206,7 +206,7 @@
          case ActionStatus.PREPARED   :
             inFlight = true ;
             break ;
-            
+
          // the transaction is apparently still there, but has completed its
          // phase2. should be safe to redo it.
          case ActionStatus.COMMITTED  :
@@ -218,10 +218,10 @@
             inFlight = false ;
             break ;
 
-         // this shouldn't happen 
+         // this shouldn't happen
          case ActionStatus.INVALID :
          default:
-            inFlight = false ; 
+            inFlight = false ;
       }
 
       return inFlight ;
@@ -230,16 +230,16 @@
    private Vector processTransactions( InputObjectState uids )
    {
       Vector uidVector = new Vector() ;
-      
+
       if (tsLogger.arjLogger.isDebugEnabled())
       {
 	  tsLogger.arjLogger.debug( DebugLevel.FUNCTIONS,
 				    VisibilityLevel.VIS_PUBLIC,
 				    FacilityCode.FAC_CRASH_RECOVERY,
-				    "processing " + _transactionType 
+				    "processing " + _transactionType
 				    + " transactions" ) ;
       }
-      
+
       Uid theUid = new Uid( Uid.nullUid() );
 
       boolean moreUids = true ;
@@ -266,7 +266,7 @@
 			 FacilityCode.FAC_CRASH_RECOVERY,
 			 "found transaction "+ newUid ) ;
 	       }
-	       
+
                uidVector.addElement( newUid ) ;
             }
          }
@@ -304,10 +304,10 @@
          }
       }
    }
-   
-   // 'type' within the Object Store for AtomicActions. 
+
+   // 'type' within the Object Store for AtomicActions.
    private String _transactionType = new AtomicAction().type() ;
-   
+
    // Array of transactions found in the object store of the
    // AtomicAction type.
    private Vector _transactionUidVector = null ;
@@ -318,6 +318,6 @@
    // This object manages the interface to all TransactionStatusManagers
    // processes(JVMs) on this system/node.
    private TransactionStatusConnectionManager _transactionStatusConnectionMgr ;
-    
+
 }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2008-06-17 12:34:31 UTC (rev 20561)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2008-06-17 14:43:10 UTC (rev 20562)
@@ -711,8 +711,11 @@
     {
         // n.b. we only get here if status is SCANNING
 
-        tsLogger.arjLogger.info("Periodic recovery - first pass <" +
+        if (tsLogger.arjLogger.isDebugEnabled())
+        {
+            tsLogger.arjLogger.debug("Periodic recovery - first pass <" +
                 _theTimestamper.format(new Date()) + ">" );
+        }
 
         // n.b. this works on a copy of the modules list so it is not affected by
         // dynamic updates in the middle of a scan
@@ -768,8 +771,11 @@
 
         // move on to phase 2
 
-        tsLogger.arjLogger.info("Periodic recovery - second pass <"+
-                _theTimestamper.format(new Date()) + ">" );
+        if (tsLogger.arjLogger.isDebugEnabled())
+        {
+            tsLogger.arjLogger.debug("Periodic recovery - second pass <"+
+                    _theTimestamper.format(new Date()) + ">" );
+        }
 
         modules = _recoveryModules.elements();
 
@@ -797,7 +803,7 @@
      * notify the listener worker that a scan has completed
      *
      * @caveats this must only be called when synchronized on {@link PeriodicRecovery#_stateLock} at the point
-     * where Status transitions from SCANNING to INACTIVE 
+     * where Status transitions from SCANNING to INACTIVE
      */
 
     private void notifyWorker()
@@ -827,7 +833,7 @@
      * @param rm the recovery module whose class loader is to be installed as the new thread class loader
      * @return the class loader currently installed as the thread class loader
      */
-    
+
     private ClassLoader switchClassLoader(RecoveryModule rm)
     {
         Thread currentThread = Thread.currentThread();

Modified: labs/jbosstm/trunk/XTS/sar/src/org/jboss/transactions/xts/recovery/ACCoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/src/org/jboss/transactions/xts/recovery/ACCoordinatorRecoveryModule.java	2008-06-17 12:34:31 UTC (rev 20561)
+++ labs/jbosstm/trunk/XTS/sar/src/org/jboss/transactions/xts/recovery/ACCoordinatorRecoveryModule.java	2008-06-17 14:43:10 UTC (rev 20562)
@@ -107,9 +107,9 @@
 
         try
         {
-            if (tsLogger.arjLogger.isInfoEnabled())
+            if (tsLogger.arjLogger.isDebugEnabled())
             {
-                tsLogger.arjLogger.info( "StatusModule: first pass " );
+                tsLogger.arjLogger.debug( "StatusModule: first pass " );
             }
 
             ACCoordinators = _transactionStore.allObjUids( _transactionType, acc_uids );
@@ -132,9 +132,9 @@
 
     public void periodicWorkSecondPass()
     {
-        if (tsLogger.arjLogger.isInfoEnabled())
+        if (tsLogger.arjLogger.isDebugEnabled())
         {
-            tsLogger.arjLogger.info( "ACCoordinatorRecoveryModule: Second pass " );
+            tsLogger.arjLogger.debug( "ACCoordinatorRecoveryModule: Second pass " );
         }
 
         processTransactionsStatus() ;




More information about the jboss-svn-commits mailing list