[jboss-svn-commits] JBL Code SVN: r29878 - in labs/jbosstm/workspace/whitingjr/trunk/performance: src/main/java/org/jboss/jbossts/performance and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 30 11:44:43 EDT 2009


Author: whitingjr
Date: 2009-10-30 11:44:43 -0400 (Fri, 30 Oct 2009)
New Revision: 29878

Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
   labs/jbosstm/workspace/whitingjr/trunk/performance/pom.xml
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/MCXaDataSourceWrapper.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/basedata.xml
Log:
Updated configuration to add properties and system properties. Fixed problem with TransactionalDriver not finding the jndi name or context factory.
About to try configuring the dependencies to upgrade the JTA libraries to fix problem with unsupported Connection methods used by Hibernate.

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-10-30 15:00:29 UTC (rev 29877)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-10-30 15:44:43 UTC (rev 29878)
@@ -33,13 +33,15 @@
 		<pathelement path="lib/client.jar" />
 		<pathelement path="/home/whitingjr/.m2/repository/org/dbunit/dbunit/2.4.6/dbunit-2.4.6.jar" />
 		<pathelement path="lib/tomcat-integration.jar"/>
-		<pathelement path="lib/jboss-jta-4.3.jar"/>
+		<!--pathelement path="lib/jboss-jta-4.3.jar"/-->
 		<pathelement path="lib/testng-5.10-jdk15.jar"/>
 	</path>
 
 	<path id="demo.run.classpath">
 		<path refid="demo.compile.classpath" />
 		<pathelement path="build/classes" />
+		<pathelement path="${M2_HOME}/repository/org/jboss/jbossjta/jbossjta/4.7.0_GA/jbossjta-4.7.0_GA-standalone.jar"/>
+		<pathelement path="lib/jboss-ejb3-all.jar"/>
 	</path>
 
 	<path id="demo.test.classpath">

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/pom.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/pom.xml	2009-10-30 15:00:29 UTC (rev 29877)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/pom.xml	2009-10-30 15:44:43 UTC (rev 29878)
@@ -39,10 +39,21 @@
 			<version>2.4.6</version>
 		</dependency>
 		<dependency>
-         <groupId>org.jboss.jbossts</groupId>
-         <artifactId>jboss-jta</artifactId>
-         <version>4.3</version>
-      </dependency>
+			<groupId>org.jboss.jbossjta</groupId>
+			<artifactId>jbossjta</artifactId>
+			<version>4.7.0_GA</version>
+			<classifier>standalone</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.jbossts</groupId>
+			<artifactId>jbossts-common</artifactId>
+			<version>4.3</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss</groupId>
+			<artifactId>jnp-client</artifactId>
+			<version>4.2.2.GA</version>
+		</dependency>
 	</dependencies>
 	<build>
 		<plugins>
@@ -57,6 +68,6 @@
 			</plugin>
 		</plugins>
 	</build>
-	
-	
+
+
 </project>
\ No newline at end of file

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/MCXaDataSourceWrapper.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/MCXaDataSourceWrapper.java	2009-10-30 15:00:29 UTC (rev 29877)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/MCXaDataSourceWrapper.java	2009-10-30 15:44:43 UTC (rev 29878)
@@ -55,9 +55,13 @@
    protected Connection getTransactionalConnection(String url, Properties properties) throws SQLException
    {
       Connection returnValue = null;
-      
-      jdbcPropertyManager.propertyManager.setProperty("Context.INITIAL_CONTEXT_FACTORY", System.getProperty(Context.INITIAL_CONTEXT_FACTORY));
-      jdbcPropertyManager.propertyManager.setProperty("Context.URL_PKG_PREFIXES", System.getProperty(Context.URL_PKG_PREFIXES));
+      /* this is overkill but still */
+      String factory = (String)this.initialContextProperties.get(Context.INITIAL_CONTEXT_FACTORY);
+      String urlPkg = (String)this.initialContextProperties.get(Context.URL_PKG_PREFIXES);
+      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, factory);
+      System.setProperty(Context.URL_PKG_PREFIXES, urlPkg);
+      jdbcPropertyManager.propertyManager.setProperty("Context.INITIAL_CONTEXT_FACTORY", factory);
+      jdbcPropertyManager.propertyManager.setProperty("Context.URL_PKG_PREFIXES", urlPkg);
       try
       {
          returnValue = getTransactionalDriver().connect(url, properties);
@@ -75,14 +79,11 @@
    @Override
    public Connection getConnection() throws SQLException
    {
-       String stripped = _name.substring(6);
-       logger.info("Stripped jndi name ["+stripped+"].");
-       String url = TransactionalDriver.arjunaDriver + stripped;
-       // although we are not setting any properties, the driver will barf if we pass 'null'.
+       String url = TransactionalDriver.arjunaDriver + _name;
+       // set the properties the transactional driver is expecting, Context.blah
        Properties properties = new Properties();
        properties.setProperty("Context.INITIAL_CONTEXT_FACTORY", (String)this.initialContextProperties.get(Context.INITIAL_CONTEXT_FACTORY));
        properties.setProperty("Context.URL_PKG_PREFIXES", (String)this.initialContextProperties.get(Context.URL_PKG_PREFIXES));
-       logger.debug(properties);
        return getTransactionalConnection(url, properties);
    }   
 }

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/basedata.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/basedata.xml	2009-10-30 15:00:29 UTC (rev 29877)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/basedata.xml	2009-10-30 15:44:43 UTC (rev 29878)
@@ -68,25 +68,8 @@
         ZIPCODE         ="12345"
         CITY            ="Shippingcity"
     />
-<ITEM
-        ITEM_ID                 ="1"
-        OBJ_VERSION             ="0"
-        ITEM_NAME               ="Testitem 1"
-        DESCRIPTION             ="This is TestItem One."
-        INITIAL_PRICE           ="99"
-        INITIAL_PRICE_CURRENCY  ="USD"
-        RESERVE_PRICE           ="123"
-        RESERVE_PRICE_CURRENCY  ="USD"
-        START_DATE              ="2006-09-23 13:45:00"
-        END_DATE                ="2016-09-23 13:45:00"
-        ITEM_STATE              ="ACTIVE"
-        APPROVED_BY_USER_ID     ="1"
-        APPROVAL_DATETIME       ="2006-09-23 13:45:00"
-        SELLER_ID               ="1"
-        SUCCESSFUL_BID_ID       ="[NULL]"
-        CREATED                 ="2006-09-23 13:45:00"
-    />
 
+
 <BID
         BID_ID                  ="1"
         BID_AMOUNT              ="100"



More information about the jboss-svn-commits mailing list