[jboss-svn-commits] JBL Code SVN: r32342 - labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/pooling.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 1 10:33:34 EDT 2010


Author: whitingjr
Date: 2010-04-01 10:33:33 -0400 (Thu, 01 Apr 2010)
New Revision: 32342

Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/pooling/CachedConnection.java
Log:
Added logger.

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/pooling/CachedConnection.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/pooling/CachedConnection.java	2010-04-01 14:27:16 UTC (rev 32341)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/pooling/CachedConnection.java	2010-04-01 14:33:33 UTC (rev 32342)
@@ -1,24 +1,24 @@
- /*
-  * 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.
-  */
+/*
+ * 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.jbossts.performance.task.pooling;
 
@@ -27,6 +27,8 @@
 
 import javax.sql.DataSource;
 
+import org.apache.log4j.Logger;
+
 /**
  * This object provides Connection objects using lazy loading. This 
  * is necessary to ensure the Connection objects are loaded in
@@ -38,16 +40,25 @@
 public class CachedConnection implements ConnectionHandler
 {
    private final DataSource resA;
+
    private final DataSource resB;
-   private Connection connectionA;
-   private Connection connectionB;
-   
+
+   protected Connection connectionA;
+
+   protected Connection connectionB;
+
+   private final Logger logger = Logger.getLogger(CachedConnection.class);
+
+
    public CachedConnection(final DataSource dataSourceA, final DataSource dataSourceB)
    {
       this.resA = dataSourceA;
       this.resB = dataSourceB;
    }
-   
+
+   /**
+    * Retrieve a Connection from the first resource.
+    */
    @Override
    public Connection getConnectionA() throws SQLException
    {
@@ -55,6 +66,7 @@
       {
          this.connectionA = resA.getConnection();
       }
+
       return this.connectionA;
    }
 
@@ -67,7 +79,10 @@
       }
       return this.connectionB;
    }
-   
+
+   /**
+    * Fake closing the connection.
+    */
    @Override
    public Connection closeQuietly(Connection conn) throws SQLException
    {
@@ -76,4 +91,5 @@
       return conn;
    }
 
+
 }



More information about the jboss-svn-commits mailing list