[jboss-cvs] JBoss Messaging SVN: r2674 - in trunk: docs/examples/distributed-queue/etc and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 14 15:57:23 EDT 2007
Author: timfox
Date: 2007-05-14 15:57:23 -0400 (Mon, 14 May 2007)
New Revision: 2674
Modified:
trunk/docs/examples/distributed-queue/build.xml
trunk/docs/examples/distributed-queue/etc/jndi.properties
trunk/docs/examples/distributed-topic/build.xml
trunk/docs/examples/distributed-topic/etc/jndi.properties
trunk/docs/examples/queue-failover/build.xml
trunk/docs/examples/queue-failover/etc/jndi.properties
trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java
trunk/docs/examples/queue/src/org/jboss/example/jms/queue/QueueExample.java
trunk/tests/smoke/build.xml
trunk/util/release-admin.xml
Log:
More work on unscoped deployment, smoke tests and release-admin refactoring and simplification and clustered messaging
working in all config
Modified: trunk/docs/examples/distributed-queue/build.xml
===================================================================
--- trunk/docs/examples/distributed-queue/build.xml 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/distributed-queue/build.xml 2007-05-14 19:57:23 UTC (rev 2674)
@@ -4,6 +4,8 @@
To run the example, set JBOSS_HOME and run ant (with no parameters)
+ The example requires a two nodes messaging-node0 and messaging-node1 to be running
+
$Id: build.xml 974 2006-05-22 21:35:38 -0600 (Mon, 22 May 2006) ovidiu $
-->
@@ -16,6 +18,7 @@
<property name="messaging.client.jar.path" value="../../../output/lib"/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="jboss.configuration0" value="messaging-node0"/>
<property name="example.queue.name" value="testDistributedQueue"/>
<path id="common.compilation.classpath">
@@ -34,10 +37,10 @@
<pathelement path="./output/classes"/>
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
<fileset file="${jboss.home}/client/jbossall-client.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/log4j.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/javassist.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
</path>
<target name="identify">
Modified: trunk/docs/examples/distributed-queue/etc/jndi.properties
===================================================================
--- trunk/docs/examples/distributed-queue/etc/jndi.properties 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/distributed-queue/etc/jndi.properties 2007-05-14 19:57:23 UTC (rev 2674)
@@ -1,4 +1,5 @@
### JBossNS properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
+# Assuming ports-01 so naming running on 1199
+java.naming.provider.url=jnp://localhost:1199
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Modified: trunk/docs/examples/distributed-topic/build.xml
===================================================================
--- trunk/docs/examples/distributed-topic/build.xml 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/distributed-topic/build.xml 2007-05-14 19:57:23 UTC (rev 2674)
@@ -16,6 +16,7 @@
<property name="messaging.client.jar.path" value="../../../output/lib"/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="jboss.configuration0" value="messaging-node0"/>
<property name="example.topic.name" value="testDistributedTopic"/>
<path id="common.compilation.classpath">
@@ -34,10 +35,10 @@
<pathelement path="./output/classes"/>
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
<fileset file="${jboss.home}/client/jbossall-client.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/log4j.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/javassist.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
</path>
<target name="identify">
Modified: trunk/docs/examples/distributed-topic/etc/jndi.properties
===================================================================
--- trunk/docs/examples/distributed-topic/etc/jndi.properties 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/distributed-topic/etc/jndi.properties 2007-05-14 19:57:23 UTC (rev 2674)
@@ -1,4 +1,5 @@
### JBossNS properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
+# Asuming ports-01 where naming listens on 1199
+java.naming.provider.url=jnp://localhost:1199
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Modified: trunk/docs/examples/queue/src/org/jboss/example/jms/queue/QueueExample.java
===================================================================
--- trunk/docs/examples/queue/src/org/jboss/example/jms/queue/QueueExample.java 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/queue/src/org/jboss/example/jms/queue/QueueExample.java 2007-05-14 19:57:23 UTC (rev 2674)
@@ -82,6 +82,7 @@
connection.start();
message = (TextMessage)consumer.receive(2000);
+
log("Received message: " + message.getText());
assertEquals("Hello!", message.getText());
Modified: trunk/docs/examples/queue-failover/build.xml
===================================================================
--- trunk/docs/examples/queue-failover/build.xml 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/queue-failover/build.xml 2007-05-14 19:57:23 UTC (rev 2674)
@@ -16,6 +16,7 @@
<property name="messaging.client.jar.path" value="../../../output/lib"/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="jboss.configuration0" value="messaging-node0"/>
<property name="example.queue.name" value="testDistributedQueue"/>
<path id="common.compilation.classpath">
@@ -34,10 +35,10 @@
<pathelement path="./output/classes"/>
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
<fileset file="${jboss.home}/client/jbossall-client.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/log4j.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/lib/javassist.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration0}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
</path>
<target name="identify">
@@ -86,11 +87,6 @@
<target name="run" depends="deploy">
- <!--
- DistributedTopicExample expects to find the name of the topic to connect to as value of
- the 'example.topic.name' property, which *may* be defined by calling ant when this
- example is used in a smoke test.
- -->
<java classname="org.jboss.example.jms.failover.QueueFailoverExample"
classpathref="execution.classpath" fork="yes" failonerror="true">
<sysproperty key="example.queue.name" value="${example.queue.name}"/>
Modified: trunk/docs/examples/queue-failover/etc/jndi.properties
===================================================================
--- trunk/docs/examples/queue-failover/etc/jndi.properties 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/queue-failover/etc/jndi.properties 2007-05-14 19:57:23 UTC (rev 2674)
@@ -1,4 +1,5 @@
### JBossNS properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
+#Assuming ports-01 which binds jndi on 1199
+java.naming.provider.url=jnp://localhost:1199
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Modified: trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java
===================================================================
--- trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java 2007-05-14 19:57:23 UTC (rev 2674)
@@ -76,7 +76,7 @@
connection.start();
- // Send 2 messagea to the queue
+ // Send 2 messages to the queue
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -104,9 +104,9 @@
// Kill the active node
killActiveNode();
+
+ Thread.sleep(5000);
- Thread.sleep(30000); // TODO not necesare after we install the client valve
-
// receive the second message on the failed over node
TextMessage rm2 = (TextMessage)consumer.receive(2000);
Modified: trunk/tests/smoke/build.xml
===================================================================
--- trunk/tests/smoke/build.xml 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/tests/smoke/build.xml 2007-05-14 19:57:23 UTC (rev 2674)
@@ -2,6 +2,28 @@
<!-- $Id$ -->
+<!--
+
+ Run the messaging smoke tests
+ =============================
+
+ We only run smoke tests against JBAS 4.2.0.GA and later since this is what we support.
+
+ Any earlier versions are best effort.
+
+ The smoke tests require 3 servers configuration to be set up before running:
+
+ 1) ${JBOSS_HOME}/server/<jboss-configuration> non clustered config based on default
+
+ 2) ${JBOSS_HOME}/server/<jboss-configuration>0 clustered config based on all
+
+ 3) ${JBOSS_HOME}/server/<jboss-configuration>1 clustered config based on all
+
+ The configs should be running when the script is started
+
+
+-->
+
<project default="all" name="Messaging Smoke Test Suite">
<property environment="ENV"/>
@@ -14,7 +36,7 @@
<property name="relative.client.jar.location" value="../../util"/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="release.admin.target" value="default"/>
- <property name="jboss.configuration" value="messaging-smoke-test"/>
+ <property name="jboss.configuration" value="messaging"/>
<property name="messaging.client.jar.path" value="${basedir}/../../output/lib"/>
<property name="smoke.test.type" value="installation"/>
<property name="clustered" value="false"/>
@@ -33,7 +55,7 @@
<property name="run.mdb-failure.example" value="true"/>
<property name="run.http.example" value="true"/>
<property name="run.stateless.example" value="true"/>
- <property name="run.ejb3mdb.example" value="false"/>
+ <property name="run.ejb3mdb.example" value="true"/>
<property name="run.secure-socket.example" value="true"/>
<property name="run.distributed-queue.example" value="true"/>
<property name="run.distributed-topic.example" value="true"/>
@@ -63,10 +85,10 @@
<target name="all" depends="insure-smoke-properties">
<mkdir dir="./output"/>
<delete file="./output/smoke.log" quiet="true"/>
- <antcall target="build-deployment-archives-from-scratch"/>
<antcall target="installation-tests"/>
+<!--
<antcall target="old-server-compatibility-tests">
<param name="smoke.test.type" value="client.compatibility"/>
</antcall>
@@ -74,6 +96,7 @@
<antcall target="old-client-compatibility-tests">
<param name="smoke.test.type" value="server.compatibility"/>
</antcall>
+-->
<antcall target="report"/>
</target>
@@ -90,203 +113,18 @@
<antcall target="installation-test">
<param name="jboss.home" value="${jboss420GA.home}"/>
- <param name="install-jars" value="no"/>
- </antcall>
-
+ </antcall>
- <!--
- 4.0.5.GA
- -->
-
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss405GA.home}"/>
- <param name="install-jars" value="yes"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="run.http.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss405GA-installer.home}"/>
- <param name="install-jars" value="yes"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="run.http.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss405GA.home}"/>
- <param name="release.admin.target" value="standalone"/>
- <param name="run.mdb.example" value="false"/>
- <param name="run.mdb-failure.example" value="false"/>
- <param name="run.stateless.example" value="false"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="install-jars" value="yes"/>
- <param name="run.http.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss405GAejb3.home}"/>
- <param name="no.java4" value="true"/>
- <param name="run.ejb3mdb.example" value="true"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="install-jars" value="yes"/>
- <param name="run.http.example" value="false"/>
- </antcall>
- -->
-
- <!--
- 4.0.4.GA
- -->
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss404GA.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="run.http.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss404GA-installer.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="run.http.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss404GA.home}"/>
- <param name="release.admin.target" value="standalone"/>
- <param name="run.mdb.example" value="false"/>
- <param name="run.mdb-failure.example" value="false"/>
- <param name="run.stateless.example" value="false"/>
- <param name="run.secure-socket.example" value="false"/>
- <param name="run.http.example" value="false"/>
- </antcall>
- -->
-
- <!--
- 4.0.3SP1
- -->
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss403SP1.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss403SP1-installer.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
- -->
-
- <!--
- 4.0.3
- -->
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss403.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
-
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss403-installer.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
- -->
- <!--
- 4.0.2
- -->
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss402.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
- -->
-
- <!--
- Note on installer versions.
- When installing versions to test via the JBoss installer, make sure call by value is *not*
- selected in the installation process. The reason for testing installer versions is to test
- the arrangement where JBoss is configured for all pass by reference
- -->
-
- <!--
- 4.0.1sp1 - not supported on non scopped
- -->
-
- <!-- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss401sp1.home}"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall> -->
-
- <!--
- 4.0.3SP1 standalone. Temporarily removed from the supported configurations list.
- See http://jira.jboss.org/jira/browse/JBMESSAGING-848
- -->
- <!--
- <antcall target="installation-test">
- <param name="jboss.home" value="${jboss403SP1.home}"/>
- <param name="release.admin.target" value="standalone"/>
- <param name="run.mdb.example" value="false"/>
- <param name="run.mdb-failure.example" value="false"/>
- <param name="run.stateless.example" value="false"/>
- <param name="run.secure-socket.example" value="false"/>
- </antcall>
- -->
-
</target>
- <target name="old-server-compatibility-tests">
-
- <!-- ==================================================== -->
- <!-- -->
- <!-- Add here other old server versions to test: -->
- <!-- -->
- <!-- ==================================================== -->
-
- <!--
-
- http://jira.jboss.com/jira/browse/JBMESSAGING-427
- Due to fix to handle long strings. We can no longer guarantee compatibility for versions < 1.0.3
- -->
-
- <!--
-
- <antcall target="old-server-compatibility-test">
- <param name="jboss.home" value="${jboss.compatibility.home}"/>
- <param name="jboss.messaging.version" value="1.0.1.CR1"/>
- </antcall>
-
- <antcall target="old-server-compatibility-test">
- <param name="jboss.home" value="${jboss.compatibility.home}"/>
- <param name="jboss.messaging.version" value="1.0.1.CR2"/>
- </antcall>
-
- -->
-
- </target>
-
<target name="old-client-compatibility-tests">
-
- <!--
-
- <antcall target="create-messaging-config">
- <param name="jboss.home" value="${jboss.compatibility.home}"/>
- <param name="jboss.configuration" value="current-version-server"/>
- </antcall>
-
- -->
-
+
<!-- ==================================================== -->
<!-- -->
<!-- Add here other old client versions to test: -->
<!-- -->
<!-- ==================================================== -->
- <!--
- http://jira.jboss.com/jira/browse/JBMESSAGING-427
- Due to fix to handle long strings. We can no longer guarantee compatibility for versions < 1.0.3
- -->
-
- <!--
-
<antcall target="old-client-compatibility-test">
<param name="jboss.home" value="${jboss.compatibility.home}"/>
<param name="jboss.configuration" value="current-version-server"/>
@@ -299,25 +137,10 @@
<param name="jboss.messaging.version" value="1.0.1.CR2"/>
</antcall>
- -->
-
- <!--
-
- <antcall target="clean-messaging-config">
- <param name="jboss.home" value="${jboss.compatibility.home}"/>
- <param name="jboss.configuration" value="current-version-server"/>
- </antcall>
-
- -->
-
</target>
<target name="run-all-examples">
- <antcall target="start"/>
- <antcall target="record-running-jboss-instance"/>
- <antcall target="sleep"><param name="sleep.interval" value="40"/></antcall>
-
<antcall target="ping-jms-server"/>
<antcall target="deploy-queue"/>
@@ -390,8 +213,6 @@
<!-- -->
<!-- ==================================================== -->
- <antcall target="stop"/>
- <antcall target="sleep"><param name="sleep.interval" value="10"/></antcall>
<antcall target="display-warnings-and-errors"/>
</target>
@@ -399,19 +220,6 @@
<target name="run-all-clustered-examples">
<!--
- Start node0.
- -->
-
- <antcall target="start">
- <param name="jboss.configuration" value="${jboss.configuration}-node0"/>
- </antcall>
- <antcall target="record-running-jboss-instance">
- <param name="jboss.configuration" value="${jboss.configuration}-node0"/>
- </antcall>
- <antcall target="sleep"><param name="sleep.interval" value="40"/></antcall>
- <antcall target="ping-jms-server"/>
-
- <!--
Deploy the non-clustered queue, we'll also run non-clustered examples in a clustered
configuration.
-->
@@ -462,21 +270,6 @@
</antcall>
<!--
- Start node1.
- -->
-
- <antcall target="start">
- <param name="jboss.configuration" value="${jboss.configuration}-node1"/>
- </antcall>
- <antcall target="record-running-jboss-instance1">
- <param name="jboss.configuration" value="${jboss.configuration}-node1"/>
- </antcall>
- <antcall target="sleep"><param name="sleep.interval" value="40"/></antcall>
- <antcall target="ping-jms-server">
- <param name="jnpPort" value="1199"/>
- </antcall>
-
- <!--
Deploy the clustered queue.
-->
@@ -583,6 +376,7 @@
<param name="example.topic.name" value="DistributedSmokeTestTopic"/>
</antcall>
+ <!-- This one must be last since it kills the server -->
<antcall target="run-clustered-example">
<param name="example.name" value="queue-failover"/>
<param name="example.queue.name" value="DistributedSmokeTestQueue"/>
@@ -594,11 +388,6 @@
<!-- -->
<!-- ==================================================== -->
- <!-- this will stop both nodes -->
- <antcall target="stop"/>
-
- <antcall target="sleep"><param name="sleep.interval" value="20"/></antcall>
-
<antcall target="display-warnings-and-errors">
<param name="jboss.configuration" value="${jboss.configuration}-node0"/>
</antcall>
@@ -692,23 +481,15 @@
<!--
Run single-node tests
-->
- <antcall target="create-messaging-config">
- <param name="install-jars" value="${install-jars}"/>
- </antcall>
<antcall target="run-all-examples"/>
- <antcall target="clean-messaging-config"/>
<!--
Run clustered tests
-->
- <antcall target="create-clustered-messaging-config">
- <param name="install-jars" value="${install-jars}"/>
- </antcall>
<antcall target="run-all-clustered-examples"/>
- <antcall target="clean-clustered-messaging-config"/>
-
+
</target>
<target name="check-java-version">
@@ -734,17 +515,11 @@
<include name="jboss-messaging-${jboss.messaging.version}/jboss-messaging.sar"/>
</patternset>
</unzip>
- <antcall target="create-messaging-config">
- <param name="messaging.server.artifact.path" value="./output/jboss-messaging-${jboss.messaging.version}"/>
- <param name="jboss.configuration" value="messaging-${jboss.messaging.version}"/>
- </antcall>
+
<antcall target="run-all-examples">
<param name="jboss.configuration" value="messaging-${jboss.messaging.version}"/>
</antcall>
<delete dir="./output/jboss-messaging-${jboss.messaging.version}"/>
- <antcall target="clean-messaging-config">
- <param name="jboss.configuration" value="messaging-${jboss.messaging.version}"/>
- </antcall>
</target>
@@ -763,87 +538,6 @@
</target>
- <target name="create-messaging-config">
-
- <available file="${messaging.server.artifact.path}/${messaging.server.artifact.name}" property="archive.present"/>
- <fail unless="archive.present">Cannot find deployment archive ${messaging.server.artifact.path}/${messaging.server.artifact.name}</fail>
- <ant antfile="../../util/release-admin.xml" target="${release.admin.target}">
- <property name="jboss.home" value="${jboss.home}"/>
- <property name="messaging.config.name" value="${jboss.configuration}"/>
- <property name="standalone.messaging.config.name" value="${jboss.configuration}"/>
- <property name="main.artifact.location" value="${messaging.server.artifact.path}"/>
- <property name="messaging.artifact.name" value="${messaging.server.artifact.name}"/>
- <property name="install-jars" value="${install-jars}"/>
- </ant>
- <available file="../../output/lib/jboss-messaging-client.jar" property="client.jar.present"/>
- <fail unless="client.jar.present">Cannot find the client jar ../../output/lib/jboss-messaging-client.jar</fail>
-
- </target>
-
- <target name="create-clustered-messaging-config">
-
- <available file="${messaging.server.artifact.path}/${messaging.server.artifact.name}" property="archive.present"/>
- <fail unless="archive.present">Cannot find deployment archive ${messaging.server.artifact.path}/${messaging.server.artifact.name}</fail>
-
- <available file="../../output/lib/jboss-messaging-client.jar" property="client.jar.present"/>
- <fail unless="client.jar.present">Cannot find the client jar ../../output/lib/jboss-messaging-client.jar</fail>
-
- <!--
- create node 0
- -->
- <ant antfile="../../util/release-admin.xml" target="cluster-node">
- <property name="jboss.home" value="${jboss.home}"/>
- <property name="messaging.config.name" value="${jboss.configuration}"/>
- <property name="main.artifact.location" value="${messaging.server.artifact.path}"/>
- <property name="messaging.artifact.name" value="${messaging.server.artifact.name}"/>
- <property name="auxiliary.artifacts.location" value="../../src/etc/server/default/deploy"/>
- <property name="auxiliary.lib.location" value="../../util/lib"/>
- <property name="driver-jar" value="${driver-jar}"/>
- <property name="install-jars" value="${install-jars}"/>
- </ant>
-
- <!--
- create node 1
- -->
- <ant antfile="../../util/release-admin.xml" target="cluster-node">
- <property name="id" value="1"/>
- <property name="ports" value="ports-01"/>
- <property name="jboss.home" value="${jboss.home}"/>
- <property name="messaging.config.name" value="${jboss.configuration}"/>
- <property name="main.artifact.location" value="${messaging.server.artifact.path}"/>
- <property name="messaging.artifact.name" value="${messaging.server.artifact.name}"/>
- <property name="auxiliary.artifacts.location" value="../../src/etc/server/default/deploy"/>
- <property name="auxiliary.lib.location" value="../../util/lib"/>
- <property name="driver-jar" value="${driver-jar}"/>
- <property name="install-jars" value="${install-jars}"/>
- </ant>
-
- </target>
-
- <target name="clean-messaging-config" description="Cleans the non-clustered JBoss instance, and also the clustered ones, if necessary">
- <fail unless="jboss.home" message="jboss.home property not set!"/>
- <echo message="Cleaning ${jboss.home}/server/${jboss.configuration}"/>
- <delete dir="${jboss.home}/server/${jboss.configuration}" quiet="false" failonerror="true"/>
- <antcall target="clean-messaging-config1"/>
- <delete file="./output/last-run.properties" quiet="true"/>
- </target>
-
- <target name="clean-messaging-config1" description="Cleans the second clustered JBoss instance" if="jboss.home1">
- <fail unless="jboss.home1" message="jboss.home1 property not set!"/>
- <fail unless="jboss.configuration1" message="jboss.configuration1 property not set!"/>
- <echo message="Cleaning ${jboss.home1}/server/${jboss.configuration1}"/>
- <delete dir="${jboss.home1}/server/${jboss.configuration1}" quiet="false" failonerror="true"/>
- </target>
-
- <target name="clean-clustered-messaging-config" description="Cleans all clustered JBoss configurations">
- <fail unless="jboss.home" message="jboss.home property not set!"/>
- <echo message="Cleaning ${jboss.home}/server/${jboss.configuration}-node0"/>
- <delete dir="${jboss.home}/server/${jboss.configuration}-node0" quiet="false" failonerror="true"/>
- <echo message="Cleaning ${jboss.home}/server/${jboss.configuration}-node1"/>
- <delete dir="${jboss.home}/server/${jboss.configuration}-node1" quiet="false" failonerror="true"/>
- <delete file="./output/last-run.properties" quiet="true"/>
- </target>
-
<!-- don't call this target directly, call it via "run-example" -->
<target name="run-example-internal" if="do.run">
@@ -910,50 +604,6 @@
</target>
- <target name="build-deployment-archives-from-scratch">
-
- <ant dir="../.." antfile="build.xml" target="clean" inheritAll="false"/>
- <ant dir="../.." antfile="build.xml" target="artifacts" inheritAll="false"/>
- <!--
- I need this because the smoke test itself uses org.jboss.test.messaging.tools classes.
- -->
- <ant dir="../../tests" antfile="build.xml" target="compile" inheritAll="false"/>
-
- </target>
-
- <target name="start" description="Starts the jboss instance">
-
- <fail unless="jboss.home" message="jboss.home property not set!"/>
- <echo message="Starting '${jboss.configuration}' config on ${jboss.home}"/>
- <java classname="org.jboss.Main" fork="yes" spawn="yes" dir="${jboss.home}/bin">
- <jvmarg value="-server"/>
- <jvmarg value="-Xms128m"/>
- <jvmarg value="-Xmx128m"/>
- <arg value="-c"/>
- <arg value="${jboss.configuration}"/>
- <sysproperty key="java.endorsed.dirs" value="${jboss.home}/lib/endorsed"/>
- <classpath>
- <pathelement location="${jboss.home}/bin/run.jar"/>
- <pathelement location="${java.home}/lib/tools.jar"/>
- </classpath>
- </java>
-
- </target>
-
- <target name="record-running-jboss-instance">
- <path id="crt.jboss.home"><pathelement location="${jboss.home}"/></path>
- <pathconvert targetos="unix" property="crt.jboss.home.tostring" refid="crt.jboss.home"/>
- <echo message="${line.separator}jboss.home=${crt.jboss.home.tostring}" file="./output/last-run.properties" append="true"/>
- <echo message="${line.separator}jboss.configuration=${jboss.configuration}" file="./output/last-run.properties" append="true"/>
- </target>
-
- <target name="record-running-jboss-instance1">
- <path id="crt.jboss.home"><pathelement location="${jboss.home}"/></path>
- <pathconvert targetos="unix" property="crt.jboss.home.tostring" refid="crt.jboss.home"/>
- <echo message="${line.separator}jboss.home1=${crt.jboss.home.tostring}" file="./output/last-run.properties" append="true"/>
- <echo message="${line.separator}jboss.configuration1=${jboss.configuration}" file="./output/last-run.properties" append="true"/>
- </target>
-
<target name="twiddle">
<java classname="org.jboss.console.twiddle.Twiddle" fork="yes" failonerror="yes"
@@ -983,6 +633,11 @@
todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
</target>
+ <target name="deploy-clustered-queue">
+ <copy file="artifacts/smoketest-clustered-queue-service.xml"
+ todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
+ </target>
+
<target name="ping-queue">
<java classname="org.jboss.console.twiddle.Twiddle" fork="yes" failonerror="yes"
dir="${jboss.home}/bin">
@@ -1013,45 +668,6 @@
</java>
</target>
- <target name="stop" description="Stops the unique (or the first in a cluster) JBoss instance">
-
- <fail unless="jboss.home" message="jboss.home property not set!"/>
- <java classname="org.jboss.Shutdown" fork="yes" dir="${jboss.home}/bin">
- <jvmarg value="-server"/>
- <jvmarg value="-Xms128m"/>
- <jvmarg value="-Xmx128m"/>
- <arg line="-s jnp://localhost:${jnpPort} -S"/>
- <arg value="--user=${user}"/>
- <arg value="--password=${password}"/>
- <classpath>
- <pathelement location="${jboss.home}/bin/shutdown.jar"/>
- <pathelement location="${jboss.home}/client/jbossall-client.jar"/>
- </classpath>
- </java>
-
- <antcall target="stop1">
- <param name="jnpPort" value="1199"/>
- </antcall>
-
- </target>
-
- <target name="stop1" description="Stops the second cluster instance" if="jboss.home1">
-
- <fail unless="jboss.home1" message="jboss.home1 property not set!"/>
- <java classname="org.jboss.Shutdown" fork="yes" dir="${jboss.home}/bin">
- <jvmarg value="-server"/>
- <jvmarg value="-Xms128m"/>
- <jvmarg value="-Xmx128m"/>
- <arg line="-s jnp://localhost:${jnpPort} -S"/>
- <arg value="--user=${user}"/>
- <arg value="--password=${password}"/>
- <classpath>
- <pathelement location="${jboss.home}/bin/shutdown.jar"/>
- <pathelement location="${jboss.home}/client/jbossall-client.jar"/>
- </classpath>
- </java>
- </target>
-
<target name="display-warnings-and-errors">
<java classname="org.jboss.test.messaging.tools.ant.DisplayWarningsAndErrors">
@@ -1107,10 +723,6 @@
<target name="clean">
<delete dir="./output"/>
- <!--
- This also works on a clustered configuration when output/last-run.properties is correctly set.
- -->
- <antcall target="clean-messaging-config"/>
</target>
<target name="print-classpath">
Modified: trunk/util/release-admin.xml
===================================================================
--- trunk/util/release-admin.xml 2007-05-14 19:06:31 UTC (rev 2673)
+++ trunk/util/release-admin.xml 2007-05-14 19:57:23 UTC (rev 2674)
@@ -20,13 +20,6 @@
<property file="./release-admin.properties"/>
- <property name="download-jars" value="./new-jars"/>
-
- <property name="jgroups-version" value="2.4.1.SP3-brew"/>
- <property name="aop-version" value="1.5.5.GA"/>
- <property name="javassist-version" value="3.5.0.GA-brew"/>
- <property name="jboss-remoting-version" value="2.2.0.SP4"/>
-
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
<property name="messaging.config.name" value="messaging"/>
<property name="messaging.config.source" value="default"/>
@@ -51,58 +44,14 @@
<!-- Top level targets. These are the "modes" this script is supposed to work in. -->
<!-- ======================================================================================== -->
- <!-- An standard installation for JBoss 4.x based on "default"-->
- <target name="default" depends="validate-ant">
- <set-config-name base="${messaging.config.name}" suffix=""/>
+ <target name="default">
<antcall target="create-server-config"/>
</target>
- <!--
- A "standalone" (minimal configuration) installation for JBoss 4.x.
- -->
- <target name="standalone" depends="validate-ant">
- <condition property="config.name" value="${standalone.messaging.config.name}">
- <isset property="standalone.messaging.config.name"/>
- </condition>
- <set-config-name base="${messaging.config.name}" suffix="standalone"/>
- <antcall target="create-standalone-server-config"/>
- </target>
-
- <!--
- A cluster node installation for JBoss 4.2.0. or later JBoss 4 series
- -->
- <target name="cluster-node" depends="validate-ant, validate-database">
- <set-config-name base="${messaging.config.name}" suffix="node${id}"/>
- <antcall target="create-cluster-node-server-config"/>
- </target>
-
<!-- ======================================================================================== -->
<!-- Internal targets -->
<!-- ======================================================================================== -->
- <!-- We require ant 1.7.0 or later -->
- <target name="validate-ant">
- <condition property="ant.ok">
- <antversion atleast="1.7.0"/>
- </condition>
- <fail unless="ant.ok" message="The ant you're using (${ant.version}) is too old, you need at least 1.7.0!"/>
- </target>
-
- <!-- For a cluster node installation - we require a shared (non hsqldb) database to be available -->
- <target name="validate-database">
- <condition property="supported.database">
- <or>
- <equals arg1="${database}" arg2="mysql"/>
- <equals arg1="${database}" arg2="postgresql"/>
- <equals arg1="${database}" arg2="oracle"/>
- <equals arg1="${database}" arg2="mssql"/>
- <equals arg1="${database}" arg2="sybase"/>
- </or>
- </condition>
-
- <fail unless="supported.database" message="Database type '${database}' not supported!"/>
- </target>
-
<!-- The JBOSS_HOME environment variable and the directory must exist, we also check we are running
in JBoss 4.2.0 or later JBoss 4 series -->
<target name="validate-jboss">
@@ -114,8 +63,8 @@
<!-- If the target configuration already exists, we don't overwrite it, since we don't want to delete
someone's important stuff -->
<target name="prevent-messaging-overwrite">
- <available property="messaging-config" type="dir" file="${jboss.home}/server/${config.name}"/>
- <fail if="messaging-config" message="'${config.name}' configuration already exists! Delete it manually and try again."/>
+ <available property="messaging-config" type="dir" file="${jboss.home}/server/${messaging.config.name}"/>
+ <fail if="messaging-config" message="'${messaging.config.name}' configuration already exists! Delete it manually and try again."/>
</target>
<!-- We make sure the sar file exists -->
@@ -127,23 +76,26 @@
<!-- Create a server configuration based on a default server configuration -->
<target name="create-server-config" depends="validate-jboss, prevent-messaging-overwrite, validate-messaging-artifact">
- <echo message="Creating JBoss Messaging configuration '${config.name}' for ${jboss.home} based on ${sar.name}"/>
+ <echo message="Creating JBoss Messaging configuration '${messaging.config.name}' for ${jboss.home} based on configuration '${messaging.config.source}' with ${sar.name}"/>
- <mkdir dir="${jboss.home}/server/${config.name}"/>
+ <mkdir dir="${jboss.home}/server/${messaging.config.name}"/>
- <copy todir="${jboss.home}/server/${config.name}">
+ <copy todir="${jboss.home}/server/${messaging.config.name}">
<fileset dir="${jboss.home}/server/${messaging.config.source}">
<include name="conf/**"/>
<include name="deploy/**"/>
<include name="lib/**"/>
+ <include name="farm/**"/>
+ <include name="deploy-hasingleton/**"/>
<!-- Don't copy jbossmq -->
<exclude name="deploy/jms/**"/>
+ <exclude name="deploy-hasingleton/jms/**"/>
<exclude name="lib/jbossmq.jar"/>
</fileset>
</copy>
<!-- add a "messaging" security domain -->
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
+ <replaceregexp file="${jboss.home}/server/${messaging.config.name}/conf/login-config.xml" flags="s">
<regexp pattern="(\x3cpolicy\x3e)"/>
<substitution expression="\1

 <application-policy name = "messaging">
 <authentication>

<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"

@@ -157,11 +109,8 @@
<!-- we deploy the archive exploded so that users can easily access the configuration files -->
<antcall target="expand-sar"/>
- <!-- we only replace the server jars if 'install-jars' ENV variable = 'yes' -->
- <antcall target="replace-server-jars"/>
-
<!-- Copy the default security properties files to conf/props-->
- <copy todir="${jboss.home}/server/${config.name}/conf/props">
+ <copy todir="${jboss.home}/server/${messaging.config.name}/conf/props">
<fileset dir="../src/etc/server/default/config">
<include name="messaging-*.properties"/>
</fileset>
@@ -169,7 +118,7 @@
<!-- Copy the JMS JCA resource adaptor -->
<copy file="${jboss.home}/server/${messaging.config.source}/deploy/jms/jms-ra.rar"
- todir="${jboss.home}/server/${config.name}/deploy"/>
+ todir="${jboss.home}/server/${messaging.config.name}/deploy"/>
</target>
@@ -177,458 +126,9 @@
<!-- Expand the sar file in the deploy directory -->
<target name="expand-sar">
<unjar src="${sar.location}/${sar.name}"
- dest="${jboss.home}/server/${config.name}/deploy/jboss-messaging.sar">
+ dest="${jboss.home}/server/${messaging.config.name}/deploy/jboss-messaging.sar">
</unjar>
</target>
- <!-- Create a standalone (stripped down) JBM installation based on default -->
-
- <!-- FIXME - this is currently very brittle - since it may break if the default
- installation structure changes in future versions of JBAS -
- consider removing it -->
- <target name="create-standalone-server-config" depends="validate-jboss, validate-messaging-artifact"
- description="Creates a standalone Messaging server configuration based on a default JBoss instance">
-
- <echo message="Creating Standalone Messaging configuration '${config.name}' for ${jboss.home} based on ${sar.name}"/>
-
- <mkdir dir="${jboss.home}/server/${config.name}/conf"/>
- <mkdir dir="${jboss.home}/server/${config.name}/lib"/>
- <mkdir dir="${jboss.home}/server/${config.name}/deploy"/>
-
- <copy todir="${jboss.home}/server/${config.name}/conf">
- <fileset dir="${jboss.home}/server/${messaging.config.source}/conf">
- <include name="log4j.xml"/>
- <include name="login-config.xml"/>
- <include name="props/**"/>
- <include name="xmdesc/**"/>
- </fileset>
- </copy>
-
- <copy todir="${jboss.home}/server/${config.name}/deploy">
- <fileset dir="${jboss.home}/server/${messaging.config.source}/deploy">
- <include name="hsqldb-ds.xml"/>
- <include name="jboss-local-jdbc.rar"/>
- <include name="jbossjca-service.xml"/>
- <include name="jbossweb-tomcat55.sar/**"/>
- <include name="jmx-console.war/**"/>
- <include name="jmx-invoker-service.xml"/>
- <include name="management/**"/>
- <include name="properties-service.xml"/>
- </fileset>
- </copy>
-
- <copy todir="${jboss.home}/server/${config.name}/lib">
- <fileset dir="${jboss.home}/server/${messaging.config.source}/lib">
- <include name="commons*.jar"/>
- <include name="hsqldb*.jar"/>
- <include name="javax.servlet*.jar"/>
- <include name="jboss-common-jdbc-wrapper.jar"/>
- <include name="jboss-j2ee.jar"/>
- <include name="jboss-jca.jar"/>
- <include name="jboss-management.jar"/>
- <include name="jboss-monitoring.jar"/>
- <include name="jboss-transaction.jar"/>
- <include name="jboss.jar"/>
- <include name="jbosssx.jar"/>
- <include name="jmx-adaptor-plugin.jar"/>
- <include name="jnpserver.jar"/>
- <include name="log4j.jar"/>
- <include name="properties-plugin.jar"/>
- </fileset>
- </copy>
-
- <!-- slim down jboss-service.xml -->
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.management.j2ee.LocalJBossServerDomain\x22.*jboss:service=CorbaORB\x3c/attribute\x3e[ \t\n\r]*\x3c/mbean\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.util.property.jmx.SystemPropertyClassValue\x22.*org.jboss.system.JBossRMIClassLoader\x3c/attribute\x3e[ \t\n\r]*\x3c/mbean\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.web.WebService\x22.*\x3cdepends optional-attribute-name=\x22ThreadPool\x22[ \t\n\r]*proxy-type=\x22attribute\x22\x3ejboss.system:service=ThreadPool\x3c/depends\x3e[ \t\n\r]*\x3c/mbean\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.tm.usertx.server.ClientUserTransactionService\x22.*\x3cdepends\x3ejboss:service=invoker,type=jrmp\x3c/depends\x3e[ \t\n\r]*\x3c/mbean\x3e[ \t\n\r]*\x3c/depends\x3e[ \t\n\r]*\x3c/mbean\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.invocation.pooled.server.PooledInvoker\x22.*\x3cdepends optional-attribute-name=\x22TransactionManagerService\x22\x3ejboss:service=TransactionManager\x3c/depends\x3e[ \t\n\r]*\x3c/mbean\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean code=\x22org.jboss.ejb.plugins.cmp.jdbc.metadata.MetaDataLibrary\x22.*name=\x22jboss.jdbc:service=metadata\x22/\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <!-- customize login-config.xml -->
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
- <regexp pattern="(\x3cpolicy\x3e)"/>
- <substitution expression="\1 <application-policy name = "messaging">
- <authentication><login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
- flag = "required" >
- <module-option name = "unauthenticatedIdentity">guest</module-option>
- <module-option name = "usersProperties">messaging-users.properties</module-option>
- <module-option name = "rolesProperties">messaging-roles.properties</module-option>
- </login-module></authentication></application-policy>"/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
- <regexp pattern="(\x3cpolicy\x3e)"/>
- <substitution expression="\1 <application-policy name = "messaging">
- <authentication><login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
- flag = "required" >
- <module-option name = "unauthenticatedIdentity">guest</module-option>
- <module-option name = "usersProperties">messaging-users.properties</module-option>
- <module-option name = "rolesProperties">messaging-roles.properties</module-option>
- </login-module></authentication></application-policy>"/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
- <regexp pattern="(\x3capplication-policy name = \x22jbossmq\x22\x3e.*FROM JMS_ROLES WHERE USERID=.\x3c/module-option\x3e[ \t\n\r]*\x3c/login-module\x3e[ \t\n\r]*\x3c/authentication\x3e[ \t\n\r]*\x3c/application-policy\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
- <regexp pattern="(\x3capplication-policy name = \x22jbossmq\x22\x3e.*jboss.mq:service=StateManager\x3c/module-option\x3e[ \t\n\r]*\x3c/login-module\x3e[ \t\n\r]*\x3c/authentication\x3e[ \t\n\r]*\x3c/application-policy\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/login-config.xml" flags="s">
- <regexp pattern="(\x3capplication-policy name=\x22JBossWS\x22\x3e.*\x3cmodule-option name=\x22unauthenticatedIdentity\x22\x3eanonymous\x3c/module-option\x3e[ \t\n\r]*\x3c/login-module\x3e[ \t\n\r]*\x3c/authentication\x3e[ \t\n\r]*\x3c/application-policy\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <!-- mute org.jboss.serial DEBUG -->
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/log4j.xml" flags="s">
- <regexp pattern="(\x3croot\x3e)"/>
- <substitution expression="<category name="org.jboss.serial">
 <priority value="INFO"/>
 </category>

 \1"/>
- </replaceregexp>
-
- <!-- customize hsqldb-ds.xml -->
-
- <replaceregexp file="${jboss.home}/server/${config.name}/deploy/hsqldb-ds.xml" flags="s">
- <regexp pattern="(\x3cmetadata\x3e[ \t\n\r]*\x3ctype-mapping\x3eHypersonic SQL\x3c/type-mapping\x3e[ \t\n\r]*\x3c/metadata\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <!-- get rid of the AJP connector -->
-
- <replaceregexp file="${jboss.home}/server/${config.name}/deploy/jbossweb-tomcat55.sar/server.xml" flags="s">
- <regexp pattern="(\x3cConnector port=\x228009\x22.*protocol=\x22AJP/1.3\x22/\x3e)"/>
- <substitution expression=""/>
- </replaceregexp>
-
- <!-- deploy exploded messaging -->
-
- <unjar src="${sar.location}/${sar.name}"
- dest="${jboss.home}/server/${config.name}/deploy/jboss-messaging">
- </unjar>
-
- <!-- un-scope the deployment -->
-
- <move todir="${jboss.home}/server/${config.name}/lib">
- <fileset dir="${jboss.home}/server/${config.name}/deploy/jboss-messaging">
- <include name="jboss-messaging.jar"/>
- <include name="javassist.jar"/>
- <include name="jboss-aop.jar"/>
- <include name="jboss-aspect-library.jar"/>
- <include name="jboss-common-softvaluehashmap.jar"/>
- <include name="jboss-common-stream.jar"/>
- <include name="jboss-remoting.jar"/>
- <include name="jboss-serialization.jar"/>
- <include name="jboss-unified-invocation.jar"/>
- <include name="trove.jar"/>
- </fileset>
- </move>
-
- <unjar src="${jboss.home}/server/${config.name}/lib/jboss-messaging.jar"
- dest="${jboss.home}/server/${config.name}/conf">
- <patternset>
- <include name="xmdesc/**"/>
- </patternset>
- </unjar>
-
- <!-- Copy the default security properties files to conf/props-->
- <copy todir="${jboss.home}/server/${config.name}/conf/props">
- <fileset dir="../src/etc/server/default/config">
- <include name="messaging-*.properties"/>
- </fileset>
- </copy>
-
- <delete dir="${jboss.home}/server/${config.name}/deploy/jboss-messaging/xmdesc"/>
- <delete dir="${jboss.home}/server/${config.name}/deploy/jboss-messaging/META-INF"/>
- <delete file="${jboss.home}/server/${config.name}/deploy/jboss-messaging/jms-ds.xml"/>
-
- </target>
-
-
- <target name="test-for-jgroups">
- <condition property="jgroups-not-available">
- <not>
- <available file="${jboss.home}/server/${config.name}/lib/jgroups.jar"/>
- </not>
- </condition>
- </target>
-
- <target name="install-jgroups" depends="test-for-jgroups" if="jgroups-not-available">
- <echo message="I will copy jgroups into ${jboss.home}/server/${config.name}/lib/jgroups.jar"/>
-
- <mkdir dir="./${download-jars}"/>
- <get src="http://repository.jboss.com/jgroups/${jgroups-version}/lib/jgroups.jar" dest="./${download-jars}/jgroups.jar" usetimestamp="yes"/>
- <copy file="./${download-jars}/jgroups.jar" todir="${jboss.home}/server/${config.name}/lib"/>
- </target>
-
- <target name="create-cluster-node-server-config">
-
- <!--
- Create the non-clustered configuration first.
- -->
- <antcall target="create-server-config"/>
-
- <!--
- Configure the apropriate port range.
- -->
- <antcall target="configure-service-binding-manager"/>
-
- <!--
- Adjust the node id
- -->
- <replaceregexp file="${jboss.home}/server/${config.name}/deploy/jboss-messaging.sar/messaging-service.xml" flags="s"
- match="(\x3carg[ \t]type=\x22int\x22[ \t]*value=\x22).+?(\x22.*)" replace="\1${id}\2"/>
-
- <!--
- Replace HSQLDB with a LAN-shareable database.
- -->
- <echo message="Enabling ${database}"/>
-
- <delete file="${jboss.home}/server/${config.name}/deploy/hsqldb-ds.xml" quiet="false" failonerror="true"/>
- <copy file="${datasource.location}/${database}-ds.xml" todir="${jboss.home}/server/${config.name}/deploy/"/>
-
- <!--
- Use clustered persistence configuration file.
- -->
-
- <delete file="${jboss.home}/server/${config.name}/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml" quiet="false" failonerror="true"/>
- <copy file="${datasource.location}/clustered-${database}-persistence-service.xml" todir="${jboss.home}/server/${config.name}/deploy/jboss-messaging.sar/"/>
-
- <antcall target="install-jgroups"/>
-
- <antcall target="warn-check-database-drivers"/>
- </target>
-
- <target name="warn-check-database-drivers">
-<echo>
-
-
-
- ##########################
- # #
- # WARNING! #
- # #
- ##########################
-
-
- The configuration that has just been created uses a generic ${database} service descriptor!
-
- Check
-
- ${jboss.home}/server/${config.name}/deploy/${database}-ds.xml
-
- and make sure that:
-
- 1. Your database is indeed ${database}.
- 2. It is accessible from every physical node you installed Messaging on.
- 3. Contains a schema (database/tablespace) named 'messaging'.
- 4. The URL (hostname and port), username and password and other connect information are correct.
- 5. The installed ${database}-driver.jar's version maches your database.
-
-
-
-
-</echo>
- </target>
-
- <target name="configure-service-binding-manager" if="ports">
-
- <!--
- Enable the service binding manager, by deleting XML comment tags.
- -->
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean[ \t]*code=\x22org.jboss.services.binding.ServiceBindingManager\x22.+org.jboss.services.binding.XMLServicesStoreFactory[ \t\n\r]*\x3c/attribute\x3e[ \t\n\r]*\x3c/mbean\x3e[ \t\n\r]*)--\x3e"/>
- <substitution expression="-->

 \1"/>
- </replaceregexp>
-
- <!--
- Use the server configuration specified as "ports" system property
- -->
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cattribute[ \t]*name=\x22ServerName\x22\x3e)ports-01(\x3c/attribute\x3e)"/>
- <substitution expression="\1${ports}\2"/>
- </replaceregexp>
-
- <!--
- Configure jboss-service.xml to use a local copy of sample-bindings.xml
- -->
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cattribute[ \t]*name=\x22StoreURL\x22\x3e)\x24\x7bjboss.home.url\x7d/docs/examples/binding-manager/sample-bindings.xml(\x3c/attribute\x3e)"/>
- <substitution expression="\1${jboss.server.config.url}/binding-manager.xml\2"/>
- </replaceregexp>
-
- <!--
- The above regular expression won't match some older JBoss configurations (such as
- 4.0.1sp1), so trying with an alternate expression.
- -->
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cattribute[ \t]*name=\x22StoreURL\x22\x3e)../docs/examples/binding-manager/sample-bindings.xml(\x3c/attribute\x3e)"/>
- <substitution expression="\1../server/${config.name}/conf/binding-manager.xml\2"/>
- </replaceregexp>
-
- <!--
- Some installer-generated installations (JBoss 4.0.3, JBoss 4.0.3.SP1) do not contain
- a BindingManager declaration at all, so we need to insert it by ourselves.
- -->
- <loadfile property="jboss-service.xml-content"
- srcFile="${jboss.home}/server/${config.name}/conf/jboss-service.xml"/>
-
- <condition property="binding.manager.declared">
- <contains string="${jboss-service.xml-content}" substring="org.jboss.services.binding.ServiceBindingManager"/>
- </condition>
-
- <antcall target="insert-service-binding-manager-configuration"/>
-
- <!--
- Actually copy the file
- -->
- <copy file="${jboss.home}/docs/examples/binding-manager/sample-bindings.xml"
- tofile="${jboss.home}/server/${config.name}/conf/binding-manager.xml"/>
-
- <!--
- Add remoting binding manager overrides in ${config.name}/conf/binding-manager.xml
- -->
- <replace-messaging-connector-override server-name="ports-default" port="4457" binding-manager-file="${jboss.home}/server/${config.name}/conf/binding-manager.xml"/>
- <replace-messaging-connector-override server-name="ports-01" port="4557" binding-manager-file="${jboss.home}/server/${config.name}/conf/binding-manager.xml"/>
- <replace-messaging-connector-override server-name="ports-02" port="4657" binding-manager-file="${jboss.home}/server/${config.name}/conf/binding-manager.xml"/>
- <replace-messaging-connector-override server-name="ports-03" port="4757" binding-manager-file="${jboss.home}/server/${config.name}/conf/binding-manager.xml"/>
-
- </target>
-
- <target name="insert-service-binding-manager-configuration" unless="binding.manager.declared">
-
- <replaceregexp file="${jboss.home}/server/${config.name}/conf/jboss-service.xml" flags="s">
- <regexp pattern="(\x3cmbean[ \t]*code=\x22org.jboss.logging.Log4jService\x22.*?\x3c/mbean\x3e)"/>
- <substitution expression="\1
-


- <mbean code="org.jboss.services.binding.ServiceBindingManager"

- name="jboss.system:service=ServiceBindingManager">

- <attribute name="ServerName">${ports}</attribute>

- <attribute name="StoreURL">${jboss.server.config.url}/binding-manager.xml</attribute>

- <attribute name="StoreFactoryClassName">

- org.jboss.services.binding.XMLServicesStoreFactory

- </attribute>

- </mbean>"/>
- </replaceregexp>
-
- </target>
-
- <macrodef name="replace-messaging-connector-override">
- <attribute name="server-name"/>
- <attribute name="port"/>
- <attribute name="binding-manager-file"/>
- <sequential>
- <!--
- If configuration override already exists, replace it with the correct one.
- -->
- <replaceregexp file="@{binding-manager-file}" flags="s">
- <regexp pattern="(\x3cserver[ \t]*name=\x22@{server-name}\x22\x3e)(.*?)(\x3cservice-config[ \t]*name=\x22jboss.messaging:service=Connector,transport=)(.*?)(\x3c/service-config\x3e)(.*?)(\x3c/server\x3e)"/>
- <substitution expression="\1\2
 <service-config name="jboss.messaging:service=Connector,transport=bisocket"

- delegateClass="org.jboss.services.binding.AttributeMappingDelegate">

- <delegate-config>

- <attribute name="InvokerLocator">bisocket://${jboss.bind.address}:@{port}/?NumberOfCallRetries=2&amp;clientMaxPoolSize=50&amp;clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&amp;dataType=jms&amp;marshaller=org.jboss.jms.server.remoting.JMSWireFormat&amp;numberOfRetries=1&amp;serializationtype=jms&amp;socket.check_connection=false&amp;unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat</attribute>

- </delegate-config>

- <binding port="@{port}"/>

- </service-config>\6\7"/>
- </replaceregexp>
-
- <!--
- If we don't find any configuration after replacement, then it means it didn't exist
- in the first place, so add a new one
- -->
-
- <loadfile property="binding.manager.xml.content"
- srcFile="@{binding-manager-file}"/>
-
- <condition property="messaging.connector.override.exists">
- <matches string="${binding.manager.xml.content}" singleline="true">
- <regexp pattern="(\x3cserver[ \t]*name=\x22@{server-name}\x22\x3e)(.*?)(\x3cservice-config[ \t]*name=\x22jboss.messaging:service=Connector,transport=)(.*?)@{port}(.*?)(\x3c/service-config\x3e)(.*?)(\x3c/server\x3e)"/>
- </matches>
- </condition>
- <echo message="override exists: ${messaging.connector.override.exists}"/>
-
- <antcall target="add-messaging-connector-override-if-not-already-there">
- <param name="local.server.name" value="@{server-name}"/>
- <param name="local.port" value="@{port}"/>
- <param name="local.binding.manager.file" value="@{binding-manager-file}"/>
- </antcall>
-
- </sequential>
- </macrodef>
-
- <macrodef name="add-messaging-connector-override">
- <attribute name="server-name"/>
- <attribute name="port"/>
- <attribute name="binding-manager-file"/>
- <sequential>
- <replaceregexp file="@{binding-manager-file}" flags="s">
- <regexp pattern="(\x3cserver[ \t]*name=\x22@{server-name}\x22\x3e)(.*?)(\x3c/server\x3e)"/>
- <!--
- note: substitution expression mst be identical with the one in
- replace-messaging-connector-override, with 
 \3 at the end instead of
- \6\7
- -->
- <substitution expression="\1\2
 <service-config name="jboss.messaging:service=Connector,transport=bisocket"

- delegateClass="org.jboss.services.binding.AttributeMappingDelegate">

- <delegate-config>

- <attribute name="InvokerLocator">bisocket://${jboss.bind.address}:@{port}/?NumberOfCallRetries=2&amp;clientMaxPoolSize=50&amp;clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&amp;dataType=jms&amp;marshaller=org.jboss.jms.server.remoting.JMSWireFormat&amp;numberOfRetries=1&amp;serializationtype=jms&amp;socket.check_connection=false&amp;unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat</attribute>

- </delegate-config>

- <binding port="@{port}"/>

- </service-config>
 \3"/>
- </replaceregexp>
- </sequential>
- </macrodef>
-
- <target name="add-messaging-connector-override-if-not-already-there" unless="messaging.connector.override.exists">
- <add-messaging-connector-override server-name="${local.server.name}" port="${local.port}" binding-manager-file="${local.binding.manager.file}"/>
- </target>
-
- <macrodef name="set-config-name">
- <attribute name="base"/>
- <attribute name="suffix"/>
- <sequential>
- <condition property="config.name" value="@{base}-@{suffix}" else="@{base}">
- <length string="@{suffix}" when="greater" length="0"/>
- </condition>
- </sequential>
- </macrodef>
-
- <target name="dump">
- <echo message="jboss.home=${jboss.home}"/>
- <echo message="messaging.config.name=${messaging.config.name}"/>
- <echo message="sar.location=${sar.location}"/>
- </target>
-
- <target name="test" depends="validate-ant">
- </target>
-
</project>
More information about the jboss-cvs-commits
mailing list