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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Nov 18 13:19:11 EST 2009


Author: whitingjr
Date: 2009-11-18 13:19:11 -0500 (Wed, 18 Nov 2009)
New Revision: 30200

Added:
   labs/jbosstm/workspace/whitingjr/trunk/performance/build.properties
Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
Log:
Incomplete - taskConfigure PostgreSQL 

Complete - taskAdd a properties file to load default commands


Added: labs/jbosstm/workspace/whitingjr/trunk/performance/build.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/build.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/build.properties	2009-11-18 18:19:11 UTC (rev 30200)
@@ -0,0 +1,12 @@
+# Properties file for setting default profiling flags
+
+# required
+
+transaction.strategy=jta-managed
+db.installation=remote-db
+db.vendor=oracle
+jdbc-datasource=xa
+
+# optional
+
+transaction.log.store=logs

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-11-18 17:35:21 UTC (rev 30199)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml	2009-11-18 18:19:11 UTC (rev 30200)
@@ -6,30 +6,40 @@
 	tests the quantity of time components demand for applications using ORM and a database can be
 	captured for comparison and analysis.
 	The criteria for comparison are: database vendor, JDBC native or JTA managed transaction
-	and datasource configuration using a XA aware resource driver.
+	and resource datasource configuration.
 	To run the performance tests you will need to download the client database driver
 	appropriate to the database(s) profiled against. Follow the configuration instructions 
 	in the INSTALL.txt file.
 	
 	 Each database driver is installed using this
 	pattern. Place the driver jar file in the following directory
-	./performance/libs/dbdrivers/<dbvendor>/
-	The <dbvendor> directory created is used later in the command line.
+	./libs/dbdrivers/<dbvendor>/
+	The <dbvendor> directory for common vendors are already created. It is used later in the 
+	command flags.
 	
-	Then the database connection details require configuring. Create a directory
-	using the same <dbvendor> used in the previous step.
+	Then the database connection details require configuring. Again a directory has been
+	created for common databases.
 	./performance/src/main/resources/properties/database/<dbvendor>/
-	Then copy the contents of the sample directory into the one just created.
+	If the database you are using does not already exist then copy an existing
+	directory of vendor properties. Use an identical directory name created for the driver.
+	
+	To summarise, if the vendor is not prepared create directories with an identical 
+	vendor name (no spaces) in these locations:
+	./libs/dbdrivers/<dbvendor>
+	./src/main/resources/properties/database/<dbvendor>
+	./src/main/resources/xsl/database/<dbvendor>
 	 -->
+
+	<!-- TODO: Remove obsolete properties and dependencies. -->
+	<property name="build.classes.dir" value="build/classes" />
+	<property name="test.output.dir" value="target" />
 	
-	<!-- TODO: Remove obsolete properties and dependencies. -->
-	<property name="build.classes.dir" value="build/classes"/>
-
+   <property file="build.properties"/>
 	<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" />
-	<property name="properties.home" value="src/main/resources/properties/database" />
+	<property name="properties.home" value="src/main/resources/properties" />
 
 	<path id="database.driver">
 		<fileset dir="${driver.home}/${db.vendor}">
@@ -63,6 +73,8 @@
 		<pathelement path="lib/slf4j-log4j12-1.5.8.jar" />
 		<pathelement path="lib/commons-dbutils-1.2.jar" />
 		<pathelement path="lib/commons-io-1.4.jar" />
+		<pathelement path="lib/commons-collections-3.2.1.jar" />
+		<pathelement path="lib/commons-lang-2.4.jar" />
 		<path refid="database.driver" />
 	</path>
 
@@ -75,9 +87,9 @@
 		<path refid="run.classpath" />
 		<pathelement path="src/test/resources" />
 	</path>
-	
-	<taskdef resource="testngtasks" classpathref="test.classpath"/>
 
+	<taskdef resource="testngtasks" classpathref="test.classpath" />
+
 	<target name="check-arguments">
 
 		<fail message="Usage: ant ${required-args}">
@@ -120,7 +132,7 @@
 			<condition>
 				<not>
 					<or>
-                  <equals arg1="${jdbc-datasource}" arg2="local-tx" />
+						<equals arg1="${jdbc-datasource}" arg2="local-tx" />
 						<equals arg1="${jdbc-datasource}" arg2="xa" />
 					</or>
 				</not>
@@ -149,7 +161,7 @@
 		<fail message="Database properties have not been configured for the installation. [${properties.home}/${db.vendor}/database-locations/${db.installation}]">
 			<condition>
 				<not>
-					<available file="${properties.home}/${db.vendor}/database-locations/${db.installation}" />
+					<available file="${properties.home}/database/${db.vendor}/database-locations/${db.installation}" />
 				</not>
 			</condition>
 		</fail>
@@ -175,11 +187,15 @@
 		<mkdir dir="build/classes/META-INF" />
 
 		<!-- load properties, specific first then general -->
-		<loadproperties srcfile="src/main/resources/properties/log-store/store-data.properties" />
-		<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" />
+		<loadproperties srcfile="${properties.home}/log-store/store-data.properties" />
+		<loadproperties srcfile="${properties.home}/jdbc-resource/${jdbc-datasource}/datasource.properties" />
+		<loadproperties srcfile="${properties.home}/database/${db.vendor}/database-locations/${db.installation}/db-installation.properties">
+			<filterchain>
+				<expandproperties />
+			</filterchain>
+		</loadproperties>
+		<loadproperties srcfile="${properties.home}/database/${db.vendor}/db-profile.properties" />
+		<loadproperties srcfile="${properties.home}/database/shared-database.properties" />
 		<copy file="src/main/resources/profile-remote.properties" tofile="build/classes/profile.properties">
 			<filterchain>
 				<expandproperties />
@@ -190,12 +206,19 @@
 				<expandproperties />
 			</filterchain>
 		</copy>
-		<copy file="src/main/resources/META-INF/caveatemptor-beans.xml" todir="build/classes/META-INF">
+		<copy file="src/main/resources/META-INF/caveatemptor-beans.xml" tofile="build/classes/META-INF/caveatemptor-beans-${db.vendor}.xml">
 			<filterchain>
 				<expandproperties />
 				<expandproperties />
 			</filterchain>
 		</copy>
+		<!-- Use stylesheet to transform result tree, each vendor datasource has specific needs. -->
+		<xslt in="build/classes/META-INF/caveatemptor-beans-${db.vendor}.xml" out="build/classes/META-INF/caveatemptor-beans.xml" style="src/main/resources/xsl/database/${db.vendor}/${db.vendor}.xsl">
+			<outputproperty name="indent" value="yes" />
+		</xslt>
+		<xslt in="src/main/resources/basedata.xml" out="build/classes/basedata.xml" style="src/main/resources/xsl/basedata.xsl">
+			<outputproperty name="indent" value="yes" />
+		</xslt>
 
 		<copy file="src/main/resources/log4j.xml" todir="build/classes" />
 
@@ -219,8 +242,7 @@
 		<copy file="src/main/resources/embedded-jboss-beans.xml" todir="build/classes" />
 		<copy file="src/main/resources/ejb3-interceptors-aop.xml" todir="build/classes" />
 		<copy file="src/main/resources/jndi.properties" todir="build/classes" />
-		<copy file="src/main/resources/properties/transaction-management/${transaction.strategy}/default.persistence.properties" todir="build/classes" />
-		<copy todir="build/classes" file="src/main/resources/basedata.xml" />
+		<copy file="${properties.home}/transaction-management/${transaction.strategy}/default.persistence.properties" todir="build/classes" />
 		<unzip dest="build/classes" src="lib/caveatemptor-jpa.jar">
 			<patternset>
 				<include name="**/*.class" />
@@ -238,9 +260,9 @@
 			<xmlfileset file="build/classes/testsuite-integration.xml" />
 		</testng>
 	</target>
-	
+
 	<target name="categorise" depends="profile">
-		
+
 	</target>
 
 	<target name="usage">



More information about the jboss-svn-commits mailing list