JBoss hornetq SVN: r8115 - in trunk/tests/src/org/hornetq/tests/integration: largemessage/mock and 1 other directory.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-10-15 12:17:52 -0400 (Thu, 15 Oct 2009)
New Revision: 8115
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java
Log:
fixed some tests
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2009-10-15 14:58:20 UTC (rev 8114)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2009-10-15 16:17:52 UTC (rev 8115)
@@ -226,7 +226,7 @@
public void createConnectionFactory(JMSServerControl control, String cfName, Object[] bindings) throws Exception
{
String jndiBindings = toCSV(bindings);
- String params = "\"key1\"=1, \"key2\"=false, \"key3\"=\"value3\"";
+ String params = "\"" + TransportConstants.SERVER_ID_PROP_NAME + "\"=1";
control.createConnectionFactory(cfName, InVMConnectorFactory.class.getName(), params, jndiBindings);
}
@@ -258,8 +258,8 @@
public void createConnectionFactory(JMSServerControl control, String cfName, Object[] bindings) throws Exception
{
String clientID = randomString();
- String jndiBindings = toCSV(bindings);
- String params = "\"key1\"=1, \"key2\"=false, \"key3\"=\"value3\"";
+ String jndiBindings = toCSV(bindings);
+ String params = "\"" + TransportConstants.SERVER_ID_PROP_NAME + "\"=1";
control.createConnectionFactory(cfName,
InVMConnectorFactory.class.getName(),
@@ -295,8 +295,8 @@
{
public void createConnectionFactory(JMSServerControl control, String cfName, Object[] bindings) throws Exception
{
- String jndiBindings = toCSV(bindings);
- String params = "\"key1\"=1, \"key2\"=false, \"key3\"=\"value3\"";
+ String jndiBindings = toCSV(bindings);
+ String params = "\"" + TransportConstants.SERVER_ID_PROP_NAME + "\"=1";
control.createConnectionFactory(cfName,
InVMConnectorFactory.class.getName(),
Modified: trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java 2009-10-15 14:58:20 UTC (rev 8114)
+++ trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java 2009-10-15 16:17:52 UTC (rev 8115)
@@ -13,7 +13,7 @@
package org.hornetq.tests.integration.largemessage.mock;
-import java.util.Collections;
+import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executor;
@@ -61,7 +61,11 @@
*/
public Set<String> getAllowableProperties()
{
- return Collections.EMPTY_SET;
+ Set<String> set = new HashSet<String>();
+
+ set.add("callback");
+
+ return set;
}
// Package protected ---------------------------------------------
14 years, 7 months
JBoss hornetq SVN: r8114 - trunk/examples/common.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-10-15 10:58:20 -0400 (Thu, 15 Oct 2009)
New Revision: 8114
Modified:
trunk/examples/common/build.xml
Log:
https://jira.jboss.org/jira/browse/HORNETQ-177: Create JMS bridge example which demonstrates use of remote machines
* excludes jms-bridge from the automated run of the examples
Modified: trunk/examples/common/build.xml
===================================================================
--- trunk/examples/common/build.xml 2009-10-15 14:32:21 UTC (rev 8113)
+++ trunk/examples/common/build.xml 2009-10-15 14:58:20 UTC (rev 8114)
@@ -199,11 +199,12 @@
<exclude name="common/build.xml"/>
<exclude name="core/perf/build.xml"/>
<exclude name="jms/applet/build.xml"/>
+ <exclude name="jms/jms-bridge/build.xml"/>
<exclude name="jms/perf/build.xml"/>
</fileset>
</subant>
- <echo message="Do not forget to run jms/applet example manually!" />
+ <echo message="Do not forget to run jms/applet & jms-bridge examples manually!" />
</target>
</project>
14 years, 7 months
JBoss hornetq SVN: r8113 - in trunk: examples/common and 9 other directories.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-10-15 10:32:21 -0400 (Thu, 15 Oct 2009)
New Revision: 8113
Added:
trunk/examples/jms/jms-bridge/
trunk/examples/jms/jms-bridge/build.bat
trunk/examples/jms/jms-bridge/build.sh
trunk/examples/jms/jms-bridge/build.xml
trunk/examples/jms/jms-bridge/jms-bridge.png
trunk/examples/jms/jms-bridge/readme.html
trunk/examples/jms/jms-bridge/server0/
trunk/examples/jms/jms-bridge/server0/hornetq-beans.xml
trunk/examples/jms/jms-bridge/server0/hornetq-configuration.xml
trunk/examples/jms/jms-bridge/server0/hornetq-jms.xml
trunk/examples/jms/jms-bridge/server0/hornetq-users.xml
trunk/examples/jms/jms-bridge/server0/jndi.properties
trunk/examples/jms/jms-bridge/server1/
trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml
trunk/examples/jms/jms-bridge/server1/hornetq-configuration.xml
trunk/examples/jms/jms-bridge/server1/hornetq-jms.xml
trunk/examples/jms/jms-bridge/server1/hornetq-users.xml
trunk/examples/jms/jms-bridge/server1/jndi.properties
trunk/examples/jms/jms-bridge/src/
trunk/examples/jms/jms-bridge/src/org/
trunk/examples/jms/jms-bridge/src/org/hornetq/
trunk/examples/jms/jms-bridge/src/org/hornetq/jms/
trunk/examples/jms/jms-bridge/src/org/hornetq/jms/example/
trunk/examples/jms/jms-bridge/src/org/hornetq/jms/example/JMSBridgeExample.java
Modified:
trunk/.classpath
trunk/examples/common/common.css
Log:
https://jira.jboss.org/jira/browse/HORNETQ-177: Create JMS bridge example which demonstrates use of remote machines
* example requires 2 machines each one hosting a HornetQ server.
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2009-10-15 13:50:01 UTC (rev 8112)
+++ trunk/.classpath 2009-10-15 14:32:21 UTC (rev 8113)
@@ -40,6 +40,7 @@
<classpathentry kind="src" path="examples/jms/instantiate-connection-factory/src"/>
<classpathentry kind="src" path="examples/jms/interceptor/src"/>
<classpathentry kind="src" path="examples/jms/jaas/src"/>
+ <classpathentry kind="src" path="examples/jms/jms-bridge/src"/>
<classpathentry kind="src" path="examples/jms/jmx/src"/>
<classpathentry kind="src" path="examples/jms/large-message/src"/>
<classpathentry kind="src" path="examples/jms/last-value-queue/src"/>
Modified: trunk/examples/common/common.css
===================================================================
--- trunk/examples/common/common.css 2009-10-15 13:50:01 UTC (rev 8112)
+++ trunk/examples/common/common.css 2009-10-15 14:32:21 UTC (rev 8113)
@@ -19,6 +19,10 @@
border: dotted grey 1px;
}
+abbr {
+ border-bottom: 1px dotted #333; cursor: help;
+}
+
.missing-doc {
background-color: red;
border: dotted black 1px;
Added: trunk/examples/jms/jms-bridge/build.bat
===================================================================
--- trunk/examples/jms/jms-bridge/build.bat (rev 0)
+++ trunk/examples/jms/jms-bridge/build.bat 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,13 @@
+@echo off
+
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
+
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
+) else (
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
+)
+
+set "OVERRIDE_ANT_HOME="
Added: trunk/examples/jms/jms-bridge/build.sh
===================================================================
--- trunk/examples/jms/jms-bridge/build.sh (rev 0)
+++ trunk/examples/jms/jms-bridge/build.sh 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+export OVERRIDE_ANT_HOME=../../../tools/ant
+
+if [ -f "../../../src/bin/build.sh" ]; then
+ # running from TRUNK
+ ../../../src/bin/build.sh "$@"
+else
+ # running from the distro
+ ../../../bin/build.sh "$@"
+fi
+
+
+
Property changes on: trunk/examples/jms/jms-bridge/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/examples/jms/jms-bridge/build.xml
===================================================================
--- trunk/examples/jms/jms-bridge/build.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/build.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
+ ]>
+<!--
+ ~ Copyright 2009 Red Hat, Inc.
+ ~ Red Hat licenses this file to you under the Apache License, version
+ ~ 2.0 (the "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ ~ implied. See the License for the specific language governing
+ ~ permissions and limitations under the License.
+ -->
+
+<project default="help" name="HornetQ JMS Bridge Example">
+
+ <import file="../../common/build.xml"/>
+
+ <path id="extra.classpath">
+ <dirset dir="build/classes" />
+ <fileset dir="build/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+ <path id="jta.classpath">
+ <fileset dir="build/jta">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="help">
+ <echo>
+1. make sure to configure source and target servers
+2. on one server, run "./build.sh source-server"
+3. on another server, run "./build.sh target-server"
+4. run the client with "./build.sh client -Dsource=<source server> -Dtarget=<target server>"
+ </echo>
+ </target>
+
+ <target name="init">
+ <mkdir dir="build/classes" />
+ <mkdir dir="build/lib" />
+ <copy todir="build/lib" flatten="true">
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="hornetq-core.jar"/>
+ <include name="hornetq-jms.jar"/>
+ <include name="hornetq-transports.jar"/>
+ <include name="hornetq-bootstrap.jar"/>
+ </fileset>
+ <fileset dir="${jars.dir}">
+ <include name="**/jboss-jms-api.jar" />
+ <include name="**/netty.jar" />
+ <include name="**/jnpserver.jar" />
+ <include name="**/jboss-kernel.jar" />
+ <include name="**/jboss-dependency.jar" />
+ <include name="**/jboss-logging-spi.jar" />
+ <include name="**/jboss-common-core.jar" />
+ <include name="**/jboss-reflect.jar" />
+ <include name="**/jboss-mdr.jar" />
+ <include name="**/jbossxb.jar" />
+ <include name="**/jboss-mc.jar" />
+ </fileset>
+ </copy>
+ <mkdir dir="build/jta" />
+ <!-- Transaction libraries are required by the JMS bridge -->
+ <get usetimestamp="true" src="http://repository.jboss.com/jboss/jbossts/4.6.0.CR1/lib/jbossjta.jar" dest="build/jta/jbossjta.jar"/>
+ <get usetimestamp="true" src="http://repository.jboss.com/jboss/jbossts/4.6.0.CR1/lib/jbossts-common.jar" dest="build/jta/jbossts-common.jar"/>
+ <get usetimestamp="true" src="http://repository.jboss.com/jboss/jboss-javaee/5.0.1.GA/lib/jboss-javaee.jar" dest="build/jta/jboss-javaee.jar"/>
+ <get usetimestamp="true" src="http://repository.jboss.com/apache-log4j/1.2.14/lib/log4j.jar" dest="build/jta/log4j.jar"/>
+ <get usetimestamp="true" src="http://repository.jboss.com/apache-logging/1.1/lib/commons-logging.jar" dest="build/jta/commons-logging.jar"/>
+ </target>
+
+ <target name="source-server" depends="compile">
+ <echo message="Start *SOURCE* server" />
+
+ <java classname="org.hornetq.integration.bootstrap.HornetQBootstrapServer" fork="true">
+ <sysproperty key="java.library.path" value="${java.library.path}${path.separator}${aio.library.path}"/>
+ <sysproperty key="com.sun.management.jmxremote" value="" />
+ <classpath refid="extra.classpath"/>
+ <classpath path="server0/" />
+ <arg line="server0/hornetq-beans.xml"/>
+ </java>
+ </target>
+
+ <target name="target-server" depends="compile">
+ <echo message="Start *TARGET* server" />
+
+ <java classname="org.hornetq.integration.bootstrap.HornetQBootstrapServer" fork="true">
+ <sysproperty key="java.library.path" value="${java.library.path}${path.separator}${aio.library.path}"/>
+ <sysproperty key="com.sun.management.jmxremote" value="" />
+ <classpath refid="extra.classpath"/>
+ <classpath refid="jta.classpath"/>
+ <classpath path="server1/" />
+ <arg line="server1/hornetq-beans.xml"/>
+ </java>
+ </target>
+
+ <target name="client" depends="compile">
+ <echo message="Start client" />
+ <java classname="org.hornetq.jms.example.JMSBridgeExample" fork="true">
+ <classpath refid="extra.classpath"/>
+ <arg line="${source} ${target}"/>
+ </java>
+ </target>
+</project>
Added: trunk/examples/jms/jms-bridge/jms-bridge.png
===================================================================
(Binary files differ)
Property changes on: trunk/examples/jms/jms-bridge/jms-bridge.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/jms/jms-bridge/readme.html
===================================================================
--- trunk/examples/jms/jms-bridge/readme.html (rev 0)
+++ trunk/examples/jms/jms-bridge/readme.html 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,290 @@
+<html>
+ <head>
+ <title>HornetQ JMS Bridge Example</title>
+ <link rel="stylesheet" type="text/css" href="../../common/common.css" />
+ <link rel="stylesheet" type="text/css" href="../../common/prettify.css" />
+ <script type="text/javascript" src="../../common/prettify.js"></script>
+ </head>
+ <body onload="prettyPrint()">
+ <h1>JMS Bridge Example</h1>
+ <p>This example shows you how to setup a JMS Bridge between two HornetQ servers.</p>
+ <img src="jms-bridge.png" />
+ <p>The example will use two HornetQ servers:</p>
+ <ul>
+ <li>Server #0 – the <em>Source</em> server. It will be configured with a JMS Topic bound to JNDI under <code>/source/topic</code>
+ <li>Server #1 – the <em>Target</em> server. It will be configured with a JMS Queue bound to JNDI under <code>/target/queue</code><br />
+ </ul>
+ <p>Both HornetQ server will run their own JNDI server used by the JMS Bridge and the JMS Client to lookup JMS
+ resources (ConnectionFactory and Destination).</p>
+ <p>The JMS Bridge will run inside the target server and is configured to bridge messages from the <em>source</em> destination
+ (the topic hosted on server #0) and the <em>target</em> destination (the queue hosted on server #1)</p>
+ <p>The client will check the bridge works by:</p>
+ <ol>
+ <li>sending a message to the <em>source</em> topic</li>
+ <li>receive a message from the <em>target</em> queue</li>
+ <li>check that both messages correspond to the same content.</li>
+ </ol>
+ <p>Please note that this example is meant to run on 2 different machines. If you want to run it on a single machine,
+ you will have also to make sure that the HornetQ servers do not share any ports.</p>
+ <h2>Example Configuration</h2>
+ <p>To run this example on 2 machines, you will need to adapt the configuration to your machines:</p>
+ <ol>
+ <li>Setup the source server address so that both the JMS bridge and the JMS
+ client can connect to its JNDI server and send/receive message from it</li>
+ <li>Setup the target server so that both the JMS bridge and the JMS
+ client can connect to its JNDI server and send/receive message from it</li>
+ <li>Setup the JMS Bridge configuration so that it can receive message from the source
+ topic and send them to the target queue</li>
+ </ol>
+ <p>As an example, I will use the following network addresses to show how to configure the example:</p>
+ <ul>
+ <li>Server #0 – <code>192.168.0.<strong>10</strong></code></li>
+ <li>Server #1 – <code>192.168.0.<strong>11</strong></code></li>
+ </ul>
+ <p>First, make sure that HornetQ <em>is setup and installed on both servers</em></p>
+ <p>Then, you will have to adapt each server configuration on their respective servers:
+ <ul>
+ <li>Server #0 configuration (located in <code>server0/</code>) must be changed on Server #0</li>
+ <li>Server #1 configuration (located in <code>server1/</code>) must be changed on Server #1</li>
+ </ul>
+ <h3>Source Server Configuration</h3>
+ <p>On server #0, in <code>server0/hornetq-beans.xml</code>, setup the JNDI server network address by replacing
+ <code>@SOURCE_SERVER</code> by the source server address (e.g. <code>192.168.0.10</code>):</p>
+ <pre class="prettyprint">
+ <bean name="JNDIServer" class="org.jnp.server.Main">
+ ...
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <property name="bindAddress">192.168.0.10</property>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <property name="rmiBindAddress">192.168.0.10</property>
+ ...
+ </bean>
+ </pre>
+ <p>In <code>server0/hornetq-configuration.xml</code>, configure a Netty connector with the source
+ server address:</p>
+ <pre class="prettyprint">
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <param key="hornetq.remoting.netty.host" value="192.168.0.10" type="String"/>
+ </connector>
+ </connectors>
+ </pre>
+ <p>Note that in <code>server0/hornetq-configuration.xml</code>, we also setup the Netty <em>acceptor</em> to accept connections from any of the source server addresses
+ (by specifying <code>0.0.0.0</code>)</p>
+ <p>The source server defines two JMS resources in <code>server0/hornetq-jms.xml</code>:</p>
+ <ul>
+ <li>A JMS ConnectionFactory bound to <code>/source/ConnectionFactory</code></li>
+ <li>A JMS Topic bound to <code>/source/topic</code></li>
+ </ul>
+ <h3>Target Server Configuration</h3>
+ <p>On server #1, in <code>server1/hornetq-beans.xml</code>, setup the JNDI server network address by replacing
+ <code>@TARGET_SERVER</code> by the target server address (e.g. <code>192.168.0.11</code>):</p>
+ <pre class="prettyprint">
+ <bean name="JNDIServer" class="org.jnp.server.Main">
+ ...
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <property name="bindAddress">192.168.0.11</property>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <property name="rmiBindAddress">192.168.0.11</property>
+ ...
+ </bean>
+ </pre>
+ <p>In <code>server1/hornetq-configuration.xml</code>, configure a Netty connector with the target
+ server address:</p>
+ <pre class="prettyprint">
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <param key="hornetq.remoting.netty.host" value="192.168.0.11" type="String"/>
+ </connector>
+ </connectors>
+ </pre>
+ <p>Note that in <code>server1/hornetq-configuration.xml</code>, we also setup the Netty <em>acceptor</em> to accept connections from any of the target server addresses
+ (by specifying <code>0.0.0.0</code>)</p>
+ <p>The target server defines two JMS resources in <code>server1/hornetq-jms.xml</code>:</p>
+ <ul>
+ <li>A JMS ConnectionFactory bound to <code>/target/ConnectionFactory</code></li>
+ <li>A JMS Queue bound to <code>/target/queue</code></li>
+ </ul>
+
+ <h3>JMS Bridge Configuration</h3>
+ <p>The JMS Bridge is a <abbr title="Plain Old Java Object">POJO</abbr> in which we inject JNDI configurations
+ so that it looks up its source and target JMS resources.
+ The JMS Bridge is defined a bean and setup by JBoss Microntainer in the same VM than Server #1, the target server.</p>
+
+ </p>The JMS Bridge is defined by the <code>JMSBridge</code> bean in <code>server1/hornetq-beans.xml</code>:</p>
+ <pre class="prettyprint">
+ <!-- The JMS Bridge -->
+ <bean name="JMSBridge" class="org.hornetq.jms.bridge.impl.JMSBridgeImpl">
+ ...
+ </bean>
+ </pre>
+ <p>the <code>JMSBridgeImpl</code> constructor is used to inject all the properties required to run the JMS Bridge.</p>
+ <p>Its first four arguments defines how the bridge will lookup:</p>
+ <ol>
+ <li>its <em>source</em> JMS ConnectionFactory</li>
+ <li>its <em>source</em> JMS Destination</li>
+ <li>its <em>target</em> JMS ConnectionFactory</li>
+ <li>its <em>target</em> JMS Destination</li>
+ </ol>
+ <p>Using other POJOs, the JMS Bridge is configured to retrieve:</p>
+ <ul>
+ <li>its <em>source</em> JMS ConnectionFactory by looking up <code>/source/ConnectionFactory</code> using
+ the <code>SourceJNDI</code> configuration</li>
+ <li>its <em>source</em> JMS Destination by looking up <code>/source/topic</code> using
+ the <code>SourceJNDI</code> configuration</li>
+ <li>its <em>target</em> JMS ConnectionFactory by looking up <code>/target/ConnectionFactory</code> using
+ the <code>TargetJNDI</code> configuration</li>
+ <li>its <em>target</em> JMS ConnectionFactory by looking up <code>/target/queue</code> using
+ the <code>TargetJNDI</code> configuration</li>
+ </ul>
+ <p>In turn, <code>SourceJNDI</code> and <code>TargetJNDI</code> are POJOs defining how to connect to JNDI server.
+ SourceJNDI URL must point to your source server, while LocalJNDI must point to your target server:</p>
+ <pre class="prettyprint">
+ <bean name="SourceJNDI" class="java.util.Hashtable">
+ ...
+ <entry>
+ <key>java.naming.provider.url</key>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <value>jnp://192.168.0.10:1099</value>
+ ...
+ </bean>
+ <bean name="TargetJNDI" class="java.util.Hashtable">
+ ...
+ <ntry>
+ <key>java.naming.provider.url</key>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <value>jnp://1192.168.0.11:1099</value>
+ </entry>
+ ...
+ </bean>
+ </pre>
+ <h2>Example step-by-step</h2>
+ <p>To run the example after having setup both HornetQ servers and the JMS bridge:</p>
+ <ol>
+ <li>on Server #0, run <code>./build.sh source-server</code></li>
+ <li>on Server #1, run <code>./build.sh target-server</code> (this will start the JMS Bridge too)</li>
+ <li>on either server, run the client:
+ <code>./build.sh client -Dsource=<source server address> -Dtarget=<target server address></code>
+ (for example:
+ <code>./build.sh client -Dsource=192.168.0.11 -Dtarget=192.168.0.11</code>)</li>
+ </ol>
+ <p>Let's look at the Client code (in <code>JMSBridgeExample</code> class):</p>
+ <ol>
+ <li>First we need to get an initial context so we can look-up the JMS resources (using the source and target server
+ addresses passed as arguments to <code>./build.sh client</code>)</li>
+ <pre class="prettyprint">
+ InitialContext sourceContext = createContext(sourceServer);
+ InitialContext targetContext = createContext(targetServer);
+ </pre>
+
+ <li>We look up the JMS resources from the Source server</li>
+ <pre class="prettyprint">
+ ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("/source/ConnectionFactory");
+ Topic sourceTopic = (Topic)sourceContext.lookup("/source/topic");
+ </pre>
+
+ <li>We create JMS objects to send a message to the source destination</li>
+ <pre class="prettyprint">
+ sourceConnection = sourceConnectionFactory.createConnection();
+ Session sourceSession = sourceConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer sourceProducer = sourceSession.createProducer(sourceTopic);
+ </pre>
+
+ <li>We send a message to the source destination</li>
+ <pre class="prettyprint">
+ TextMessage message = sourceSession.createTextMessage("this is a text message sent at " + System.currentTimeMillis());
+ sourceProducer.send(message);
+ </pre>
+
+ <li>We close the connection to the source server</li>
+ <pre class="prettyprint">
+ sourceConnection.close();
+ </pre>
+
+ <p>At this point, the JMS Bridge will consume the message from the source topic and
+ sends it to the target queue.
+ The client will check the bridge works by consuming a message from the target queue.</p>
+
+ <li>We look up the JMS resources from the target server</li>
+ <pre class="prettyprint">
+ ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/target/ConnectionFactory");
+ Queue targetQueue = (Queue)targetContext.lookup("/target/queue");
+ </pre>
+
+ <li>We create JMS objects to receive a message from the target destination</li>
+ <pre class="prettyprint">
+ targetConnection = targetConnectionFactory.createConnection();
+ Session targetSession = targetConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageConsumer targetConsumer = targetSession.createConsumer(targetQueue);
+ </pre>
+
+ <li>We start the target connection to start receiving messages
+ <pre class="prettyprint">
+ targetConnection.start();
+ </pre>
+
+ <li>We receive the message and print it. Its content is the same than the message
+ the client sent to the source topic</li>
+ <pre class="prettyprint">
+ TextMessage messageReceived = (TextMessage)targetConsumer.receive(5000);
+ </pre>
+
+ <li>We display the message ID and its "bridged" message ID</li>
+ <pre class="prettyprint">
+ System.out.format("Message ID : %s\n", messageReceived.getJMSMessageID());
+ System.out.format("Bridged Message ID : %s\n", messageReceived.getStringProperty("HQ_BRIDGE_MSG_ID_LIST"));
+ </pre>
+
+ <p>Note that the message received from the target queue is <em>not the same message</em> sent to the source topic
+ (their message IDs are different) but they have the <em>same content</em>.
+
+ <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
+
+ <pre class="prettyprint">
+ <code>finally
+ {
+ if (initialContext != null)
+ {
+ initialContext.close();
+ }
+ if (connection != null)
+ {
+ connection.close();
+ }
+ }</code>
+ </pre>
+
+
+
+ </ol>
+
+ <h2>More information</h2>
+
+ <ul>
+ <li>User Manual's <a href="../../../docs/user-manual/en/html_single/appserver-integration.html#jms-bridge">JMS Bridge chapter</a></li>
+ <li>The <a href="../../javaee/jms-bridge/readme.html">Java EE JMS Bridge example</a> shows how to configure a JMS Bridge
+ inside JBoss Application Server to bridge destinations from the same server.</a>
+ </p>
+
+ </body>
+</html>
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server0/hornetq-beans.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server0/hornetq-beans.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server0/hornetq-beans.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+ <!-- JNDI server. Disable this if you don't want JNDI -->
+ <bean name="JNDIServer" class="org.jnp.server.Main">
+ <property name="namingInfo">
+ <inject bean="Naming"/>
+ </property>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <property name="bindAddress">@SOURCE_SERVER@</property>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <property name="rmiBindAddress">@SOURCE_SERVER@</property>
+ <property name="port">1099</property>
+ <property name="rmiPort">1098</property>
+ </bean>
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.core.security.impl.HornetQSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+</deployment>
Added: trunk/examples/jms/jms-bridge/server0/hornetq-configuration.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server0/hornetq-configuration.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server0/hornetq-configuration.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,32 @@
+ <configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <param key="hornetq.remoting.netty.host" value="@SOURCE_SERVER@" type="String"/>
+ </connector>
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <!-- the server accepts connections on all the server addresses -->
+ <param key="hornetq.remoting.netty.host" value="0.0.0.0" type="String"/>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.#">
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ <permission type="createTempQueue" roles="guest"/>
+ <permission type="deleteTempQueue" roles="guest"/>
+ </security-setting>
+ </security-settings>
+</configuration>
+
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server0/hornetq-jms.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server0/hornetq-jms.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server0/hornetq-jms.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,15 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty"/>
+ <entries>
+ <entry name="/source/ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <topic name="topic">
+ <entry name="/source/topic"/>
+ </topic>
+</configuration>
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server0/hornetq-users.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server0/hornetq-users.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server0/hornetq-users.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server0/jndi.properties
===================================================================
--- trunk/examples/jms/jms-bridge/server0/jndi.properties (rev 0)
+++ trunk/examples/jms/jms-bridge/server0/jndi.properties 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,2 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Added: trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+ <!-- JNDI server. Disable this if you don't want JNDI -->
+ <bean name="JNDIServer" class="org.jnp.server.Main">
+ <property name="namingInfo">
+ <inject bean="Naming"/>
+ </property>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <property name="bindAddress">@TARGET_SERVER@</property>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <property name="rmiBindAddress">@TARGET_SERVER@</property>
+ <property name="port">1099</property>
+ <property name="rmiPort">1098</property>
+ </bean>
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.core.security.impl.HornetQSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+ <!-- The JMS Bridge -->
+ <bean name="JMSBridge" class="org.hornetq.jms.bridge.impl.JMSBridgeImpl">
+ <constructor>
+ <!-- Source ConnectionFactory Factory -->
+ <parameter>
+ <inject bean="SourceCFF"/>
+ </parameter>
+ <!-- Target ConnectionFactory Factory -->
+ <parameter>
+ <inject bean="TargetCFF"/>
+ </parameter>
+ <!-- Source DestinationFactory -->
+ <parameter>
+ <inject bean="SourceDestinationFactory"/>
+ </parameter>
+ <!-- Target DestinationFactory -->
+ <parameter>
+ <inject bean="TargetDestinationFactory"/>
+ </parameter>
+ <!-- Source username (no username here) -->
+ <parameter><null /></parameter>
+ <!-- Source password (no password here)-->
+ <parameter><null /></parameter>
+ <!-- Target username (no username here)-->
+ <parameter><null /></parameter>
+ <!-- Target password (no password here)-->
+ <parameter><null /></parameter>
+ <!-- Selector -->
+ <parameter><null /></parameter>
+ <!-- Interval to retry in case of failure (in ms) -->
+ <parameter>5000</parameter>
+ <!-- Maximum number of retries to connect to the source and target -->
+ <parameter>10</parameter>
+ <!-- Quality of service -->
+ <parameter>ONCE_AND_ONLY_ONCE</parameter>
+ <!-- Maximum batch size -->
+ <parameter>1</parameter>
+ <!-- Maximum batch time (-1 means infinite) -->
+ <parameter>-1</parameter>
+ <!-- Subscription name (no subscription name here)-->
+ <parameter><null /></parameter>
+ <!-- client ID (no client ID here)-->
+ <parameter><null /></parameter>
+ <!-- concatenate JMS messageID to the target's message header -->
+ <parameter>true</parameter>
+ </constructor>
+ <property name="transactionManager">
+ <inject bean="TransactionManager"/>
+ </property>
+
+ <!-- HornetQ JMS Server must be started before the bridge -->
+ <depends>JMSServerManager</depends>
+
+ </bean>
+
+ <bean name="TransactionManager" class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple">
+ </bean>
+
+ <!-- SourceCFF describes the ConnectionFactory used to connect to the source destination -->
+ <bean name="SourceCFF" class="org.hornetq.jms.bridge.impl.JNDIConnectionFactoryFactory">
+ <constructor>
+ <parameter>
+ <inject bean="SourceJNDI" />
+ </parameter>
+ <parameter>/source/ConnectionFactory</parameter>
+ </constructor>
+ </bean>
+
+ <!-- TargetCFF describes the ConnectionFactory used to connect to the target destination -->
+ <bean name="TargetCFF" class="org.hornetq.jms.bridge.impl.JNDIConnectionFactoryFactory">
+ <constructor>
+ <parameter>
+ <inject bean="TargetJNDI" />
+ </parameter>
+ <parameter>/target/ConnectionFactory</parameter>
+ </constructor>
+ </bean>
+
+ <!-- SourceDestinationFactory describes the Destination used as the source -->
+ <bean name="SourceDestinationFactory" class="org.hornetq.jms.bridge.impl.JNDIDestinationFactory">
+ <constructor>
+ <parameter>
+ <inject bean="SourceJNDI" />
+ </parameter>
+ <parameter>/source/topic</parameter>
+ </constructor>
+ </bean>
+
+ <!-- TargetDestinationFactory describes the Destination used as the target -->
+ <bean name="TargetDestinationFactory" class="org.hornetq.jms.bridge.impl.JNDIDestinationFactory">
+ <constructor>
+ <parameter>
+ <inject bean="TargetJNDI" />
+ </parameter>
+ <parameter>/target/queue</parameter>
+ </constructor>
+ </bean>
+
+ <!-- JNDI is a Hashtable containing the JNDI properties required -->
+ <!-- to connect to the *source* JMS resources -->
+ <bean name="SourceJNDI" class="java.util.Hashtable">
+ <constructor class="java.util.Map">
+ <map class="java.util.Hashtable" keyClass="java.lang.String"
+ valueClass="java.lang.String">
+ <entry>
+ <key>java.naming.factory.initial</key>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </entry>
+ <entry>
+ <key>java.naming.provider.url</key>
+ <!-- **************************************** -->
+ <!-- Replace with the *source* server address -->
+ <!-- **************************************** -->
+ <value>jnp://@SOURCE_SERVER@:1099</value>
+ </entry>
+ <entry>
+ <key>java.naming.factory.url.pkgs</key>
+ <value>org.jboss.naming:org.jnp.interfaces"</value>
+ </entry>
+ </map>
+ </constructor>
+ </bean>
+
+ <!-- JNDI is a Hashtable containing the JNDI properties required -->
+ <!-- to connect to the *target* JMS resources -->
+ <bean name="TargetJNDI" class="java.util.Hashtable">
+ <constructor class="java.util.Map">
+ <map class="java.util.Hashtable" keyClass="java.lang.String"
+ valueClass="java.lang.String">
+ <entry>
+ <key>java.naming.factory.initial</key>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </entry>
+ <entry>
+ <key>java.naming.provider.url</key>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <value>jnp://@TARGET_SERVER@:1099</value>
+ </entry>
+ <entry>
+ <key>java.naming.factory.url.pkgs</key>
+ <value>org.jboss.naming:org.jnp.interfaces"</value>
+ </entry>
+ </map>
+ </constructor>
+ </bean>
+
+</deployment>
Added: trunk/examples/jms/jms-bridge/server1/hornetq-configuration.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server1/hornetq-configuration.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server1/hornetq-configuration.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,32 @@
+ <configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <!-- **************************************** -->
+ <!-- Replace with the *target* server address -->
+ <!-- **************************************** -->
+ <param key="hornetq.remoting.netty.host" value="@TARGET_SERVER@" type="String"/>
+ </connector>
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <!-- the server accepts connections on all the server addresses -->
+ <param key="hornetq.remoting.netty.host" value="0.0.0.0" type="String"/>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.#">
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ <permission type="createTempQueue" roles="guest"/>
+ <permission type="deleteTempQueue" roles="guest"/>
+ </security-setting>
+ </security-settings>
+</configuration>
+
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server1/hornetq-jms.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server1/hornetq-jms.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server1/hornetq-jms.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,15 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty"/>
+ <entries>
+ <entry name="/target/ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="target">
+ <entry name="/target/queue"/>
+ </queue>
+</configuration>
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server1/hornetq-users.xml
===================================================================
--- trunk/examples/jms/jms-bridge/server1/hornetq-users.xml (rev 0)
+++ trunk/examples/jms/jms-bridge/server1/hornetq-users.xml 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Added: trunk/examples/jms/jms-bridge/server1/jndi.properties
===================================================================
--- trunk/examples/jms/jms-bridge/server1/jndi.properties (rev 0)
+++ trunk/examples/jms/jms-bridge/server1/jndi.properties 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,2 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Added: trunk/examples/jms/jms-bridge/src/org/hornetq/jms/example/JMSBridgeExample.java
===================================================================
--- trunk/examples/jms/jms-bridge/src/org/hornetq/jms/example/JMSBridgeExample.java (rev 0)
+++ trunk/examples/jms/jms-bridge/src/org/hornetq/jms/example/JMSBridgeExample.java 2009-10-15 14:32:21 UTC (rev 8113)
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+package org.hornetq.jms.example;
+
+import java.util.Hashtable;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+
+/**
+ * An example which sends a message to a source topic and consume from a target queue.
+ * The source and target destinations are located on 2 different HornetQ server.
+ * The source and target queues are bridged by a JMS Bridge configured and running on the "target" server.
+ *
+ * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
+ */
+public class JMSBridgeExample
+{
+ public static void main(String[] args) throws Exception
+ {
+ if (args.length != 2)
+ {
+ throw new IllegalArgumentException("JMSBridgeExample needs 2 arguments: <source server> <target server>");
+ }
+ String sourceServer = args[0];
+ String targetServer = args[1];
+
+ System.out.println("client will publish messages to " + sourceServer +
+ " and receives message from " +
+ targetServer);
+
+ // Step 1. Create JNDI contexts for source and target servers
+ InitialContext sourceContext = createContext(sourceServer);
+ InitialContext targetContext = createContext(targetServer);
+
+ Connection sourceConnection = null;
+ Connection targetConnection = null;
+ try
+ {
+ // Step 2. Lookup the *source* JMS resources
+ ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("/source/ConnectionFactory");
+ Topic sourceTopic = (Topic)sourceContext.lookup("/source/topic");
+
+ // Step 3. Create a connection, a session and a message producer for the *source* topic
+ sourceConnection = sourceConnectionFactory.createConnection();
+ Session sourceSession = sourceConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer sourceProducer = sourceSession.createProducer(sourceTopic);
+
+ // Step 4. Create and send a text message to the *source* queue
+ TextMessage message = sourceSession.createTextMessage("this is a text message sent at " + System.currentTimeMillis());
+ sourceProducer.send(message);
+ System.out.format("Sent message to %s: %s\n",
+ ((Topic)message.getJMSDestination()).getTopicName(),
+ message.getText());
+ System.out.format("Message ID : %s\n", message.getJMSMessageID());
+
+ // Step 5. Close the *source* connection
+ sourceConnection.close();
+
+ // Step 6. Lookup the *target* JMS resources
+ ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/target/ConnectionFactory");
+ Queue targetQueue = (Queue)targetContext.lookup("/target/queue");
+
+ // Step 7. Create a connection, a session and a message consumer for the *target* queue
+ targetConnection = targetConnectionFactory.createConnection();
+ Session targetSession = targetConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageConsumer targetConsumer = targetSession.createConsumer(targetQueue);
+
+ // Step 8. Start the connection to receive messages from the *target* queue
+ targetConnection.start();
+
+ // Step 9. Receive a message from the *target* queue
+ TextMessage messageReceived = (TextMessage)targetConsumer.receive(5000);
+ System.out.format("\nReceived from %s: %s\n",
+ ((Queue)messageReceived.getJMSDestination()).getQueueName(),
+ messageReceived.getText());
+
+ // Step 10. Display the received message's ID and this "bridged" message ID
+ System.out.format("Message ID : %s\n", messageReceived.getJMSMessageID());
+ System.out.format("Bridged Message ID : %s\n", messageReceived.getStringProperty("HQ_BRIDGE_MSG_ID_LIST"));
+ }
+ finally
+ {
+ // Step 11. Be sure to close the resources!
+ if (sourceContext != null)
+ {
+ sourceContext.close();
+ }
+ if (targetContext != null)
+ {
+ targetContext.close();
+ }
+ if (sourceConnection != null)
+ {
+ sourceConnection.close();
+ }
+ if (targetConnection != null)
+ {
+ targetConnection.close();
+ }
+ }
+ }
+
+ private static InitialContext createContext(String server) throws Exception
+ {
+ String jndiURL = "jnp://" + server + ":1099";
+ Hashtable<String, String> jndiProps = new Hashtable<String, String>();
+ jndiProps.put("java.naming.provider.url", jndiURL);
+ jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ return new InitialContext(jndiProps);
+ }
+}
14 years, 7 months
JBoss hornetq SVN: r8112 - in trunk: examples/core/embedded-remote and 75 other directories.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-10-15 09:50:01 -0400 (Thu, 15 Oct 2009)
New Revision: 8112
Modified:
trunk/examples/core/embedded-remote/build.bat
trunk/examples/core/embedded/build.bat
trunk/examples/core/microcontainer/build.bat
trunk/examples/core/perf/build.bat
trunk/examples/javaee/ejb-jms-transaction/build.bat
trunk/examples/javaee/hajndi/build.bat
trunk/examples/javaee/jca-config/build.bat
trunk/examples/javaee/jms-bridge/build.bat
trunk/examples/javaee/mdb-bmt/build.bat
trunk/examples/javaee/mdb-cmt-setrollbackonly/build.bat
trunk/examples/javaee/mdb-cmt-tx-local/build.bat
trunk/examples/javaee/mdb-cmt-tx-not-supported/build.bat
trunk/examples/javaee/mdb-cmt-tx-required/build.bat
trunk/examples/javaee/mdb-message-selector/build.bat
trunk/examples/javaee/mdb-tx-send/build.bat
trunk/examples/javaee/servlet-ssl/build.bat
trunk/examples/javaee/servlet-transport/build.bat
trunk/examples/javaee/xarecovery/build.bat
trunk/examples/jms/applet/build.bat
trunk/examples/jms/application-layer-failover/build.bat
trunk/examples/jms/automatic-failover/build.bat
trunk/examples/jms/bridge/build.bat
trunk/examples/jms/browser/build.bat
trunk/examples/jms/client-kickoff/build.bat
trunk/examples/jms/client-side-load-balancing/build.bat
trunk/examples/jms/clustered-durable-subscription/build.bat
trunk/examples/jms/clustered-queue/build.bat
trunk/examples/jms/clustered-standalone/build.bat
trunk/examples/jms/clustered-topic/build.bat
trunk/examples/jms/consumer-rate-limit/build.bat
trunk/examples/jms/dead-letter/build.bat
trunk/examples/jms/delayed-redelivery/build.bat
trunk/examples/jms/divert/build.bat
trunk/examples/jms/durable-subscription/build.bat
trunk/examples/jms/embedded/build.bat
trunk/examples/jms/expiry/build.bat
trunk/examples/jms/http-transport/build.bat
trunk/examples/jms/instantiate-connection-factory/build.bat
trunk/examples/jms/interceptor/build.bat
trunk/examples/jms/jaas/build.bat
trunk/examples/jms/jmx/build.bat
trunk/examples/jms/large-message/build.bat
trunk/examples/jms/last-value-queue/build.bat
trunk/examples/jms/management-notifications/build.bat
trunk/examples/jms/management/build.bat
trunk/examples/jms/message-counters/build.bat
trunk/examples/jms/message-group/build.bat
trunk/examples/jms/message-priority/build.bat
trunk/examples/jms/no-consumer-buffering/build.bat
trunk/examples/jms/paging/build.bat
trunk/examples/jms/perf/build.bat
trunk/examples/jms/pre-acknowledge/build.bat
trunk/examples/jms/producer-rate-limit/build.bat
trunk/examples/jms/queue-message-redistribution/build.bat
trunk/examples/jms/queue-requestor/build.bat
trunk/examples/jms/queue-selector/build.bat
trunk/examples/jms/queue/build.bat
trunk/examples/jms/reconnect-same-node/build.bat
trunk/examples/jms/request-reply/build.bat
trunk/examples/jms/scheduled-message/build.bat
trunk/examples/jms/security/build.bat
trunk/examples/jms/send-acknowledgements/build.bat
trunk/examples/jms/ssl-enabled/build.bat
trunk/examples/jms/static-selector-jms/build.bat
trunk/examples/jms/static-selector/build.bat
trunk/examples/jms/symmetric-cluster/build.bat
trunk/examples/jms/temp-queue/build.bat
trunk/examples/jms/topic-hierarchies/build.bat
trunk/examples/jms/topic-selector-example1/build.bat
trunk/examples/jms/topic-selector-example2/build.bat
trunk/examples/jms/topic/build.bat
trunk/examples/jms/transactional/build.bat
trunk/examples/jms/xa-heuristic/build.bat
trunk/examples/jms/xa-receive/build.bat
trunk/examples/jms/xa-send/build.bat
trunk/examples/jms/xa-with-jta/build.bat
trunk/src/bin/build.bat
Log:
https://jira.jboss.org/jira/browse/HORNETQ-67
Modified: trunk/examples/core/embedded/build.bat
===================================================================
--- trunk/examples/core/embedded/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/core/embedded/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/core/embedded-remote/build.bat
===================================================================
--- trunk/examples/core/embedded-remote/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/core/embedded-remote/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/core/microcontainer/build.bat
===================================================================
--- trunk/examples/core/microcontainer/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/core/microcontainer/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,15 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
+
+
Modified: trunk/examples/core/perf/build.bat
===================================================================
--- trunk/examples/core/perf/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/core/perf/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/ejb-jms-transaction/build.bat
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/ejb-jms-transaction/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/hajndi/build.bat
===================================================================
--- trunk/examples/javaee/hajndi/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/hajndi/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/jca-config/build.bat
===================================================================
--- trunk/examples/javaee/jca-config/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/jca-config/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/jms-bridge/build.bat
===================================================================
--- trunk/examples/javaee/jms-bridge/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/jms-bridge/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-bmt/build.bat
===================================================================
--- trunk/examples/javaee/mdb-bmt/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-bmt/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-cmt-setrollbackonly/build.bat
===================================================================
--- trunk/examples/javaee/mdb-cmt-setrollbackonly/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-cmt-setrollbackonly/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-cmt-tx-local/build.bat
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-local/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-cmt-tx-local/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-cmt-tx-not-supported/build.bat
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-not-supported/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-cmt-tx-not-supported/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-cmt-tx-required/build.bat
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-required/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-cmt-tx-required/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-message-selector/build.bat
===================================================================
--- trunk/examples/javaee/mdb-message-selector/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-message-selector/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/mdb-tx-send/build.bat
===================================================================
--- trunk/examples/javaee/mdb-tx-send/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/mdb-tx-send/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/servlet-ssl/build.bat
===================================================================
--- trunk/examples/javaee/servlet-ssl/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/servlet-ssl/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/servlet-transport/build.bat
===================================================================
--- trunk/examples/javaee/servlet-transport/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/servlet-transport/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/javaee/xarecovery/build.bat
===================================================================
--- trunk/examples/javaee/xarecovery/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/javaee/xarecovery/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/applet/build.bat
===================================================================
--- trunk/examples/jms/applet/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/applet/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/application-layer-failover/build.bat
===================================================================
--- trunk/examples/jms/application-layer-failover/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/application-layer-failover/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/automatic-failover/build.bat
===================================================================
--- trunk/examples/jms/automatic-failover/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/automatic-failover/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/bridge/build.bat
===================================================================
--- trunk/examples/jms/bridge/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/bridge/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/browser/build.bat
===================================================================
--- trunk/examples/jms/browser/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/browser/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/client-kickoff/build.bat
===================================================================
--- trunk/examples/jms/client-kickoff/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/client-kickoff/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/client-side-load-balancing/build.bat
===================================================================
--- trunk/examples/jms/client-side-load-balancing/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/client-side-load-balancing/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/clustered-durable-subscription/build.bat
===================================================================
--- trunk/examples/jms/clustered-durable-subscription/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/clustered-durable-subscription/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/clustered-queue/build.bat
===================================================================
--- trunk/examples/jms/clustered-queue/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/clustered-queue/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/clustered-standalone/build.bat
===================================================================
--- trunk/examples/jms/clustered-standalone/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/clustered-standalone/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/clustered-topic/build.bat
===================================================================
--- trunk/examples/jms/clustered-topic/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/clustered-topic/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/consumer-rate-limit/build.bat
===================================================================
--- trunk/examples/jms/consumer-rate-limit/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/consumer-rate-limit/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/dead-letter/build.bat
===================================================================
--- trunk/examples/jms/dead-letter/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/dead-letter/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/delayed-redelivery/build.bat
===================================================================
--- trunk/examples/jms/delayed-redelivery/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/delayed-redelivery/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/divert/build.bat
===================================================================
--- trunk/examples/jms/divert/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/divert/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/durable-subscription/build.bat
===================================================================
--- trunk/examples/jms/durable-subscription/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/durable-subscription/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/embedded/build.bat
===================================================================
--- trunk/examples/jms/embedded/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/embedded/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/expiry/build.bat
===================================================================
--- trunk/examples/jms/expiry/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/expiry/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/http-transport/build.bat
===================================================================
--- trunk/examples/jms/http-transport/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/http-transport/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/instantiate-connection-factory/build.bat
===================================================================
--- trunk/examples/jms/instantiate-connection-factory/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/instantiate-connection-factory/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/interceptor/build.bat
===================================================================
--- trunk/examples/jms/interceptor/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/interceptor/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/jaas/build.bat
===================================================================
--- trunk/examples/jms/jaas/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/jaas/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/jmx/build.bat
===================================================================
--- trunk/examples/jms/jmx/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/jmx/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/large-message/build.bat
===================================================================
--- trunk/examples/jms/large-message/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/large-message/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/last-value-queue/build.bat
===================================================================
--- trunk/examples/jms/last-value-queue/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/last-value-queue/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/management/build.bat
===================================================================
--- trunk/examples/jms/management/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/management/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/management-notifications/build.bat
===================================================================
--- trunk/examples/jms/management-notifications/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/management-notifications/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/message-counters/build.bat
===================================================================
--- trunk/examples/jms/message-counters/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/message-counters/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/message-group/build.bat
===================================================================
--- trunk/examples/jms/message-group/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/message-group/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/message-priority/build.bat
===================================================================
--- trunk/examples/jms/message-priority/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/message-priority/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/no-consumer-buffering/build.bat
===================================================================
--- trunk/examples/jms/no-consumer-buffering/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/no-consumer-buffering/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/paging/build.bat
===================================================================
--- trunk/examples/jms/paging/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/paging/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/perf/build.bat
===================================================================
--- trunk/examples/jms/perf/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/perf/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/pre-acknowledge/build.bat
===================================================================
--- trunk/examples/jms/pre-acknowledge/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/pre-acknowledge/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/producer-rate-limit/build.bat
===================================================================
--- trunk/examples/jms/producer-rate-limit/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/producer-rate-limit/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/queue/build.bat
===================================================================
--- trunk/examples/jms/queue/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/queue/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/queue-message-redistribution/build.bat
===================================================================
--- trunk/examples/jms/queue-message-redistribution/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/queue-message-redistribution/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/queue-requestor/build.bat
===================================================================
--- trunk/examples/jms/queue-requestor/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/queue-requestor/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/queue-selector/build.bat
===================================================================
--- trunk/examples/jms/queue-selector/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/queue-selector/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/reconnect-same-node/build.bat
===================================================================
--- trunk/examples/jms/reconnect-same-node/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/reconnect-same-node/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/request-reply/build.bat
===================================================================
--- trunk/examples/jms/request-reply/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/request-reply/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/scheduled-message/build.bat
===================================================================
--- trunk/examples/jms/scheduled-message/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/scheduled-message/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/security/build.bat
===================================================================
--- trunk/examples/jms/security/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/security/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/send-acknowledgements/build.bat
===================================================================
--- trunk/examples/jms/send-acknowledgements/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/send-acknowledgements/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/ssl-enabled/build.bat
===================================================================
--- trunk/examples/jms/ssl-enabled/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/ssl-enabled/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/static-selector/build.bat
===================================================================
--- trunk/examples/jms/static-selector/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/static-selector/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/static-selector-jms/build.bat
===================================================================
--- trunk/examples/jms/static-selector-jms/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/static-selector-jms/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/symmetric-cluster/build.bat
===================================================================
--- trunk/examples/jms/symmetric-cluster/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/symmetric-cluster/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/temp-queue/build.bat
===================================================================
--- trunk/examples/jms/temp-queue/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/temp-queue/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/topic/build.bat
===================================================================
--- trunk/examples/jms/topic/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/topic/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/topic-hierarchies/build.bat
===================================================================
--- trunk/examples/jms/topic-hierarchies/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/topic-hierarchies/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/topic-selector-example1/build.bat
===================================================================
--- trunk/examples/jms/topic-selector-example1/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/topic-selector-example1/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/topic-selector-example2/build.bat
===================================================================
--- trunk/examples/jms/topic-selector-example2/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/topic-selector-example2/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/transactional/build.bat
===================================================================
--- trunk/examples/jms/transactional/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/transactional/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/xa-heuristic/build.bat
===================================================================
--- trunk/examples/jms/xa-heuristic/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/xa-heuristic/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/xa-receive/build.bat
===================================================================
--- trunk/examples/jms/xa-receive/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/xa-receive/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/xa-send/build.bat
===================================================================
--- trunk/examples/jms/xa-send/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/xa-send/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/examples/jms/xa-with-jta/build.bat
===================================================================
--- trunk/examples/jms/xa-with-jta/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/examples/jms/xa-with-jta/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,12 +1,13 @@
@echo off
-set "OVERRIDE_ANT_HOME=../../../tools/ant"
+set "OVERRIDE_ANT_HOME=..\..\..\tools\ant"
-if exist "../../../src/bin/build.sh" (
- rem running from TRUNK
- call ../../../src/bin/build.sh %*
+if exist "..\..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\..\src\bin\build.bat %*
) else (
- rem running from the distro
- call ../../../bin/build.sh %*
+ rem running from the distro
+ call ..\..\..\bin\build.bat %*
)
+set "OVERRIDE_ANT_HOME="
Modified: trunk/src/bin/build.bat
===================================================================
--- trunk/src/bin/build.bat 2009-10-15 13:37:51 UTC (rev 8111)
+++ trunk/src/bin/build.bat 2009-10-15 13:50:01 UTC (rev 8112)
@@ -1,60 +1,61 @@
-@echo off
-
-rem Copyright 2009 Red Hat, Inc.
-rem Red Hat licenses this file to you under the Apache License, version
-rem 2.0 (the "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-rem implied. See the License for the specific language governing
-rem permissions and limitations under the License.
-
-rem -------------------------------------------------------------------------
-rem HornetQ Build Script for Windows
-rem -------------------------------------------------------------------------
-
-rem $Id: $
-
-rem This build script will ensure a correct ant version is used.
-rem Users can also pass in options on the command line.
-
-rem First check for the existence of JAVA_HOME. It doesn't have to be set,
-rem but it may be an indication that javac is not available on the command line.
-
-if "x%JAVA_HOME%" == "x" (
- echo WARNING: JAVA_HOME is not set. Build may fail.
- echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-)
-else (
- if exist "%JAVA_HOME%\bin\javac.exe" (
- echo Build script found javac.
-) else (
- echo WARNING: javac was not found. Make sure it is available in the path.
-))
-
-rem Save off the original ANT_HOME. We don't want to destroy environments.
-set "ORIG_ANT_HOME=%ANT_HOME%"
-
-rem Set the new one
-
-if "x%OVERRIDE_ANT_HOME%" == "x" (
- set "ANT_HOME=tools\ant"
-)
-else (
- set "ANT_HOME=%OVERRIDE_ANT_HOME"
-)
-
+@echo off
+
+rem Copyright 2009 Red Hat, Inc.
+rem Red Hat licenses this file to you under the Apache License, version
+rem 2.0 (the "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+rem implied. See the License for the specific language governing
+rem permissions and limitations under the License.
+
+rem -------------------------------------------------------------------------
+rem HornetQ Build Script for Windows
+rem -------------------------------------------------------------------------
+
+rem $Id: $
+
+rem This build script will ensure a correct ant version is used.
+rem Users can also pass in options on the command line.
+
+rem First check for the existence of JAVA_HOME. It doesn't have to be set,
+rem but it may be an indication that javac is not available on the command line.
+
+if "x%JAVA_HOME%" == "x" (
+ echo WARNING: JAVA_HOME is not set. Build may fail.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ if exist "%JAVA_HOME%\bin\javac.exe" (
+ echo Build script found javac.
+) else (
+ echo WARNING: javac was not found. Make sure it is available in the path.
+))
+
+rem Save off the original ANT_HOME. We don't want to destroy environments.
+set "ORIG_ANT_HOME=%ANT_HOME%"
+
+rem Set the new one
+
+if "x%OVERRIDE_ANT_HOME%" == "x" (
+ set "ANT_HOME=tools\ant"
+) else (
+ echo hit alternate
+ set "ANT_HOME=%OVERRIDE_ANT_HOME%"
+)
+
rem build HornetQ
-echo "Using the following ant version from %ANT_HOME%:"
+echo Using the following ant version from %ANT_HOME%:
-call tools\ant\bin\ant.bat -version
-
-call tools\ant\bin\ant.bat %* -Dhornetq.run_script=true
-
-rem Restore the original ANT_HOME values
-set "ANT_HOME=%ORIG_ANT_HOME%"
-
-echo Done
+echo calling %ANT_HOME%\bin\ant.bat -version
+call %ANT_HOME%\bin\ant.bat -version
+
+echo calling %ANT_HOME%\bin\ant.bat %* -Dhornetq.run_script=true
+call %ANT_HOME%\bin\ant.bat %* -Dhornetq.run_script=true
+
+rem Restore the original ANT_HOME values
+set "ANT_HOME=%ORIG_ANT_HOME%"
+
+echo Done
14 years, 7 months
JBoss hornetq SVN: r8111 - in trunk: src/main/org/hornetq/core/management/impl and 10 other directories.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-10-15 09:37:51 -0400 (Thu, 15 Oct 2009)
New Revision: 8111
Modified:
trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMAcceptorFactory.java
trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMConnectorFactory.java
trunk/src/main/org/hornetq/core/remoting/impl/invm/TransportConstants.java
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
trunk/src/main/org/hornetq/core/remoting/spi/AcceptorFactory.java
trunk/src/main/org/hornetq/core/remoting/spi/Connector.java
trunk/src/main/org/hornetq/core/remoting/spi/ConnectorFactory.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
trunk/src/main/org/hornetq/integration/transports/netty/NettyAcceptorFactory.java
trunk/src/main/org/hornetq/integration/transports/netty/NettyConnector.java
trunk/src/main/org/hornetq/integration/transports/netty/NettyConnectorFactory.java
trunk/src/main/org/hornetq/integration/transports/netty/TransportConstants.java
trunk/src/main/org/hornetq/utils/ConfigurationHelper.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
Log:
added checks for valid remoting properties also removed special management acceptor
Modified: trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -49,6 +49,7 @@
import org.hornetq.core.remoting.spi.HornetQBuffer;
import org.hornetq.core.version.Version;
import org.hornetq.utils.ConcurrentHashSet;
+import org.hornetq.utils.ConfigurationHelper;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.OrderedExecutorFactory;
import org.hornetq.utils.UUIDGenerator;
@@ -142,19 +143,19 @@
// ---------------------------------------------------------------------------------
public FailoverManagerImpl(final ClientSessionFactory sessionFactory,
- final TransportConfiguration connectorConfig,
- final TransportConfiguration backupConfig,
- final boolean failoverOnServerShutdown,
- final long callTimeout,
- final long clientFailureCheckPeriod,
- final long connectionTTL,
- final long retryInterval,
- final double retryIntervalMultiplier,
- final long maxRetryInterval,
- final int reconnectAttempts,
- final ExecutorService threadPool,
- final ScheduledExecutorService scheduledThreadPool,
- final List<Interceptor> interceptors)
+ final TransportConfiguration connectorConfig,
+ final TransportConfiguration backupConfig,
+ final boolean failoverOnServerShutdown,
+ final long callTimeout,
+ final long clientFailureCheckPeriod,
+ final long connectionTTL,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final long maxRetryInterval,
+ final int reconnectAttempts,
+ final ExecutorService threadPool,
+ final ScheduledExecutorService scheduledThreadPool,
+ final List<Interceptor> interceptors)
{
this.sessionFactory = sessionFactory;
@@ -168,11 +169,15 @@
transportParams = connectorConfig.getParams();
+ checkTransportKeys(connectorFactory, transportParams);
+
if (backupConfig != null)
{
backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName());
backupTransportParams = backupConfig.getParams();
+
+ checkTransportKeys(backupConnectorFactory, backupTransportParams);
}
else
{
@@ -483,7 +488,7 @@
private void failoverOrReconnect(final Object connectionID, final HornetQException me)
{
synchronized (failoverLock)
- {
+ {
if (connection == null || connection.getID() != connectionID)
{
// We already failed over/reconnected - probably the first failure came in, all the connections were failed
@@ -534,7 +539,7 @@
{
attemptReconnect = reconnectAttempts != 0;
}
-
+
if (attemptFailover || attemptReconnect)
{
lockChannel1();
@@ -609,13 +614,13 @@
{
reconnectSessions(reconnectAttempts);
}
-
+
oldConnection.destroy();
}
else
{
connection.destroy();
-
+
connection = null;
}
@@ -673,10 +678,10 @@
}
backupConnection.setFailureListeners(newListeners);
-
+
for (ClientSessionInternal session : sessions)
{
- session.handleFailover(backupConnection);
+ session.handleFailover(backupConnection);
}
}
@@ -884,9 +889,9 @@
{
pingRunnable.run();
}
- }
- }
-
+ }
+ }
+
return connection;
}
@@ -926,6 +931,23 @@
channel1.returnBlocking();
}
+ private void checkTransportKeys(final ConnectorFactory factory, final Map<String, Object> params)
+ {
+ if (params != null)
+ {
+ Set<String> invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), params.keySet());
+
+ if (!invalid.isEmpty())
+ {
+ String msg = ConfigurationHelper.stringSetToCommaListString("The following keys are invalid for configuring a connector: ",
+ invalid);
+
+ throw new IllegalStateException(msg);
+
+ }
+ }
+ }
+
private class Channel0Handler implements ChannelHandler
{
private final RemotingConnection conn;
Modified: trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -68,7 +68,6 @@
import org.hornetq.core.server.cluster.Bridge;
import org.hornetq.core.server.cluster.BroadcastGroup;
import org.hornetq.core.server.cluster.ClusterConnection;
-import org.hornetq.core.server.impl.RoutingContextImpl;
import org.hornetq.core.server.impl.ServerMessageImpl;
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.core.settings.impl.AddressSettings;
@@ -146,8 +145,7 @@
// Constructor ----------------------------------------------------
public ManagementServiceImpl(final MBeanServer mbeanServer,
- final Configuration configuration,
- final int managementConnectorID)
+ final Configuration configuration)
{
this.mbeanServer = mbeanServer;
this.jmxManagementEnabled = configuration.isJMXManagementEnabled();
Modified: trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMAcceptorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMAcceptorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMAcceptorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -13,6 +13,7 @@
package org.hornetq.core.remoting.impl.invm;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -29,13 +30,18 @@
*/
public class InVMAcceptorFactory implements AcceptorFactory
{
-
public Acceptor createAcceptor(final Map<String, Object> configuration,
- final BufferHandler handler, final ConnectionLifeCycleListener listener,
- final Executor threadPool,
- final ScheduledExecutorService scheduledThreadPool)
+ final BufferHandler handler,
+ final ConnectionLifeCycleListener listener,
+ final Executor threadPool,
+ final ScheduledExecutorService scheduledThreadPool)
{
return new InVMAcceptor(configuration, handler, listener, threadPool);
}
+ public Set<String> getAllowableProperties()
+ {
+ return TransportConstants.ALLOWABLE_ACCEPTOR_KEYS;
+ }
+
}
Modified: trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMConnectorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMConnectorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/impl/invm/InVMConnectorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -13,6 +13,7 @@
package org.hornetq.core.remoting.impl.invm;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -46,5 +47,10 @@
return connector;
}
}
+
+ public Set<String> getAllowableProperties()
+ {
+ return TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
+ }
}
Modified: trunk/src/main/org/hornetq/core/remoting/impl/invm/TransportConstants.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/invm/TransportConstants.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/impl/invm/TransportConstants.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -12,6 +12,10 @@
*/
package org.hornetq.core.remoting.impl.invm;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A TransportConstants
*
@@ -21,4 +25,21 @@
public class TransportConstants
{
public static final String SERVER_ID_PROP_NAME = "hornetq.remoting.invm.serverid";
+
+ public static final Set<String> ALLOWABLE_CONNECTOR_KEYS;
+
+ public static final Set<String> ALLOWABLE_ACCEPTOR_KEYS;
+
+ static
+ {
+ Set<String> allowableAcceptorKeys = new HashSet<String>();
+ allowableAcceptorKeys.add(SERVER_ID_PROP_NAME);
+
+ ALLOWABLE_CONNECTOR_KEYS = Collections.unmodifiableSet(allowableAcceptorKeys);
+
+ Set<String> allowableConnectorKeys = new HashSet<String>();
+ allowableConnectorKeys.add(SERVER_ID_PROP_NAME);
+
+ ALLOWABLE_ACCEPTOR_KEYS = Collections.unmodifiableSet(allowableConnectorKeys);
+ }
}
Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -15,7 +15,6 @@
import static org.hornetq.core.remoting.impl.wireformat.PacketImpl.DISCONNECT;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -52,6 +51,7 @@
import org.hornetq.core.remoting.spi.HornetQBuffer;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.impl.HornetQPacketHandler;
+import org.hornetq.utils.ConfigurationHelper;
/**
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
@@ -93,8 +93,6 @@
private final ScheduledExecutorService scheduledThreadPool;
- private final int managementConnectorID;
-
private FailureCheckThread failureCheckThread;
// Static --------------------------------------------------------
@@ -105,8 +103,7 @@
final HornetQServer server,
final ManagementService managementService,
final Executor threadPool,
- final ScheduledExecutorService scheduledThreadPool,
- final int managementConnectorID)
+ final ScheduledExecutorService scheduledThreadPool)
{
transportConfigs = config.getAcceptorConfigurations();
@@ -129,7 +126,6 @@
this.managementService = managementService;
this.threadPool = threadPool;
this.scheduledThreadPool = scheduledThreadPool;
- this.managementConnectorID = managementConnectorID;
}
// RemotingService implementation -------------------------------
@@ -151,6 +147,22 @@
AcceptorFactory factory = (AcceptorFactory)clazz.newInstance();
+ // Check valid properties
+
+ if (info.getParams() != null)
+ {
+ Set<String> invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), info.getParams()
+ .keySet());
+
+ if (!invalid.isEmpty())
+ {
+ log.warn(ConfigurationHelper.stringSetToCommaListString("The following keys are invalid for configuring the acceptor: ",
+ invalid) + " the acceptor will not be started.");
+
+ continue;
+ }
+ }
+
Acceptor acceptor = factory.createAcceptor(info.getParams(),
bufferHandler,
this,
@@ -170,32 +182,6 @@
}
}
- // We now create a "special" acceptor used by management to send/receive management messages - this is an invm
- // acceptor with a -ve server id
- // TODO this is not the best solution, management should send/receive management messages direct.
- // Remove this code when this is implemented without having to require a special acceptor
- // https://jira.jboss.org/jira/browse/JBMESSAGING-1649
-
- if (config.isJMXManagementEnabled())
- {
- Map<String, Object> params = new HashMap<String, Object>();
-
- params.put(TransportConstants.SERVER_ID_PROP_NAME, managementConnectorID);
-
- AcceptorFactory factory = new InVMAcceptorFactory();
-
- Acceptor acceptor = factory.createAcceptor(params, bufferHandler, this, threadPool, scheduledThreadPool);
-
- acceptors.add(acceptor);
-
- if (managementService != null)
- {
- TransportConfiguration info = new TransportConfiguration(InVMAcceptorFactory.class.getName(), params);
-
- managementService.registerAcceptor(acceptor, info);
- }
- }
-
for (Acceptor a : acceptors)
{
a.start();
@@ -233,23 +219,23 @@
}
failureCheckThread.close();
-
+
// We need to stop them accepting first so no new connections are accepted after we send the disconnect message
for (Acceptor acceptor : acceptors)
{
acceptor.pause();
}
-
+
for (ConnectionEntry entry : connections.values())
- {
+ {
entry.connection.getChannel(0, -1, false).sendAndFlush(new PacketImpl(DISCONNECT));
}
-
+
for (Acceptor acceptor : acceptors)
{
acceptor.stop();
}
-
+
acceptors.clear();
connections.clear();
@@ -303,9 +289,9 @@
{
throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
}
-
+
RemotingConnection rc = new RemotingConnectionImpl(connection,
- interceptors,
+ interceptors,
server.getConfiguration().isAsyncConnectionExecutionEnabled() ? server.getExecutorFactory()
.getExecutor()
: null);
@@ -321,9 +307,7 @@
{
ttl = config.getConnectionTTLOverride();
}
- final ConnectionEntry entry = new ConnectionEntry(rc,
- System.currentTimeMillis(),
- ttl);
+ final ConnectionEntry entry = new ConnectionEntry(rc, System.currentTimeMillis(), ttl);
connections.put(connection.getID(), entry);
@@ -467,7 +451,7 @@
}
public void run()
- {
+ {
while (!closed)
{
long now = System.currentTimeMillis();
@@ -499,9 +483,9 @@
RemotingConnection conn = removeConnection(id);
HornetQException me = new HornetQException(HornetQException.CONNECTION_TIMEDOUT,
- "Did not receive ping from " + conn.getRemoteAddress() +
- ". It is likely the client has exited or crashed without " +
- "closing its connection, or the network between the server and client has failed. The connection will now be closed.");
+ "Did not receive ping from " + conn.getRemoteAddress() +
+ ". It is likely the client has exited or crashed without " +
+ "closing its connection, or the network between the server and client has failed. The connection will now be closed.");
conn.fail(me);
}
Modified: trunk/src/main/org/hornetq/core/remoting/spi/AcceptorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/spi/AcceptorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/spi/AcceptorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -14,6 +14,7 @@
package org.hornetq.core.remoting.spi;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -29,4 +30,6 @@
ConnectionLifeCycleListener listener,
Executor threadPool,
ScheduledExecutorService scheduledThreadPool);
+
+ Set<String> getAllowableProperties();
}
Modified: trunk/src/main/org/hornetq/core/remoting/spi/Connector.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/spi/Connector.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/spi/Connector.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -12,6 +12,7 @@
*/
package org.hornetq.core.remoting.spi;
+
/**
*
* A Connector
Modified: trunk/src/main/org/hornetq/core/remoting/spi/ConnectorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/spi/ConnectorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/remoting/spi/ConnectorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -14,6 +14,7 @@
package org.hornetq.core.remoting.spi;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -30,4 +31,6 @@
ConnectionLifeCycleListener listener,
Executor threadPool,
ScheduledExecutorService scheduledThreadPool);
+
+ Set<String> getAllowableProperties();
}
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -28,7 +28,6 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
import javax.management.MBeanServer;
@@ -183,10 +182,6 @@
private boolean initialised;
- private int managementConnectorID;
-
- private static AtomicInteger managementConnectorSequence = new AtomicInteger(0);
-
private FailoverManager replicatingFailoverManager;
private final Set<ActivateCallback> activateCallbacks = new HashSet<ActivateCallback>();
@@ -243,7 +238,7 @@
addressSettingsRepository.setDefault(new AddressSettings());
- this.managementConnectorID = managementConnectorSequence.decrementAndGet();
+ // this.managementConnectorID = managementConnectorSequence.decrementAndGet();
}
// lifecycle methods
@@ -932,14 +927,13 @@
scheduledPool = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(),
new HornetQThreadFactory("HornetQ-scheduled-threads", false));
- managementService = new ManagementServiceImpl(mbeanServer, configuration, managementConnectorID);
+ managementService = new ManagementServiceImpl(mbeanServer, configuration);
remotingService = new RemotingServiceImpl(configuration,
this,
managementService,
threadPool,
- scheduledPool,
- managementConnectorID);
+ scheduledPool);
if (configuration.getMemoryMeasureInterval() != -1)
{
Modified: trunk/src/main/org/hornetq/integration/transports/netty/NettyAcceptorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/integration/transports/netty/NettyAcceptorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/integration/transports/netty/NettyAcceptorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -14,6 +14,7 @@
package org.hornetq.integration.transports.netty;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -37,4 +38,9 @@
{
return new NettyAcceptor(configuration, handler, listener, threadPool, scheduledThreadPool);
}
+
+ public Set<String> getAllowableProperties()
+ {
+ return TransportConstants.ALLOWABLE_ACCEPTOR_KEYS;
+ }
}
Modified: trunk/src/main/org/hornetq/integration/transports/netty/NettyConnector.java
===================================================================
--- trunk/src/main/org/hornetq/integration/transports/netty/NettyConnector.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/integration/transports/netty/NettyConnector.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -154,7 +154,7 @@
{
throw new IllegalArgumentException("Invalid argument null handler");
}
-
+
this.listener = listener;
this.handler = handler;
Modified: trunk/src/main/org/hornetq/integration/transports/netty/NettyConnectorFactory.java
===================================================================
--- trunk/src/main/org/hornetq/integration/transports/netty/NettyConnectorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/integration/transports/netty/NettyConnectorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -14,6 +14,7 @@
package org.hornetq.integration.transports.netty;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -37,4 +38,10 @@
{
return new NettyConnector(configuration, handler, listener, threadPool, scheduledThreadPool);
}
+
+ public Set<String> getAllowableProperties()
+ {
+ return TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
+ }
+
}
Modified: trunk/src/main/org/hornetq/integration/transports/netty/TransportConstants.java
===================================================================
--- trunk/src/main/org/hornetq/integration/transports/netty/TransportConstants.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/integration/transports/netty/TransportConstants.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -12,6 +12,10 @@
*/
package org.hornetq.integration.transports.netty;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A TransportConstants
*
@@ -100,4 +104,49 @@
public static final String DEFAULT_SERVLET_PATH = "/messaging/HornetQServlet";
+ public static final Set<String> ALLOWABLE_CONNECTOR_KEYS;
+
+ public static final Set<String> ALLOWABLE_ACCEPTOR_KEYS;
+
+ static
+ {
+ Set<String> allowableAcceptorKeys = new HashSet<String>();
+ allowableAcceptorKeys.add(SSL_ENABLED_PROP_NAME);
+ allowableAcceptorKeys.add(HTTP_ENABLED_PROP_NAME);
+ allowableAcceptorKeys.add(HTTP_RESPONSE_TIME_PROP_NAME);
+ allowableAcceptorKeys.add(HTTP_SERVER_SCAN_PERIOD_PROP_NAME);
+ allowableAcceptorKeys.add(USE_NIO_PROP_NAME);
+ allowableAcceptorKeys.add(USE_INVM_PROP_NAME);
+ allowableAcceptorKeys.add(HOST_PROP_NAME);
+ allowableAcceptorKeys.add(PORT_PROP_NAME);
+ allowableAcceptorKeys.add(KEYSTORE_PATH_PROP_NAME);
+ allowableAcceptorKeys.add(KEYSTORE_PASSWORD_PROP_NAME);
+ allowableAcceptorKeys.add(TRUSTSTORE_PATH_PROP_NAME);
+ allowableAcceptorKeys.add(TRUSTSTORE_PASSWORD_PROP_NAME);
+ allowableAcceptorKeys.add(TCP_NODELAY_PROPNAME);
+ allowableAcceptorKeys.add(TCP_SENDBUFFER_SIZE_PROPNAME);
+ allowableAcceptorKeys.add(TCP_RECEIVEBUFFER_SIZE_PROPNAME);
+
+ ALLOWABLE_CONNECTOR_KEYS = Collections.unmodifiableSet(allowableAcceptorKeys);
+
+ Set<String> allowableConnectorKeys = new HashSet<String>();
+ allowableConnectorKeys.add(SSL_ENABLED_PROP_NAME);
+ allowableConnectorKeys.add(HTTP_ENABLED_PROP_NAME);
+ allowableConnectorKeys.add(HTTP_CLIENT_IDLE_PROP_NAME);
+ allowableConnectorKeys.add(HTTP_CLIENT_IDLE_SCAN_PERIOD);
+ allowableConnectorKeys.add(HTTP_REQUIRES_SESSION_ID);
+ allowableConnectorKeys.add(USE_SERVLET_PROP_NAME);
+ allowableConnectorKeys.add(SERVLET_PATH);
+ allowableConnectorKeys.add(USE_NIO_PROP_NAME);
+ allowableConnectorKeys.add(HOST_PROP_NAME);
+ allowableConnectorKeys.add(PORT_PROP_NAME);
+ allowableConnectorKeys.add(KEYSTORE_PATH_PROP_NAME);
+ allowableConnectorKeys.add(KEYSTORE_PASSWORD_PROP_NAME);
+ allowableConnectorKeys.add(TCP_NODELAY_PROPNAME);
+ allowableConnectorKeys.add(TCP_SENDBUFFER_SIZE_PROPNAME);
+ allowableConnectorKeys.add(TCP_RECEIVEBUFFER_SIZE_PROPNAME);
+
+ ALLOWABLE_ACCEPTOR_KEYS = Collections.unmodifiableSet(allowableConnectorKeys);
+ }
+
}
Modified: trunk/src/main/org/hornetq/utils/ConfigurationHelper.java
===================================================================
--- trunk/src/main/org/hornetq/utils/ConfigurationHelper.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/src/main/org/hornetq/utils/ConfigurationHelper.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -12,7 +12,9 @@
*/
package org.hornetq.utils;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import org.hornetq.core.logging.Logger;
@@ -116,7 +118,7 @@
}
}
}
-
+
public static boolean getBooleanProperty(final String propName, final boolean def, final Map<String, Object> props)
{
if (props == null)
@@ -149,4 +151,36 @@
}
}
}
+
+ public static Set<String> checkKeys(final Set<String> allowableKeys, final Set<String> keys)
+ {
+ Set<String> invalid = new HashSet<String>();
+
+ for (String key : keys)
+ {
+ if (!allowableKeys.contains(key))
+ {
+ invalid.add(key);
+ }
+ }
+ return invalid;
+ }
+
+ public static String stringSetToCommaListString(final String msg, final Set<String> invalid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append(msg);
+ int count = 0;
+ for (String key : invalid)
+ {
+ sb.append(key);
+ if (count != invalid.size() - 1)
+ {
+ sb.append(", ");
+ }
+ count++;
+ }
+ return sb.toString();
+ }
+
}
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -1091,14 +1091,17 @@
protected Map<String, Object> generateParams(int node, boolean netty)
{
- Map<String, Object> params = new HashMap<String, Object>();
- params.put(SERVER_ID_PROP_NAME, node);
+ Map<String, Object> params = new HashMap<String, Object>();
if (netty)
{
params.put(org.hornetq.integration.transports.netty.TransportConstants.PORT_PROP_NAME,
org.hornetq.integration.transports.netty.TransportConstants.DEFAULT_PORT + node);
}
+ else
+ {
+ params.put(SERVER_ID_PROP_NAME, node);
+ }
return params;
}
Modified: trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/tests/src/org/hornetq/tests/integration/largemessage/mock/MockConnectorFactory.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -13,7 +13,9 @@
package org.hornetq.tests.integration.largemessage.mock;
+import java.util.Collections;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
@@ -54,6 +56,14 @@
return new MockConnector(configuration, handler, listener);
}
+ /* (non-Javadoc)
+ * @see org.hornetq.core.remoting.spi.ConnectorFactory#getAllowableProperties()
+ */
+ public Set<String> getAllowableProperties()
+ {
+ return Collections.EMPTY_SET;
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -157,7 +157,7 @@
{
Configuration conf = new ConfigurationImpl();
conf.setJMXManagementEnabled(false);
- ManagementServiceImpl managementService = new ManagementServiceImpl(null, conf, -1);
+ ManagementServiceImpl managementService = new ManagementServiceImpl(null, conf);
SimpleString address = randomSimpleString();
managementService.registerAddress(address);
Modified: trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2009-10-14 13:42:12 UTC (rev 8110)
+++ trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2009-10-15 13:37:51 UTC (rev 8111)
@@ -366,8 +366,7 @@
HornetQResourceAdapter ra = new HornetQResourceAdapter();
- ra.setConnectorClassName("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory");
- ra.setConnectionParameters("bm.remoting.invm.serverid=0");
+ ra.setConnectorClassName("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory");
ra.setUserName("userGlobal");
ra.setPassword("passwordGlobal");
ra.start(fakeCTX);
14 years, 7 months
JBoss hornetq SVN: r8110 - branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-10-14 09:42:12 -0400 (Wed, 14 Oct 2009)
New Revision: 8110
Modified:
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
Log:
new test
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 12:59:50 UTC (rev 8109)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 13:42:12 UTC (rev 8110)
@@ -444,7 +444,6 @@
message.putStringProperty(key, val);
message.putIntProperty(COUNT_PROP, i);
- System.out.println("i = " + i);
producer.send(message);
}
@@ -511,7 +510,6 @@
int msgEnd,
int... consumerIDs) throws Exception
{
- boolean outOfOrder = false;
HashMap<SimpleString, Integer> groupIdsReceived = new HashMap<SimpleString, Integer>();
for (int i = 0; i < consumerIDs.length; i++)
{
@@ -546,6 +544,7 @@
}
SimpleString id = (SimpleString) message.getProperty(MessageImpl.HDR_GROUP_ID);
+ System.out.println("received " + id + " on consumer " + i);
if(groupIdsReceived.get(id) == null)
{
groupIdsReceived.put(id, i);
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 12:59:50 UTC (rev 8109)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 13:42:12 UTC (rev 8110)
@@ -21,6 +21,9 @@
import org.hornetq.core.management.Notification;
import org.hornetq.utils.SimpleString;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
@@ -128,7 +131,7 @@
public void onNotification(Notification notification)
{
-
+
}
}, 0);
setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1, 1);
@@ -421,7 +424,6 @@
}
-
public void testGroupingRoundRobin() throws Exception
{
setupServer(0, isFileStorage(), isNetty());
@@ -612,8 +614,8 @@
addConsumer(1, 1, "queue0", null);
waitForBindings(1, "queues.testaddress", 1, 1, true);
-
+
verifyReceiveAllInRange(10, 20, 1);
System.out.println("*****************************************************************************");
@@ -629,77 +631,77 @@
}
public void testGroupingSendTo3queuesPinnedNodeGoesDownSendBeforeStop() throws Exception
- {
- setupServer(0, isFileStorage(), isNetty());
- setupServer(1, isFileStorage(), isNetty());
- setupServer(2, isFileStorage(), isNetty());
+ {
+ setupServer(0, isFileStorage(), isNetty());
+ setupServer(1, isFileStorage(), isNetty());
+ setupServer(2, isFileStorage(), isNetty());
- setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
- setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
- setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
- startServers(0, 1, 2);
+ startServers(0, 1, 2);
- try
- {
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 0);
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1);
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2);
+ try
+ {
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 0);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2);
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
- setupSessionFactory(2, isNetty());
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
- createQueue(0, "queues.testaddress", "queue0", null, true);
- createQueue(1, "queues.testaddress", "queue0", null, true);
- createQueue(2, "queues.testaddress", "queue0", null, true);
+ createQueue(0, "queues.testaddress", "queue0", null, true);
+ createQueue(1, "queues.testaddress", "queue0", null, true);
+ createQueue(2, "queues.testaddress", "queue0", null, true);
- addConsumer(0, 1, "queue0", null);
+ addConsumer(0, 1, "queue0", null);
- waitForBindings(0, "queues.testaddress", 1, 0, true);
- waitForBindings(1, "queues.testaddress", 1, 1, true);
- waitForBindings(2, "queues.testaddress", 1, 0, true);
+ waitForBindings(0, "queues.testaddress", 1, 0, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 0, true);
- waitForBindings(0, "queues.testaddress", 2, 1, false);
- waitForBindings(1, "queues.testaddress", 2, 0, false);
- waitForBindings(2, "queues.testaddress", 2, 1, false);
+ waitForBindings(0, "queues.testaddress", 2, 1, false);
+ waitForBindings(1, "queues.testaddress", 2, 0, false);
+ waitForBindings(2, "queues.testaddress", 2, 1, false);
- sendInRange(1, "queues.testaddress", 0, 10, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ sendInRange(1, "queues.testaddress", 0, 10, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- verifyReceiveAllInRange(true, 0, 10, 0);
+ verifyReceiveAllInRange(true, 0, 10, 0);
- closeAllConsumers();
+ closeAllConsumers();
- sendInRange(2, "queues.testaddress", 10, 20, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ sendInRange(2, "queues.testaddress", 10, 20, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- sendInRange(0, "queues.testaddress", 20, 30, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ sendInRange(0, "queues.testaddress", 20, 30, true, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- stopServers(1);
+ stopServers(1);
- startServers(1);
+ startServers(1);
- addConsumer(1, 1, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
- waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
- verifyReceiveAllInRange(10, 30, 1);
+ verifyReceiveAllInRange(10, 30, 1);
- System.out.println("*****************************************************************************");
- }
- finally
- {
- //closeAllConsumers();
+ System.out.println("*****************************************************************************");
+ }
+ finally
+ {
+ //closeAllConsumers();
- closeAllSessionFactories();
+ closeAllSessionFactories();
- stopServers(0, 1, 2);
- }
+ stopServers(0, 1, 2);
}
+ }
public void testGroupingSendTo3queuesPinnedNodeGoesDownSendAfterRestart() throws Exception
@@ -747,7 +749,6 @@
stopServers(1);
-
startServers(1);
sendInRange(2, "queues.testaddress", 10, 20, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
@@ -822,8 +823,6 @@
sendInRange(2, "queues.testaddress", 10, 20, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
-
-
startServers(0);
waitForBindings(0, "queues.testaddress", 1, 0, true);
@@ -845,70 +844,137 @@
}
public void testGroupingMultipleQueuesOnAddress() throws Exception
+ {
+ setupServer(0, isFileStorage(), isNetty());
+ setupServer(1, isFileStorage(), isNetty());
+ setupServer(2, isFileStorage(), isNetty());
+
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
+
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
+
+ startServers(0, 1, 2);
+
+ try
{
- setupServer(0, isFileStorage(), isNetty());
- setupServer(1, isFileStorage(), isNetty());
- setupServer(2, isFileStorage(), isNetty());
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 0);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2);
- setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
- setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
- setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
+ createQueue(0, "queues.testaddress", "queue1", null, false);
+ createQueue(1, "queues.testaddress", "queue1", null, false);
+ createQueue(2, "queues.testaddress", "queue1", null, false);
- startServers(0, 1, 2);
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
- try
- {
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 0);
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1);
- setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2);
+ addConsumer(3, 0, "queue0", null);
+ addConsumer(4, 1, "queue0", null);
+ addConsumer(5, 2, "queue0", null);
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
- setupSessionFactory(2, isNetty());
+ waitForBindings(0, "queues.testaddress", 2, 2, true);
+ waitForBindings(1, "queues.testaddress", 2, 2, true);
+ waitForBindings(2, "queues.testaddress", 2, 2, true);
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(1, "queues.testaddress", "queue0", null, false);
- createQueue(2, "queues.testaddress", "queue0", null, false);
+ waitForBindings(0, "queues.testaddress", 4, 4, false);
+ waitForBindings(1, "queues.testaddress", 4, 4, false);
+ waitForBindings(2, "queues.testaddress", 4, 4, false);
- createQueue(0, "queues.testaddress", "queue1", null, false);
- createQueue(1, "queues.testaddress", "queue1", null, false);
- createQueue(2, "queues.testaddress", "queue1", null, false);
- addConsumer(0, 0, "queue0", null);
- addConsumer(1, 1, "queue0", null);
- addConsumer(2, 2, "queue0", null);
-
- addConsumer(3, 0, "queue0", null);
- addConsumer(4, 1, "queue0", null);
- addConsumer(5, 2, "queue0", null);
+ sendWithProperty(0, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- waitForBindings(0, "queues.testaddress", 2, 2, true);
- waitForBindings(1, "queues.testaddress", 2, 2, true);
- waitForBindings(2, "queues.testaddress", 2, 2, true);
+ verifyReceiveAll(10, 0);
- waitForBindings(0, "queues.testaddress", 4, 4, false);
- waitForBindings(1, "queues.testaddress", 4, 4, false);
- waitForBindings(2, "queues.testaddress", 4, 4, false);
+ System.out.println("*****************************************************************************");
+ }
+ finally
+ {
+ closeAllConsumers();
+ closeAllSessionFactories();
- sendWithProperty(0, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ stopServers(0, 1, 2);
+ }
+ }
- verifyReceiveAll(10, 0);
+ public void testGroupingMultipleSending() throws Exception
+ {
+ setupServer(0, isFileStorage(), isNetty());
+ setupServer(1, isFileStorage(), isNetty());
+ setupServer(2, isFileStorage(), isNetty());
- System.out.println("*****************************************************************************");
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
+
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
+
+ startServers(0, 1, 2);
+
+ try
+ {
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 0);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+
+ CountDownLatch latch = new CountDownLatch(1);
+ Thread[] threads = new Thread[9];
+ int range = 0;
+ for(int i = 0 ; i < 9; i++,range+=10)
+ {
+ threads[i] = new Thread(new ThreadSender(range, range+10, 1, new SimpleString("id" + i), latch, i < 8));
}
- finally
+ for (Thread thread : threads)
{
- closeAllConsumers();
+ thread.start();
+ }
- closeAllSessionFactories();
+ verifyReceiveAllWithGroupIDRoundRobin(0, 30, 0, 1, 2);
- stopServers(0, 1, 2);
- }
+ System.out.println("*****************************************************************************");
}
+ finally
+ {
+ closeAllConsumers();
+ closeAllSessionFactories();
+
+ stopServers(0, 1, 2);
+ }
+ }
+
+
public boolean isNetty()
{
return true;
@@ -918,5 +984,52 @@
{
return true;
}
+
+ class ThreadSender implements Runnable
+ {
+ private int msgStart;
+ private int msgEnd;
+ private SimpleString id;
+ private CountDownLatch latch;
+ private boolean wait;
+ private int node;
+
+ public ThreadSender(int msgStart, int msgEnd, int node, SimpleString id, CountDownLatch latch, boolean wait)
+ {
+ this.msgStart = msgStart;
+ this.msgEnd = msgEnd;
+ this.node = node;
+ this.id = id;
+ this.latch = latch;
+ this.wait = wait;
+ }
+
+ public void run()
+ {
+ if (wait)
+ {
+ try
+ {
+ latch.await(5, TimeUnit.SECONDS);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+ else
+ {
+ latch.countDown();
+ }
+ try
+ {
+ sendInRange(node, "queues.testaddress", msgStart, msgEnd, false, MessageImpl.HDR_GROUP_ID, id);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+ }
}
14 years, 7 months
JBoss hornetq SVN: r8109 - in branches/hornetq_grouping: src/main/org/hornetq/core/server/group/impl and 1 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-10-14 08:59:50 -0400 (Wed, 14 Oct 2009)
New Revision: 8109
Modified:
branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
Log:
timeout test
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2009-10-14 12:23:12 UTC (rev 8108)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2009-10-14 12:59:50 UTC (rev 8109)
@@ -495,7 +495,7 @@
}
else
{
- groupingHandler = new RemoteGroupingHandler(managementService, config.getName(), config.getAddress());
+ groupingHandler = new RemoteGroupingHandler(managementService, config.getName(), config.getAddress(), config.getTimeout());
}
log.info("deploying grouping handler: " + groupingHandler);
postOffice.setGroupingHandler(groupingHandler);
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 12:23:12 UTC (rev 8108)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 12:59:50 UTC (rev 8109)
@@ -48,15 +48,16 @@
private final Condition sendCondition = lock.newCondition();
- private int waitTime = 1000;
+ private final int timeout;
private HashMap<SimpleString, SimpleString> groupMap = new HashMap<SimpleString, SimpleString>();
- public RemoteGroupingHandler(final ManagementService managementService, final SimpleString name, final SimpleString address)
+ public RemoteGroupingHandler(final ManagementService managementService, final SimpleString name, final SimpleString address, int timeout)
{
this.name = name;
this.address = address;
this.managementService = managementService;
+ this.timeout = timeout;
}
public SimpleString getName()
@@ -86,7 +87,7 @@
props.putIntProperty(ManagementHelper.HDR_DISTANCE, 0);
Notification notification = new Notification(null, NotificationType.PROPOSAL, props);
managementService.sendNotification(notification);
- sendCondition.await(waitTime, TimeUnit.MILLISECONDS);
+ sendCondition.await(timeout, TimeUnit.MILLISECONDS);
response = responses.get(proposal.getProposalType());
}
finally
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 12:23:12 UTC (rev 8108)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 12:59:50 UTC (rev 8109)
@@ -29,7 +29,6 @@
import org.hornetq.core.client.ClientSession;
import org.hornetq.core.client.ClientSessionFactory;
import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
-import org.hornetq.core.client.impl.FailoverManagerImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
@@ -452,9 +451,13 @@
session.close();
}
-
protected void setUpGroupHandler(GroupingHandlerConfiguration.TYPE type, int node)
{
+ setUpGroupHandler(type, node, 5000);
+ }
+
+ protected void setUpGroupHandler(GroupingHandlerConfiguration.TYPE type, int node, int timeout)
+ {
GroupingHandler groupingHandler;
if(type == GroupingHandlerConfiguration.TYPE.LOCAL)
{
@@ -462,11 +465,16 @@
}
else
{
- groupingHandler = new RemoteGroupingHandler(servers[node].getManagementService(), new SimpleString("grouparbitrator"), new SimpleString("queues"));
+ groupingHandler = new RemoteGroupingHandler(servers[node].getManagementService(), new SimpleString("grouparbitrator"), new SimpleString("queues"), timeout);
}
this.servers[node].getPostOffice().setGroupingHandler(groupingHandler);
}
+ protected void setUpGroupHandler(GroupingHandler groupingHandler, int node)
+ {
+ this.servers[node].getPostOffice().setGroupingHandler(groupingHandler);
+ }
+
protected void send(int node, String address, int numMessages, boolean durable, String filterVal) throws Exception
{
sendInRange(node, address, 0, numMessages, durable, filterVal);
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 12:23:12 UTC (rev 8108)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 12:59:50 UTC (rev 8109)
@@ -14,7 +14,11 @@
import org.hornetq.core.message.impl.MessageImpl;
import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
+import org.hornetq.core.server.group.impl.Response;
+import org.hornetq.core.server.group.impl.Proposal;
+import org.hornetq.core.server.group.GroupingHandler;
import org.hornetq.core.exception.HornetQException;
+import org.hornetq.core.management.Notification;
import org.hornetq.utils.SimpleString;
/**
@@ -79,6 +83,100 @@
}
}
+ public void testGroupingTimeout() throws Exception
+ {
+ setupServer(0, isFileStorage(), isNetty());
+ setupServer(1, isFileStorage(), isNetty());
+ setupServer(2, isFileStorage(), isNetty());
+
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0, 2);
+
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 0, 1);
+
+ startServers(0, 1, 2);
+
+ try
+ {
+ setUpGroupHandler(new GroupingHandler()
+ {
+ public SimpleString getName()
+ {
+ return null;
+ }
+
+ public Response propose(Proposal proposal) throws Exception
+ {
+ return null;
+ }
+
+ public void proposed(Response response) throws Exception
+ {
+
+ }
+
+ public void send(Response response, int distance) throws Exception
+ {
+
+ }
+
+ public Response receive(Proposal proposal, int distance) throws Exception
+ {
+ return null;
+ }
+
+ public void onNotification(Notification notification)
+ {
+
+ }
+ }, 0);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 1, 1);
+ setUpGroupHandler(GroupingHandlerConfiguration.TYPE.REMOTE, 2, 1);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+
+ /*waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);*/
+
+ try
+ {
+ sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ fail("should timeout");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+
+
+ System.out.println("*****************************************************************************");
+ }
+ finally
+ {
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+
+ stopServers(0, 1, 2);
+ }
+ }
+
public void testGroupingSendTo2queues() throws Exception
{
setupServer(0, isFileStorage(), isNetty());
14 years, 7 months
JBoss hornetq SVN: r8108 - in branches/hornetq_grouping: src/main/org/hornetq/core/server/group and 2 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-10-14 08:23:12 -0400 (Wed, 14 Oct 2009)
New Revision: 8108
Modified:
branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Proposal.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Response.java
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
Log:
a few tweaks
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -698,6 +698,7 @@
public void setGroupingHandler(GroupingHandler groupingHandler)
{
groupingGroupingHandler = groupingHandler;
+ managementService.addNotificationListener(groupingGroupingHandler);
}
public GroupingHandler getGroupingHandler()
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -15,11 +15,13 @@
import org.hornetq.utils.SimpleString;
import org.hornetq.core.server.group.impl.Proposal;
import org.hornetq.core.server.group.impl.Response;
+import org.hornetq.core.management.NotificationListener;
+import org.hornetq.core.management.Notification;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
-public interface GroupingHandler
+public interface GroupingHandler extends NotificationListener
{
SimpleString getName();
@@ -30,4 +32,6 @@
void send(Response response, int distance) throws Exception;
Response receive(Proposal proposal, int distance) throws Exception;
+
+ void onNotification(Notification notification);
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -26,6 +26,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
+import java.util.HashMap;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -34,8 +35,10 @@
{
private static Logger log = Logger.getLogger(LocalGroupingHandler.class);
- private ConcurrentHashMap<SimpleString, Object> map = new ConcurrentHashMap<SimpleString, Object>();
+ private ConcurrentHashMap<SimpleString, SimpleString> map = new ConcurrentHashMap<SimpleString, SimpleString>();
+ private HashMap<SimpleString, SimpleString> groupMap = new HashMap<SimpleString, SimpleString>();
+
private final SimpleString name;
private final ManagementService managementService;
@@ -59,12 +62,13 @@
{
if(proposal.getProposal() == null)
{
- Object original = map.get(proposal.getProposalType());
+ SimpleString original = map.get(proposal.getProposalType());
return original == null?null:new Response(proposal.getProposalType(), original);
}
Response response = new Response(proposal.getProposalType(), proposal.getProposal());
if (map.putIfAbsent(response.getResponseType(), response.getChosen()) == null)
{
+ groupMap.put(response.getChosen(), response.getResponseType());
return response;
}
else
@@ -81,8 +85,8 @@
{
TypedProperties props = new TypedProperties();
props.putStringProperty(ManagementHelper.HDR_PROPOSAL_TYPE, response.getResponseType());
- props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, (SimpleString)response.getOriginal());
- props.putStringProperty(ManagementHelper.HDR_PROPOSAL_ALT_VALUE, (SimpleString)response.getAlternative());
+ props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, response.getOriginal());
+ props.putStringProperty(ManagementHelper.HDR_PROPOSAL_ALT_VALUE, response.getAlternative());
props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX);
props.putStringProperty(ManagementHelper.HDR_ADDRESS, address);
props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance);
@@ -94,5 +98,19 @@
{
return propose(proposal);
}
+
+ public void onNotification(Notification notification)
+ {
+ if(notification.getType() == NotificationType.BINDING_REMOVED)
+ {
+ SimpleString clusterName = (SimpleString) notification.getProperties().getProperty(ManagementHelper.HDR_CLUSTER_NAME);
+ SimpleString val = groupMap.get(clusterName);
+ if(val != null)
+ {
+ groupMap.remove(clusterName);
+ map.remove(val);
+ }
+ }
+ }
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Proposal.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Proposal.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Proposal.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -20,12 +20,12 @@
public class Proposal
{
private final SimpleString proposalType;
- private final Object proposal;
+ private final SimpleString proposal;
public static final String PROPOSAL_TYPE_HEADER = "_JBM_PROPOSAL_TYPE";
public static final String PROPOSAL_HEADER = "_JBM_PROPOSAL";
- public Proposal(SimpleString proposalType, Object proposal)
+ public Proposal(SimpleString proposalType, SimpleString proposal)
{
this.proposal = proposal;
this.proposalType = proposalType;
@@ -36,7 +36,7 @@
return proposalType;
}
- public Object getProposal()
+ public SimpleString getProposal()
{
return proposal;
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -50,6 +50,8 @@
private int waitTime = 1000;
+ private HashMap<SimpleString, SimpleString> groupMap = new HashMap<SimpleString, SimpleString>();
+
public RemoteGroupingHandler(final ManagementService managementService, final SimpleString name, final SimpleString address)
{
this.name = name;
@@ -78,7 +80,7 @@
lock.lock();
TypedProperties props = new TypedProperties();
props.putStringProperty(ManagementHelper.HDR_PROPOSAL_TYPE, proposal.getProposalType());
- props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, (SimpleString)proposal.getProposal());
+ props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, proposal.getProposal());
props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX);
props.putStringProperty(ManagementHelper.HDR_ADDRESS, address);
props.putIntProperty(ManagementHelper.HDR_DISTANCE, 0);
@@ -104,6 +106,7 @@
{
lock.lock();
responses.put(response.getResponseType(), response);
+ groupMap.put(response.getChosen(), response.getResponseType());
sendCondition.signal();
}
finally
@@ -116,7 +119,7 @@
{
TypedProperties props = new TypedProperties();
props.putStringProperty(ManagementHelper.HDR_PROPOSAL_TYPE, proposal.getProposalType());
- props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, (SimpleString)proposal.getProposal());
+ props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, proposal.getProposal());
props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX);
props.putStringProperty(ManagementHelper.HDR_ADDRESS, address);
props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance);
@@ -129,5 +132,18 @@
{
}
+ public void onNotification(Notification notification)
+ {
+ if(notification.getType() == NotificationType.BINDING_REMOVED)
+ {
+ SimpleString clusterName = (SimpleString) notification.getProperties().getProperty(ManagementHelper.HDR_CLUSTER_NAME);
+ SimpleString val = groupMap.get(clusterName);
+ if(val != null)
+ {
+ groupMap.remove(clusterName);
+ responses.remove(val);
+ }
+ }
+ }
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Response.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Response.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/Response.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -21,18 +21,18 @@
{
private final boolean accepted;
- private final Object original;
+ private final SimpleString original;
- private final Object alternative;
+ private final SimpleString alternative;
private SimpleString responseType;
- public Response(SimpleString responseType, Object original)
+ public Response(SimpleString responseType, SimpleString original)
{
this(responseType, original, null);
}
- public Response(SimpleString responseType, Object original, Object alternative)
+ public Response(SimpleString responseType, SimpleString original, SimpleString alternative)
{
this.responseType = responseType;
this.accepted = alternative == null;
@@ -45,17 +45,17 @@
return accepted;
}
- public Object getOriginal()
+ public SimpleString getOriginal()
{
return original;
}
- public Object getAlternative()
+ public SimpleString getAlternative()
{
return alternative;
}
- public Object getChosen()
+ public SimpleString getChosen()
{
return alternative != null?alternative:original;
}
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 10:45:21 UTC (rev 8107)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2009-10-14 12:23:12 UTC (rev 8108)
@@ -434,34 +434,24 @@
verifyReceiveAllInRange(20, 30, 0);
removeConsumer(0);
+ removeConsumer(1);
+ removeConsumer(2);
deleteQueue(0, "queue0");
- try
- {
- sendInRange(0, "queues.testaddress", 30, 31, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- fail("should throw exception");
- }
- catch (HornetQException e)
- {
- assertEquals(e.getCode(), HornetQException.QUEUE_DOES_NOT_EXIST);
- }
- try
- {
- sendInRange(1, "queues.testaddress", 31, 32, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- fail("should throw exception");
- }
- catch (HornetQException e)
- {
- assertEquals(e.getCode(), HornetQException.QUEUE_DOES_NOT_EXIST);
- }
- try
- {
- sendInRange(2, "queues.testaddress", 32, 33, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- fail("should throw exception");
- }
- catch (HornetQException e)
- {
- assertEquals(e.getCode(), HornetQException.QUEUE_DOES_NOT_EXIST);
- }
+ deleteQueue(1, "queue0");
+ deleteQueue(2, "queue0");
+ createQueue(0, "queues.testaddress", "queue1", null, false);
+ addConsumer(3, 0, "queue1", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, false);
+ waitForBindings(2, "queues.testaddress", 1, 1, false);
+
+ sendInRange(0, "queues.testaddress", 30, 40, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+
+ sendInRange(1, "queues.testaddress", 40, 50, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+
+ sendInRange(2, "queues.testaddress", 50, 60, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ verifyReceiveAllInRange(30, 50, 3);
System.out.println("*****************************************************************************");
}
finally
14 years, 7 months
JBoss hornetq SVN: r8107 - in branches/hornetq_grouping: examples/jms/clustered-grouping/server1 and 4 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-10-14 06:45:21 -0400 (Wed, 14 Oct 2009)
New Revision: 8107
Modified:
branches/hornetq_grouping/examples/jms/clustered-grouping/server1/hornetq-configuration.xml
branches/hornetq_grouping/examples/jms/clustered-grouping/server2/hornetq-configuration.xml
branches/hornetq_grouping/hornetq.ipr
branches/hornetq_grouping/src/config/common/schema/hornetq-configuration.xsd
branches/hornetq_grouping/src/main/org/hornetq/core/config/impl/FileConfiguration.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/GroupingHandlerConfiguration.java
Log:
added timeout
Modified: branches/hornetq_grouping/examples/jms/clustered-grouping/server1/hornetq-configuration.xml
===================================================================
--- branches/hornetq_grouping/examples/jms/clustered-grouping/server1/hornetq-configuration.xml 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/examples/jms/clustered-grouping/server1/hornetq-configuration.xml 2009-10-14 10:45:21 UTC (rev 8107)
@@ -51,6 +51,7 @@
<grouping-handler name="my-grouping-handler">
<type>REMOTE</type>
<address>jms</address>
+ <timeout>5000</timeout>
</grouping-handler>
<!-- Other config -->
Modified: branches/hornetq_grouping/examples/jms/clustered-grouping/server2/hornetq-configuration.xml
===================================================================
--- branches/hornetq_grouping/examples/jms/clustered-grouping/server2/hornetq-configuration.xml 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/examples/jms/clustered-grouping/server2/hornetq-configuration.xml 2009-10-14 10:45:21 UTC (rev 8107)
@@ -51,6 +51,7 @@
<grouping-handler name="my-grouping-handler">
<type>REMOTE</type>
<address>jms</address>
+ <timeout>5000</timeout>
</grouping-handler>
<!-- Other config -->
Modified: branches/hornetq_grouping/hornetq.ipr
===================================================================
--- branches/hornetq_grouping/hornetq.ipr 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/hornetq.ipr 2009-10-14 10:45:21 UTC (rev 8107)
@@ -254,6 +254,14 @@
<maximumStackSize value="32" />
<properties />
</buildFile>
+ <buildFile url="file://$PROJECT_DIR$/examples/jms/clustered-grouping/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <maximumStackSize value="32" />
+ <properties />
+ </buildFile>
</component>
<component name="BuildJarProjectSettings">
<option name="BUILD_JARS_ON_MAKE" value="false" />
Modified: branches/hornetq_grouping/src/config/common/schema/hornetq-configuration.xsd
===================================================================
--- branches/hornetq_grouping/src/config/common/schema/hornetq-configuration.xsd 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/src/config/common/schema/hornetq-configuration.xsd 2009-10-14 10:45:21 UTC (rev 8107)
@@ -397,6 +397,7 @@
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="type" type="groupingHandlerTypeType"/>
<xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="timeout" type="xsd:int"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/config/impl/FileConfiguration.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2009-10-14 10:45:21 UTC (rev 8107)
@@ -581,10 +581,12 @@
String name = node.getAttribute("name");
String type = getString(node, "type", null, NOT_NULL_OR_EMPTY);
String address = getString(node, "address",null, NOT_NULL_OR_EMPTY);
+ Integer timeout = getInteger(node, "timeout", GroupingHandlerConfiguration.DEFAULT_TIMEOUT, GT_ZERO);
GroupingHandlerConfiguration arbitratorConfiguration =
new GroupingHandlerConfiguration(new SimpleString(name),
type.equals(GroupingHandlerConfiguration.TYPE.LOCAL.getType())? GroupingHandlerConfiguration.TYPE.LOCAL: GroupingHandlerConfiguration.TYPE.REMOTE,
- new SimpleString(address));
+ new SimpleString(address),
+ timeout);
System.out.println("arbitratorConfiguration = " + arbitratorConfiguration);
groupingHandlerConfiguration.add(arbitratorConfiguration);
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/GroupingHandlerConfiguration.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/GroupingHandlerConfiguration.java 2009-10-14 10:27:45 UTC (rev 8106)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/GroupingHandlerConfiguration.java 2009-10-14 10:45:21 UTC (rev 8107)
@@ -25,11 +25,21 @@
private final SimpleString address;
+ private final int timeout;
+
+ public static final int DEFAULT_TIMEOUT = 5000;
+
public GroupingHandlerConfiguration(final SimpleString name, final TYPE type, SimpleString address)
{
+ this(name, type, address, DEFAULT_TIMEOUT);
+ }
+
+ public GroupingHandlerConfiguration(final SimpleString name, final TYPE type, SimpleString address, int timeout)
+ {
this.type = type;
this.name = name;
this.address = address;
+ this.timeout = timeout;
}
public SimpleString getName()
@@ -47,6 +57,11 @@
return address;
}
+ public int getTimeout()
+ {
+ return timeout;
+ }
+
public enum TYPE
{
LOCAL("LOCAL"),
14 years, 7 months
JBoss hornetq SVN: r8106 - in branches/hornetq_grouping: src/main/org/hornetq/core/server/cluster/impl and 3 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-10-14 06:27:45 -0400 (Wed, 14 Oct 2009)
New Revision: 8106
Modified:
branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/BindingsImpl.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java
branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
fixes
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/BindingsImpl.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/BindingsImpl.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/postoffice/impl/BindingsImpl.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -462,12 +462,12 @@
resp = groupingGroupingHandler.propose(new Proposal(fullID, chosen.getClusterName()));
- if (!resp.getChosen().equals(chosen.getClusterName()))
+ if (resp.getAlternative() != null)
{
chosen = null;
for (Binding binding : bindings)
{
- if (binding.getClusterName().equals(resp.getChosen()))
+ if (binding.getClusterName().equals(resp.getAlternative()))
{
chosen = binding;
break;
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -491,7 +491,7 @@
GroupingHandler groupingHandler;
if (config.getType() == GroupingHandlerConfiguration.TYPE.LOCAL)
{
- groupingHandler = new LocalGroupingHandler(managementService, config.getName(), config.getAddress(), scheduledExecutor);
+ groupingHandler = new LocalGroupingHandler(managementService, config.getName(), config.getAddress());
}
else
{
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/GroupingHandler.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -30,6 +30,4 @@
void send(Response response, int distance) throws Exception;
Response receive(Proposal proposal, int distance) throws Exception;
-
- Response rePropose(Proposal proposal) throws Exception;
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/LocalGroupingHandler.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -42,16 +42,11 @@
private SimpleString address;
- private ScheduledExecutorService scheduledExecutor;
-
- private ConcurrentHashSet<SimpleString> reProposals = new ConcurrentHashSet<SimpleString>();
-
- public LocalGroupingHandler(final ManagementService managementService, final SimpleString name, final SimpleString address, ScheduledExecutorService scheduledExecutor)
+ public LocalGroupingHandler(final ManagementService managementService, final SimpleString name, final SimpleString address)
{
this.managementService = managementService;
this.name = name;
this.address = address;
- this.scheduledExecutor = scheduledExecutor;
}
public SimpleString getName()
@@ -84,7 +79,6 @@
public void send(Response response, int distance) throws Exception
{
- Object value = response.getAlternative() != null ? response.getAlternative() : response.getOriginal();
TypedProperties props = new TypedProperties();
props.putStringProperty(ManagementHelper.HDR_PROPOSAL_TYPE, response.getResponseType());
props.putStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, (SimpleString)response.getOriginal());
@@ -100,27 +94,5 @@
{
return propose(proposal);
}
-
- public Response rePropose(final Proposal proposal) throws Exception
- {
- if(reProposals.addIfAbsent(proposal.getProposalType()))
- {
- Response response = new Response(proposal.getProposalType(), proposal.getProposal());
- map.replace(proposal.getProposalType(), response);
- send(response, 0);
- scheduledExecutor.schedule(new Runnable()
- {
- public void run()
- {
- reProposals.remove(proposal.getProposalType());
- }
- }, 2000, TimeUnit.MILLISECONDS);
- return response;
- }
- else
- {
- return new Response(proposal.getProposalType(), map.get(proposal.getProposalType()));
- }
- }
}
Modified: branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java
===================================================================
--- branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/src/main/org/hornetq/core/server/group/impl/RemoteGroupingHandler.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -100,7 +100,6 @@
public void proposed(Response response) throws Exception
{
- Object value = response.getAlternative() != null ? response.getAlternative() : response.getOriginal();
try
{
lock.lock();
@@ -130,10 +129,5 @@
{
}
- public Response rePropose(Proposal proposal)
- {
- return null;
- }
-
}
Modified: branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 10:13:49 UTC (rev 8105)
+++ branches/hornetq_grouping/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-10-14 10:27:45 UTC (rev 8106)
@@ -458,7 +458,7 @@
GroupingHandler groupingHandler;
if(type == GroupingHandlerConfiguration.TYPE.LOCAL)
{
- groupingHandler = new LocalGroupingHandler(servers[node].getManagementService(), new SimpleString("grouparbitrator"), new SimpleString("queues"), null);
+ groupingHandler = new LocalGroupingHandler(servers[node].getManagementService(), new SimpleString("grouparbitrator"), new SimpleString("queues"));
}
else
{
14 years, 7 months