[jboss-svn-commits] JBL Code SVN: r31830 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance: configuration and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Feb 24 10:06:39 EST 2010


Author: whitingjr
Date: 2010-02-24 10:06:38 -0500 (Wed, 24 Feb 2010)
New Revision: 31830

Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/MultiThreadedTest.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/configuration/JPAConfiguration.java
Log:
Added connection handling. Can now bypass the connection pool. 

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/MultiThreadedTest.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/MultiThreadedTest.java	2010-02-24 15:06:12 UTC (rev 31829)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/MultiThreadedTest.java	2010-02-24 15:06:38 UTC (rev 31830)
@@ -21,7 +21,7 @@
    {
       /**
        * Here we will be using a cyclic barrier to organise the threads running
-       * the test case tasks and the monitor thread. This method should not complete
+       * the test case tasks and the monitor thread. This method does not complete
        * until all workers have finished. The barrier is triggered and all fall out
        * of method frame.
        * This thread is included in the barrier to ensure this thread 

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/configuration/JPAConfiguration.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/configuration/JPAConfiguration.java	2010-02-24 15:06:12 UTC (rev 31829)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/configuration/JPAConfiguration.java	2010-02-24 15:06:38 UTC (rev 31830)
@@ -3,25 +3,33 @@
 import java.util.Stack;
 
 import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
 import javax.transaction.UserTransaction;
 
+import org.jboss.jbossts.performance.task.pooling.ConnectionHandler;
+
+/**
+ * This object is used to bundle together all the references needed by the profiling
+ * framework.
+ * Use a connection handler to provide a way to provide Connection objects
+ * that are handled differently between executions.
+ * 
+ * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+ * @version $Revision: 1.1 $
+ */
 public class JPAConfiguration extends ConcurrentTaskConfiguration
 {
    private final EntityManagerFactory entityManagerFactoryA;
    private final EntityManagerFactory entityManagerFactoryB;
-   private final DataSource dataSourceA;
-   private final DataSource dataSourceB;
    private final UserTransaction userTransaction;
+   private final ConnectionHandler connectionHandler;
 
-   public JPAConfiguration(final DataSource resA, final DataSource resB, final UserTransaction userT ,final EntityManagerFactory sFactoryA, final EntityManagerFactory sFactoryB,  final int iterations, 
+   public JPAConfiguration(final ConnectionHandler handler, final UserTransaction userT ,final EntityManagerFactory sFactoryA, final EntityManagerFactory sFactoryB,  final int iterations, 
          final boolean isOptionalWEnabled, final Stack stack, final MultithreadedTestConfiguration testConf)
    {
       super(iterations, isOptionalWEnabled, stack, testConf);
       this.entityManagerFactoryA = sFactoryA;
       this.entityManagerFactoryB = sFactoryB;
-      this.dataSourceA = resA;
-      this.dataSourceB = resB;
+      this.connectionHandler = handler;
       this.userTransaction = userT;
    }
 
@@ -35,18 +43,12 @@
       return entityManagerFactoryB;
    }
 
-   public DataSource getDataSourceA()
+   public UserTransaction getUserTransaction()
    {
-      return dataSourceA;
+      return userTransaction;
    }
-
-   public DataSource getDataSourceB()
+   public ConnectionHandler getConnectionHandler()
    {
-      return dataSourceB;
+      return connectionHandler;
    }
-
-   public UserTransaction getUserTransaction()
-   {
-      return userTransaction;
-   }
 }



More information about the jboss-svn-commits mailing list