[jboss-svn-commits] JBL Code SVN: r29825 - labs/jbosstm/workspace/whitingjr/trunk/performance.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 26 14:07:09 EDT 2009


Author: whitingjr
Date: 2009-10-26 14:07:09 -0400 (Mon, 26 Oct 2009)
New Revision: 29825

Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
Log:
Added jdbc configuration parameter support.

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-10-26 18:06:37 UTC (rev 29824)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-10-26 18:07:09 UTC (rev 29825)
@@ -6,7 +6,7 @@
 	${jboss.server.data.dir}
 	   -->
 
-	<property name="required-args" value="-Dtransaction.strategy=value -Ddb.installation=value -Ddb.vendor=value" />
+	<property name="required-args" value="-Dtransaction.strategy=value -Ddb.installation=value -Ddb.vendor=value -Djdbc-datasource=value" />
 	<property name="optional-args" value="-Dtransaction.log.store=value" />
 
 	<property name="driver.home" value="lib/dbdrivers" />
@@ -27,8 +27,8 @@
 		<path refid="project.classpath" />
 		<pathelement path="/home/whitingjr/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar" />
 		<pathelement path="lib/client.jar" />
-		<!--pathelement path="lib/caveatemptor-jpa.jar" /-->
 		<pathelement path="/home/whitingjr/.m2/repository/org/dbunit/dbunit/2.4.6/dbunit-2.4.6.jar" />
+		<pathelement path="lib/tomcat-integration.jar"/>
 	</path>
 
 	<path id="demo.run.classpath">
@@ -50,6 +50,7 @@
 						<isset property="transaction.strategy" />
 						<isset property="db.installation" />
 						<isset property="db.vendor" />
+						<isset property="jdbc-datasource" />
 					</and>
 				</not>
 			</condition>
@@ -77,6 +78,18 @@
 				</not>
 			</condition>
 		</fail>
+		
+		<fail message="JDBC configuration must be either [no-tx|xa|local-tx]">
+         <condition>
+            <not>
+               <or>
+                  <equals arg1="${jdbc-datasource}" arg2="no-tx" />
+                  <equals arg1="${jdbc-datasource}" arg2="xa" />
+               	<equals arg1="${jdbc-datasource}" arg2="local-tx" />
+               </or>
+            </not>
+         </condition>
+      </fail>
 
 		<fail message="Specify log store configuration when jta-managed. Usage: ant ${required-args} ${optional-args}">
 			<condition>
@@ -110,8 +123,11 @@
 		<mkdir dir="build" />
 		<mkdir dir="build/classes" />
 		<mkdir dir="build/classes/META-INF" />
+		
+		
 
 		<!-- load properties, specific first then general -->
+		<loadproperties srcfile="src/main/resources/properties/jdbc-resource/${jdbc-datasource}/datasource.properties"/>
 		<loadproperties srcfile="src/main/resources/properties/database/${db.vendor}/database-locations/${db.installation}/db-installation.properties" />
 		<loadproperties srcfile="src/main/resources/properties/database/${db.vendor}/db-profile.properties" />
 		<loadproperties srcfile="src/main/resources/properties/database/shared-database.properties" />
@@ -128,10 +144,13 @@
 		<copy file="src/main/resources/META-INF/caveatemptor-beans.xml" todir="build/classes/META-INF">
 			<filterchain>
 				<expandproperties />
+				<expandproperties />
 			</filterchain>
 		</copy>
 
 		<copy file="src/main/resources/log4j.xml" todir="build/classes" />
+		
+		<copy file="/home/whitingjr/eclipse/v3.5-galileo/workspaces/performance/tomcat-integration/tomcat-integration.jar" todir="lib"/>
 
 		<delete dir="${test.output.dir}" />
 		<mkdir dir="${test.output.dir}" />



More information about the jboss-svn-commits mailing list