geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r723385 - in /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1: ./ geronimo-connector/ geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ geronimo-connector/src/main/java/org/apache/geronimo/connect...
Date Thu, 04 Dec 2008 17:55:03 GMT
Author: linsun
Date: Thu Dec  4 09:55:02 2008
New Revision: 723385

URL: http://svn.apache.org/viewvc?rev=723385&view=rev
Log:
merge from trunk rev 704747 GERONIMO-4359 switch to slf4j

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractSinglePoolConnectionInterceptor.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GeronimoConnectionEventListener.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MCFConnectionInterceptor.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolConnectionInterceptor.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/GeronimoTransactionListener.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/pool/WorkExecutorPoolImpl.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
Thu Dec  4 09:55:02 2008
@@ -33,6 +33,18 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.5.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.components</groupId>
             <artifactId>geronimo-transaction</artifactId>
             <version>${version}</version>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractSinglePoolConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractSinglePoolConnectionInterceptor.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractSinglePoolConnectionInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractSinglePoolConnectionInterceptor.java
Thu Dec  4 09:55:02 2008
@@ -17,9 +17,9 @@
 package org.apache.geronimo.connector.outbound;
 
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
-import java.util.List;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -27,18 +27,18 @@
 
 import javax.resource.ResourceException;
 import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnectionFactory;
 import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
 import javax.security.auth.Subject;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
  */
 public abstract class AbstractSinglePoolConnectionInterceptor implements ConnectionInterceptor,
PoolingAttributes {
-    protected static Log log = LogFactory.getLog(AbstractSinglePoolConnectionInterceptor.class.getName());
+    protected static Logger log = LoggerFactory.getLogger(AbstractSinglePoolConnectionInterceptor.class);
     protected final ConnectionInterceptor next;
     private final ReadWriteLock resizeLock = new ReentrantReadWriteLock();
     protected Semaphore permits;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
Thu Dec  4 09:55:02 2008
@@ -19,13 +19,13 @@
 
 import javax.transaction.TransactionManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.PartitionedPool;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * GenericConnectionManager sets up a connection manager stack according to the
@@ -34,7 +34,7 @@
  * @version $Rev$ $Date$
  */
 public class GenericConnectionManager extends AbstractConnectionManager {
-    protected static final Log log = LogFactory.getLog(AbstractSinglePoolConnectionInterceptor.class.getName());
+    protected static final Logger log = LoggerFactory.getLogger(AbstractSinglePoolConnectionInterceptor.class);
 
     //default constructor for use as endpoint
     public GenericConnectionManager() {

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GeronimoConnectionEventListener.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GeronimoConnectionEventListener.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GeronimoConnectionEventListener.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GeronimoConnectionEventListener.java
Thu Dec  4 09:55:02 2008
@@ -25,8 +25,9 @@
 import javax.resource.spi.ConnectionEvent;
 import javax.resource.spi.ConnectionEventListener;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * ConnectionEventListener.java
@@ -38,7 +39,7 @@
  */
 public class GeronimoConnectionEventListener implements ConnectionEventListener {
 
-    private static Log log = LogFactory.getLog(GeronimoConnectionEventListener.class.getName());
+    private static Logger log = LoggerFactory.getLogger(GeronimoConnectionEventListener.class.getName());
 
     private final ManagedConnectionInfo managedConnectionInfo;
     private final ConnectionInterceptor stack;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MCFConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MCFConnectionInterceptor.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MCFConnectionInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MCFConnectionInterceptor.java
Thu Dec  4 09:55:02 2008
@@ -20,8 +20,9 @@
 import javax.resource.ResourceException;
 import javax.resource.spi.ManagedConnection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * MCFConnectionInterceptor.java
@@ -31,7 +32,7 @@
  */
 public class MCFConnectionInterceptor implements ConnectionInterceptor {
 
-    protected static final Log log = LogFactory.getLog(MCFConnectionInterceptor.class.getName());
+    protected static final Logger log = LoggerFactory.getLogger(MCFConnectionInterceptor.class.getName());
 
     private ConnectionInterceptor stack;
 
@@ -43,11 +44,11 @@
         if (mci.getManagedConnection() != null) {
             return;
         }
-        
+
         try {
             ManagedConnection mc = mci.getManagedConnectionFactory().createManagedConnection(
-                        mci.getSubject(),
-                        mci.getConnectionRequestInfo());
+                    mci.getSubject(),
+                    mci.getConnectionRequestInfo());
             mci.setManagedConnection(mc);
             GeronimoConnectionEventListener listener = new GeronimoConnectionEventListener(stack,
mci);
             mci.setConnectionEventListener(listener);
@@ -77,7 +78,7 @@
     public void destroy() {
         // MCF is the "tail" of the stack. So, we're all done...
     }
-    
+
     public void setStack(ConnectionInterceptor stack) {
         this.stack = stack;
     }

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolConnectionInterceptor.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolConnectionInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolConnectionInterceptor.java
Thu Dec  4 09:55:02 2008
@@ -24,8 +24,9 @@
 import javax.resource.ResourceException;
 import javax.resource.spi.ManagedConnection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * SinglePoolConnectionInterceptor chooses a single connection from the pool.  If selectOneAssumeMatch
@@ -39,7 +40,7 @@
  * @version $Rev$ $Date$
  */
 public class SinglePoolConnectionInterceptor extends AbstractSinglePoolConnectionInterceptor
{
-    private static final Log log = LogFactory.getLog(SinglePoolConnectionInterceptor.class.getName());
+    private static final Logger log = LoggerFactory.getLogger(SinglePoolConnectionInterceptor.class.getName());
 
     private boolean selectOneAssumeMatch;
 

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
Thu Dec  4 09:55:02 2008
@@ -25,10 +25,10 @@
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.ConnectionReleaser;
 import org.apache.geronimo.connector.ConnectorTransactionContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * TransactionCachingInterceptor.java
@@ -51,7 +51,7 @@
  * @version 1.0
  */
 public class TransactionCachingInterceptor implements ConnectionInterceptor, ConnectionReleaser
{
-    protected static Log log = LogFactory.getLog(TransactionCachingInterceptor.class.getName());
+    protected static Logger log = LoggerFactory.getLogger(TransactionCachingInterceptor.class.getName());
 
     private final ConnectionInterceptor next;
     private final TransactionManager transactionManager;
@@ -80,13 +80,15 @@
                     connectionInfo.setManagedConnectionInfo(managedConnectionInfo);
                     //return;
                     if (log.isTraceEnabled()) {
-                        log.trace("supplying connection from tx cache " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        log.trace(
+                                "supplying connection from tx cache " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
                     }
                 } else {
                     next.getConnection(connectionInfo);
                     managedConnectionInfos.setShared(connectionInfo.getManagedConnectionInfo());
                     if (log.isTraceEnabled()) {
-                        log.trace("supplying connection from pool " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        log.trace(
+                                "supplying connection from pool " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
                     }
                 }
             }
@@ -110,7 +112,8 @@
             if (transaction != null) {
                 if (TxUtil.isActive(transaction)) {
                     if (log.isTraceEnabled()) {
-                        log.trace("tx active, not returning connection" + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        log.trace(
+                                "tx active, not returning connection" + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
                     }
                     return;
                 }
@@ -134,14 +137,16 @@
     private void internalReturn(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
{
         if (connectionInfo.getManagedConnectionInfo().hasConnectionHandles()) {
             if (log.isTraceEnabled()) {
-                log.trace("not returning connection from tx cache (has handles) " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                log.trace(
+                        "not returning connection from tx cache (has handles) " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
             }
             return;
         }
         //No transaction, no handles, we return it.
         next.returnConnection(connectionInfo, connectionReturnAction);
         if (log.isTraceEnabled()) {
-            log.trace("completed return of connection through tx cache " + connectionInfo.getConnectionHandle()
+ " for MCI: " + connectionInfo.getManagedConnectionInfo() + " and MC " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+            log.trace(
+                    "completed return of connection through tx cache " + connectionInfo.getConnectionHandle()
+ " for MCI: " + connectionInfo.getManagedConnectionInfo() + " and MC " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
         }
     }
 

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java
Thu Dec  4 09:55:02 2008
@@ -32,12 +32,12 @@
 import javax.resource.ResourceException;
 import javax.resource.spi.DissociatableManagedConnection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.outbound.ConnectionInfo;
 import org.apache.geronimo.connector.outbound.ConnectionReturnAction;
 import org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor;
 import org.apache.geronimo.connector.outbound.ManagedConnectionInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ConnectionTrackingCoordinator tracks connections that are in use by
@@ -56,7 +56,7 @@
  * @version $Rev$ $Date$
  */
 public class ConnectionTrackingCoordinator implements TrackedConnectionAssociator, ConnectionTracker
{
-    private static final Log log = LogFactory.getLog(ConnectionTrackingCoordinator.class.getName());
+    private static final Logger log = LoggerFactory.getLogger(ConnectionTrackingCoordinator.class.getName());
 
     private final boolean lazyConnect;
     private final ThreadLocal<ConnectorInstanceContext> currentInstanceContexts = new
ThreadLocal<ConnectorInstanceContext>();

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/GeronimoTransactionListener.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/GeronimoTransactionListener.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/GeronimoTransactionListener.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/GeronimoTransactionListener.java
Thu Dec  4 09:55:02 2008
@@ -19,15 +19,15 @@
 import javax.resource.ResourceException;
 import javax.transaction.Transaction;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.manager.TransactionManagerMonitor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
  */
 public class GeronimoTransactionListener implements TransactionManagerMonitor {
-    private static final Log log = LogFactory.getLog(GeronimoTransactionListener.class);
+    private static final Logger log = LoggerFactory.getLogger(GeronimoTransactionListener.class);
     private final TrackedConnectionAssociator trackedConnectionAssociator;
 
     public GeronimoTransactionListener(TrackedConnectionAssociator trackedConnectionAssociator)
{

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
Thu Dec  4 09:55:02 2008
@@ -32,10 +32,10 @@
 import javax.transaction.SystemException;
 import javax.transaction.xa.XAException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.manager.ImportedTransactionActiveException;
 import org.apache.geronimo.transaction.manager.XAWork;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Work wrapper providing an execution context to a Work instance.
@@ -44,7 +44,7 @@
  */
 public class WorkerContext implements Work {
 
-    private static final Log log = LogFactory.getLog(WorkerContext.class);
+    private static final Logger log = LoggerFactory.getLogger(WorkerContext.class);
 
     /**
      * Null WorkListener used as the default WorkListener.

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/pool/WorkExecutorPoolImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/pool/WorkExecutorPoolImpl.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/pool/WorkExecutorPoolImpl.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/pool/WorkExecutorPoolImpl.java
Thu Dec  4 09:55:02 2008
@@ -21,8 +21,9 @@
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Based class for WorkExecutorPool. Sub-classes define the synchronization
@@ -37,7 +38,7 @@
      * A timed out pooled executor.
      */
     private ThreadPoolExecutor pooledExecutor;
-    private static Log log = LogFactory.getLog(WorkExecutorPoolImpl.class);
+    private static Logger log = LoggerFactory.getLogger(WorkExecutorPoolImpl.class);
 
     /**
      * Creates a pool with the specified minimum and maximum sizes. The Channel

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
Thu Dec  4 09:55:02 2008
@@ -39,8 +39,8 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import junit.framework.TestCase;
 
 /**
@@ -49,7 +49,7 @@
  * @version $Rev$ $Date$
  */
 public class ConnectionManagerTestUtils extends TestCase implements DefaultInterceptor {
-    protected static final Log log = LogFactory.getLog(ConnectionManagerTestUtils.class);
+    protected static final Logger log = LoggerFactory.getLogger(ConnectionManagerTestUtils.class);
     
     protected boolean useTransactionCaching = true;
     protected boolean useLocalTransactions = false;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
Thu Dec  4 09:55:02 2008
@@ -32,10 +32,10 @@
 import javax.resource.spi.work.WorkListener;
 
 import junit.framework.TestCase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.manager.XAWork;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Timing is crucial for this test case, which focuses on the synchronization
@@ -251,7 +251,7 @@
     }
 
     public static class DummyWork implements Work {
-        private Log log = LogFactory.getLog(getClass());
+        private Logger log = LoggerFactory.getLogger(getClass());
 
         private final String name;
         private final int tempo;
@@ -278,7 +278,7 @@
     }
 
     public static class DummyWorkListener implements WorkListener {
-        private Log log = LogFactory.getLog(getClass());
+        private Logger log = LoggerFactory.getLogger(getClass());
 
         public WorkEvent acceptedEvent;
         public WorkEvent rejectedEvent;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
Thu Dec  4 09:55:02 2008
@@ -33,11 +33,17 @@
 
     <dependencies>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
 
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jta_1.1_spec</artifactId>
         </dependency>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
Thu Dec  4 09:55:02 2008
@@ -26,8 +26,6 @@
 import java.util.Map;
 import javax.transaction.xa.Xid;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.manager.LogException;
 import org.apache.geronimo.transaction.manager.Recovery;
 import org.apache.geronimo.transaction.manager.TransactionBranchInfo;
@@ -45,6 +43,8 @@
 import org.objectweb.howl.log.xa.XACommittingTx;
 import org.objectweb.howl.log.xa.XALogRecord;
 import org.objectweb.howl.log.xa.XALogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
@@ -57,7 +57,7 @@
 
     static final String[] TYPE_NAMES = {null, "PREPARE", "COMMIT", "ROLLBACK"};
 
-    private static final Log log = LogFactory.getLog(HOWLLog.class);
+    private static final Logger log = LoggerFactory.getLogger(HOWLLog.class);
 
     private File serverBaseDir;
     private String logFileDir;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java
Thu Dec  4 09:55:02 2008
@@ -33,8 +33,9 @@
 import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  *
@@ -43,7 +44,7 @@
  *
  * */
 public class RecoveryImpl implements Recovery {
-    private static final Log log = LogFactory.getLog("Recovery");
+    private static final Logger log = LoggerFactory.getLogger("Recovery");
 
     private final TransactionLog txLog;
     private final XidFactory xidFactory;
@@ -108,7 +109,7 @@
                         xaResource.commit(xid, false);
                     } catch(XAException e) {
                         recoveryErrors.add(e);
-                        log.error(e);
+                        log.error("Recovery error", e);
                     }
                     removeNameFromTransaction(xidNamesPair, name, true);
                 }
@@ -118,7 +119,7 @@
                     xaResource.rollback(xid);
                 } catch (XAException e) {
                     recoveryErrors.add(e);
-                    log.error(e);
+                    log.error("Could not roll back", e);
                 }
             } else if (xidFactory.matchesBranchId(xid.getBranchQualifier())) {
                 //our branch, but we did not start this tx.
@@ -129,7 +130,7 @@
                         xaResource.rollback(xid);
                     } catch (XAException e) {
                         recoveryErrors.add(e);
-                        log.error(e);
+                        log.error("Could not roll back", e);
                     }
                 } else {
                     //we prepared this branch, must wait for commit/rollback command.
@@ -175,7 +176,7 @@
                 txLog.commit(xidBranchesPair.getXid(), xidBranchesPair.getMark());
             } catch (LogException e) {
                 recoveryErrors.add(e);
-                log.error(e);
+                log.error("Could not commit", e);
             }
         }
     }

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Thu Dec  4 09:55:02 2008
@@ -40,8 +40,9 @@
 import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Basic local transaction with support for multiple resources.
@@ -49,7 +50,7 @@
  * @version $Rev$ $Date$
  */
 public class TransactionImpl implements Transaction {
-    private static final Log log = LogFactory.getLog("Transaction");
+    private static final Logger log = LoggerFactory.getLogger("Transaction");
 
     private final XidFactory xidFactory;
     private final Xid xid;

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
Thu Dec  4 09:55:02 2008
@@ -30,9 +30,9 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicLong;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.log.UnrecoverableLog;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Simple implementation of a transaction manager.
@@ -40,7 +40,7 @@
  * @version $Rev$ $Date$
  */
 public class TransactionManagerImpl implements TransactionManager, UserTransaction, TransactionSynchronizationRegistry,
XidImporter, MonitorableTransactionManager, RecoverableTransactionManager {
-    private static final Log log = LogFactory.getLog(TransactionManagerImpl.class);
+    private static final Logger log = LoggerFactory.getLogger(TransactionManagerImpl.class);
     protected static final int DEFAULT_TIMEOUT = 600;
     protected static final byte[] DEFAULT_TM_ID = new byte[] {71,84,77,73,68};
 
@@ -50,7 +50,7 @@
     private final ThreadLocal transactionTimeoutMilliseconds = new ThreadLocal();
     private final ThreadLocal threadTx = new ThreadLocal();
     private final ConcurrentHashMap associatedTransactions = new ConcurrentHashMap();
-    private static final Log recoveryLog = LogFactory.getLog("RecoveryController");
+    private static final Logger recoveryLog = LoggerFactory.getLogger("RecoveryController");
     final Recovery recovery;
     private final CopyOnWriteArrayList transactionAssociationListeners = new CopyOnWriteArrayList();
     private List recoveryErrors = new ArrayList();
@@ -334,7 +334,7 @@
 
     //Recovery
     public void recoveryError(Exception e) {
-        recoveryLog.error(e);
+        recoveryLog.error("Recovery error", e);
         recoveryErrors.add(e);
     }
 

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml?rev=723385&r1=723384&r2=723385&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml (original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml Thu Dec 
4 09:55:02 2008
@@ -34,6 +34,10 @@
     <packaging>pom</packaging>
     <name>Geronimo TxManager</name>
     
+    <description>
+        Geronimo Transaction Manager
+    </description>
+    
     <scm>
         <connection>scm:svn:https://svn.apache.org/repos/asf/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/</developerConnection>
@@ -55,9 +59,16 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
-                <groupId>commons-logging</groupId>
-                <artifactId>commons-logging</artifactId>
-                <version>1.0.4</version>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.5.0</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>1.5.0</version>
+                <scope>test</scope>
             </dependency>
 
             <dependency>
@@ -77,6 +88,13 @@
                 <artifactId>howl</artifactId>
                 <version>1.0.1-1</version>
             </dependency>
+            
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>3.8.2</version>
+                <scope>test</scope>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 



Mime
View raw message