[jboss-cvs] JBossAS SVN: r110680 - in projects/jboss-jca/branches/performance/jmeter: src/main/resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 15 13:27:02 EST 2011
Author: whitingjr
Date: 2011-02-15 13:27:02 -0500 (Tue, 15 Feb 2011)
New Revision: 110680
Removed:
projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml
Modified:
projects/jboss-jca/branches/performance/jmeter/build.xml
projects/jboss-jca/branches/performance/jmeter/src/main/resources/database.properties
projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-ds.xml
Log:
Update properties file with default values. Removed obsolete XML. Added properties to sever exec to use property resolution feature. Property resolving used when loading the datasource.
Modified: projects/jboss-jca/branches/performance/jmeter/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/build.xml 2011-02-15 18:10:17 UTC (rev 110679)
+++ projects/jboss-jca/branches/performance/jmeter/build.xml 2011-02-15 18:27:02 UTC (rev 110680)
@@ -35,7 +35,6 @@
<property name="javac.deprecation" value="false" />
<property name="javac.optimize" value="false" />
<property name="target.dir" value="false" />
- <!--property name="server-home" value="../root/servers/jbjca-${ironjacamar.version}/ironjacamar-${ironjacamar.version}" /-->
<property name="server-home" value="../../target/sjc" />
<property name="jbjca.home" value="${build-root.root.dir}/servers/${jbjca.version}/ironjacamar-${jbjca.kit}"/>
<property name="jmeter.tools.dir" value="../tools/jmeter" />
@@ -193,7 +192,7 @@
<target name="deploy" depends="wars">
<copy file="${build.jmeter.dir}/wars/jbjca-web.war" todir="${server-home}/system" />
- <copy file="src/main/resources/jca-local-h2-ds.xml" todir="${server-home}/deploy" overwrite="yes"/>
+ <copy file="src/main/resources/jca-ds.xml" todir="${server-home}/deploy" overwrite="yes"/>
<copy file="${build.jmeter.dir}/jars/jmeter-jmx-extension.jar" todir="../tools/jmeter/lib/ext"/>
<copy todir="../tools/jmeter/lib">
<fileset dir="${hsqldb.tools.dir}/lib" >
@@ -323,16 +322,23 @@
<echo message="Loaded Byteman Rules for tx monitoring." />
</target>
+ <target name="remove-rules">
+ <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath" failonerror="false">
+ <arg value="-u"/>
+ </java>
+ </target>
+
<target name="server" unless="server.isAvailable" depends="deploy,check-server-isRunning,build-servers.os-check">
- <exec executable="${exec}" spawn="true" dir="${server-home}/bin">
- <arg line="run.${ext} -b ${env.HOSTNAME}"/>
- <env key="JAVA_OPTS" value="-javaagent:${byteman.tools.dir}/lib/byteman.jar=listener:true -Djdbc.url=${db-vendor.connectionURL}"/>
- <!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Dorg.jboss.byteman.verbose-->
+ <echo message="[${db-vendor.connectionURL}]"/>
+ <exec executable="${exec}" spawn="true" dir="${server-home}/bin">
+ <arg line="run.${ext} -b ${env.HOSTNAME} "/>
+ <env key="JAVA_OPTS" value="-javaagent:${byteman.tools.dir}/lib/byteman.jar=listener:true -Ddb-vendor.connectionURL=${db-vendor.connectionURL} -Ddb-vendor.driverClass=${db-vendor.driverClass}"/>
+
+ <!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Dorg.jboss.byteman.verbose-->
</exec>
<parallel>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
- <!--http url="http://${env.HOSTNAME}:8080/" /-->
<socket server="${env.HOSTNAME}" port="8080" />
</waitfor>
</parallel>
@@ -340,9 +346,9 @@
<antcall target="load-rules" />
-->
<echo message="Started server."/>
- <!--
+
<antcall target="server-sample-data" />
- -->
+
<get src="http://${env.HOSTNAME}:8080/jbjca-web/jcaconn" dest="/tmp/"/>
</target>
@@ -387,11 +393,6 @@
</target>
<target name="shutdown-server">
- <!--
- <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath" failonerror="false">
- <arg value="-u"/>
- </java>
- -->
<java jar="${server-home}/lib/fungal-cli.jar" fork="true">
<arg line="-h ${env.HOSTNAME} shutdown"/>
</java>
@@ -410,7 +411,10 @@
</target>
<target name="hostinfo">
-
<echo message="[${NAME}] [${DOMAIN}] [${ADDR4}] [${ADDR6}] [${env.HOSTNAME}]"/>
</target>
+
+ <target name="databaseinfo">
+ <echo message="[${vendor}] [${db-vendor.connectionURL}] [${db-vendor.shutdown.connectionURL}] [${db-vendor.serverName}] [${ADDR6}] [${env.HOSTNAME}]"/>
+ </target>
</project>
\ No newline at end of file
Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/database.properties
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/database.properties 2011-02-15 18:10:17 UTC (rev 110679)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/database.properties 2011-02-15 18:27:02 UTC (rev 110680)
@@ -1,6 +1,12 @@
-# HSQLDB
+# HSQLDB is the default, change to another provider if required
+# the current in memory HSQLDB configuration supports, 1 or 2 tier testing.
+# to enable 3 tier testing switch to postgresql and use a database
+# server.
-db-vendor.connectionURL=jdbc:hsqldb:hsql://${db-vendor.serverName}
+# the values in this file can be overridden if they are defined on
+# the command line.
+
+db-vendor.connectionURL=jdbc:hsqldb:mem:${db-vendor.database}
db-vendor.shutdown.connectionURL=${db-vendor.connectionURL}
db-vendor.userName=sa
@@ -8,34 +14,38 @@
db-vendor.serverName=${env.HOSTNAME}
db-vendor.serverPort=9001
-db-vendor.database=test
+db-vendor.database=jca
db-vendor.driverClass=org.hsqldb.jdbcDriver
+drop-statements=
+create-statements=
+insert-statements=
+
# H2
-#db-vendor.connectionURL=jdbc:h2:mem:${db-vendor.database};DB_CLOSE_DELAY=-1
-#db-vendor.shutdown.connectionURL=jdbc:h2:tcp://${db-vendor.serverName}/~/${db-vendor.database};IFEXISTS=true;DB_CLOSE_DELAY=2
+#h2.db-vendor.connectionURL=jdbc:h2:mem:${db-vendor.database};DB_CLOSE_DELAY=-1
+#h2.db-vendor.shutdown.connectionURL=jdbc:h2:tcp://${db-vendor.serverName}/~/${db-vendor.database};IFEXISTS=true;DB_CLOSE_DELAY=2
#
-#db-vendor.userName=sa
-#db-vendor.password=
+#h2.db-vendor.userName=sa
+#h2.db-vendor.password=
#
-#db-vendor.serverName=${env.HOSTNAME}
-#db-vendor.serverPort=9092
-#db-vendor.database=test
+#h2.db-vendor.serverName=${env.HOSTNAME}
+#h2.db-vendor.serverPort=9092
+#h2.db-vendor.database=test
#
-#db-vendor.driverClass=org.h2.Driver
+#h2.db-vendor.driverClass=org.h2.Driver
# Postgres
-#db-vendor.connectionURL=jdbc:postgresql://${db-vendor.serverName}:${db-vendor.serverPort}/${db-vendor.database}
-#db-vendor.shutdown.connectionURL=
-#
-#db-vendor.userName=sa
-#db-vendor.password=
-#
-#db-vendor.serverName=${env.HOSTNAME}
-#db-vendor.serverPort=
-#db-vendor.database=test
+#postgres.db-vendor.connectionURL=jdbc:postgresql://${postgres.db-vendor.serverName}:${postgres.db-vendor.serverPort}/${postgres.db-vendor.database}
+#postgres.db-vendor.shutdown.connectionURL=
-#db-vendor.driverClass=
\ No newline at end of file
+#postgres.db-vendor.userName=faban
+#postgres.db-vendor.password=faban
+
+#postgres.db-vendor.serverName=${env.HOSTNAME}
+#postgres.db-vendor.serverPort=5432
+#postgres.db-vendor.database=jca
+
+#postgres.db-vendor.driverClass=org.postgresql.Driver
\ No newline at end of file
Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-ds.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-ds.xml 2011-02-15 18:10:17 UTC (rev 110679)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-ds.xml 2011-02-15 18:27:02 UTC (rev 110680)
@@ -25,14 +25,16 @@
<datasource jndi-name="SampleDS" pool-name="SampleDS">
<!--
<connection-url>jdbc:hsqldb:mem:test</connection-url>
- -->
+
<connection-url>jdbc:postgresql://whitingjrlite.localdomain/jca</connection-url>
-
+ -->
+ <connection-url>${db-vendor.connectionURL}</connection-url>
<!-- The driver class -->
<!--
<driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <driver-class>org.postgresql.Driver</driver-class>
-->
- <driver-class>org.postgresql.Driver</driver-class>
+ <driver-class>${db-vendor.driverClass}</driver-class>
<pool>
<!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
<min-pool-size>5</min-pool-size>
@@ -45,8 +47,8 @@
<user-name>sa</user-name>
<password></password>
-->
- <user-name>faban</user-name>
- <password>faban</password>
+ <user-name>sa</user-name>
+ <password></password>
</security>
<validation>
<!--valid-connection-checker-class-name>org.jboss.jca.adapters.jdbc.ValidConnectionChecker</valid-connection-checker-class-name-->
@@ -66,7 +68,5 @@
<!-- HSQL DB benefits from prepared statement caching -->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</statement>
-
-
</datasource>
</datasources>
\ No newline at end of file
Deleted: projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml 2011-02-15 18:10:17 UTC (rev 110679)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml 2011-02-15 18:27:02 UTC (rev 110680)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.
--->
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
- <datasource jndi-name="SampleDS" pool-name="SampleDS">
- <!--
- <connection-url>jdbc:hsqldb:mem:test</connection-url>
- -->
- <connection-url>jdbc:postgresql://whitingjrlite.localdomain/jca</connection-url>
-
- <!-- The driver class -->
- <!--
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- -->
- <driver-class>org.postgresql.Driver</driver-class>
- <pool>
- <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
- <min-pool-size>5</min-pool-size>
- <!-- The maximum connections in a pool/sub-pool -->
- <max-pool-size>300</max-pool-size>
- <!-- The login and password -->
- </pool>
- <security>
- <!--
- <user-name>sa</user-name>
- <password></password>
- -->
- <user-name>faban</user-name>
- <password>faban</password>
- </security>
- <validation>
- <!--valid-connection-checker-class-name>org.jboss.jca.adapters.jdbc.ValidConnectionChecker</valid-connection-checker-class-name-->
- </validation>
- <time-out>
- <!-- The time before an unused connection is destroyed -->
- <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
- <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
- <idle-timeout-minutes>0</idle-timeout-minutes>
- </time-out>
-
- <statement>
- <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature
- that should be turned off in production
- Turned off for performance optimisation.-->
- <track-statements>false</track-statements>
- <!-- HSQL DB benefits from prepared statement caching -->
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
- </statement>
-
-
- </datasource>
-</datasources>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list