You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/07/29 23:22:09 UTC
[03/24] activemq-artemis git commit: Continuing work on ARTEMIS-178
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/static-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/pom.xml b/examples/jms/static-selector/pom.xml
index cf08771..54881c9 100644
--- a/examples/jms/static-selector/pom.xml
+++ b/examples/jms/static-selector/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -61,9 +56,18 @@ under the License.
<goals>
<goal>create</goal>
</goals>
+ </execution>
+ <execution>
+ <id>start</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
<configuration>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <spawn>true</spawn>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
</configuration>
</execution>
<execution>
@@ -73,8 +77,16 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StaticSelectorExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
<args>
- <param>${basedir}/target/server0</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java b/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java
index b844994..532ca50 100644
--- a/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java
+++ b/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java
@@ -27,24 +27,16 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
-
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* A simple JMS example that shows how static message selectors work.
*/
-public class StaticSelectorExample extends ActiveMQExample
+public class StaticSelectorExample
{
- private volatile boolean result = true;
-
- public static void main(final String[] args)
- {
- new StaticSelectorExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
+ AtomicBoolean result = new AtomicBoolean(true);
Connection connection = null;
InitialContext initialContext = null;
try
@@ -73,7 +65,7 @@ public class StaticSelectorExample extends ActiveMQExample
// Step 8. Create a JMS Message Consumer that receives 'red' messages
MessageConsumer redConsumer = session.createConsumer(queue);
- redConsumer.setMessageListener(new SimpleMessageListener("red"));
+ redConsumer.setMessageListener(new SimpleMessageListener("red", result));
// Step 9. Create five messages with different 'color' properties
TextMessage redMessage1 = session.createTextMessage("Red-1");
@@ -101,7 +93,8 @@ public class StaticSelectorExample extends ActiveMQExample
// Step 11. Waiting for the message listener to check the received messages.
Thread.sleep(5000);
- return result;
+ if (!result.get())
+ throw new IllegalStateException();
}
finally
{
@@ -116,38 +109,40 @@ public class StaticSelectorExample extends ActiveMQExample
}
}
}
+}
- public class SimpleMessageListener implements MessageListener
- {
- private final String name;
- public SimpleMessageListener(final String listener)
- {
- name = listener;
- }
+class SimpleMessageListener implements MessageListener
+{
+ private final String name;
+ private AtomicBoolean result;
- public void onMessage(final Message msg)
+ public SimpleMessageListener(final String listener, AtomicBoolean result)
+ {
+ name = listener;
+ this.result = result;
+ }
+
+ public void onMessage(final Message msg)
+ {
+ TextMessage textMessage = (TextMessage)msg;
+ try
{
- TextMessage textMessage = (TextMessage)msg;
- try
+ String colorProp = msg.getStringProperty("color");
+ System.out.println("Receiver " + name +
+ " receives message [" +
+ textMessage.getText() +
+ "] with color property: " +
+ colorProp);
+ if (colorProp != null && !colorProp.equals(name))
{
- String colorProp = msg.getStringProperty("color");
- System.out.println("Receiver " + name +
- " receives message [" +
- textMessage.getText() +
- "] with color property: " +
- colorProp);
- if (colorProp != null && !colorProp.equals(name))
- {
- result = false;
- }
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- result = false;
+ result.set(false);
}
}
+ catch (JMSException e)
+ {
+ e.printStackTrace();
+ result.set(false);
+ }
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp-websockets/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/pom.xml b/examples/jms/stomp-websockets/pom.xml
index d64b66d..64c3ced 100644
--- a/examples/jms/stomp-websockets/pom.xml
+++ b/examples/jms/stomp-websockets/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -61,9 +56,18 @@ under the License.
<goals>
<goal>create</goal>
</goals>
+ </execution>
+ <execution>
+ <id>start</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
<configuration>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <spawn>true</spawn>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
</configuration>
</execution>
<execution>
@@ -73,8 +77,16 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StompWebSocketExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
<args>
- <param>${basedir}/target/server0</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/artemis/jms/example/StompWebSocketExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/artemis/jms/example/StompWebSocketExample.java b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/artemis/jms/example/StompWebSocketExample.java
index fcaa63a..7260a09 100644
--- a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/artemis/jms/example/StompWebSocketExample.java
+++ b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/artemis/jms/example/StompWebSocketExample.java
@@ -27,21 +27,13 @@ import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.naming.InitialContext;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
/**
* An example where a client will send a JMS message to a Topic.
* Browser clients connected using Web Sockets will be able to receive the message.
*/
-public class StompWebSocketExample extends ActiveMQExample
+public class StompWebSocketExample
{
- public static void main(final String[] args)
- {
- new StompWebSocketExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
Connection connection = null;
InitialContext initialContext = null;
@@ -70,8 +62,6 @@ public class StompWebSocketExample extends ActiveMQExample
message = (TextMessage)consumer.receive();
System.out.println("Received message: " + message.getText());
-
- return true;
}
finally
{
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp-websockets/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/broker.xml b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/broker.xml
index ce256a9..efceecf 100644
--- a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
<core xmlns="urn:activemq:core">
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+ <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir:./data}/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:./data}/paging</paging-directory>
<!-- Acceptors -->
<acceptors>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/pom.xml b/examples/jms/stomp/pom.xml
index 809e433..867827d 100644
--- a/examples/jms/stomp/pom.xml
+++ b/examples/jms/stomp/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -61,9 +56,18 @@ under the License.
<goals>
<goal>create</goal>
</goals>
+ </execution>
+ <execution>
+ <id>start</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
<configuration>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <spawn>true</spawn>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
</configuration>
</execution>
<execution>
@@ -73,8 +77,16 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
<args>
- <param>${basedir}/target/server0</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java b/examples/jms/stomp/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
index bf10f6f..0d4f28f 100644
--- a/examples/jms/stomp/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
+++ b/examples/jms/stomp/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
@@ -29,24 +29,15 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
-
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
/**
* An example where a client will send a Stomp message on a TCP socket
* and consume it from a JMS MessageConsumer.
*/
-public class StompExample extends ActiveMQExample
+public class StompExample
{
private static final String END_OF_FRAME = "\u0000";
- public static void main(final String[] args)
- {
- new StompExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
Connection connection = null;
InitialContext initialContext = null;
@@ -58,11 +49,11 @@ public class StompExample extends ActiveMQExample
// Step 2. Send a CONNECT frame to connect to the server
String connectFrame = "CONNECT\n" +
- "login: guest\n" +
- "passcode: guest\n" +
- "request-id: 1\n" +
- "\n" +
- END_OF_FRAME;
+ "login: guest\n" +
+ "passcode: guest\n" +
+ "request-id: 1\n" +
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, connectFrame);
readFrame(socket);
@@ -71,17 +62,17 @@ public class StompExample extends ActiveMQExample
// jms.queue.exampleQueue address with a text body
String text = "Hello, world from Stomp!";
String message = "SEND\n" +
- "destination: jms.queue.exampleQueue\n" +
- "\n" +
- text +
- END_OF_FRAME;
+ "destination: jms.queue.exampleQueue\n" +
+ "\n" +
+ text +
+ END_OF_FRAME;
sendFrame(socket, message);
System.out.println("Sent Stomp message: " + text);
// Step 4. Send a DISCONNECT frame to disconnect from the server
String disconnectFrame = "DISCONNECT\n" +
- "\n" +
- END_OF_FRAME;
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, disconnectFrame);
// Step 5. Slose the TCP socket
@@ -107,8 +98,6 @@ public class StompExample extends ActiveMQExample
// Step 10. Receive the message
TextMessage messageReceived = (TextMessage)consumer.receive(5000);
System.out.println("Received JMS message: " + messageReceived.getText());
-
- return true;
}
finally
{
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/activemq/server0/broker.xml b/examples/jms/stomp/src/main/resources/activemq/server0/broker.xml
index b24f1da..c0ada1e 100644
--- a/examples/jms/stomp/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/stomp/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
<core xmlns="urn:activemq:core">
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+ <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir:../data}/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:../data}/paging</paging-directory>
<!-- Acceptors -->
<acceptors>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/pom.xml b/examples/jms/stomp1.1/pom.xml
index 14e9a76..b17e9c0 100644
--- a/examples/jms/stomp1.1/pom.xml
+++ b/examples/jms/stomp1.1/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -61,9 +56,18 @@ under the License.
<goals>
<goal>create</goal>
</goals>
+ </execution>
+ <execution>
+ <id>start</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
<configuration>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <spawn>true</spawn>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
</configuration>
</execution>
<execution>
@@ -73,8 +77,16 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
<args>
- <param>${basedir}/target/server0</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.1/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
index ee03b85..7d3b3cc 100644
--- a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
+++ b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
@@ -29,23 +29,15 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
/**
* An example where a Stomp 1.1 client sends a message on a TCP socket
* and consumes it from a JMS MessageConsumer.
*/
-public class StompExample extends ActiveMQExample
+public class StompExample
{
private static final String END_OF_FRAME = "\u0000";
- public static void main(final String[] args)
- {
- new StompExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
Connection connection = null;
InitialContext initialContext = null;
@@ -57,13 +49,13 @@ public class StompExample extends ActiveMQExample
// Step 2. Send a CONNECT frame to connect to the server
String connectFrame = "CONNECT\n" +
- "accept-version:1.1\n" +
- "host:localhost\n" +
- "login:guest\n" +
- "passcode:guest\n" +
- "request-id:1\n" +
- "\n" +
- END_OF_FRAME;
+ "accept-version:1.1\n" +
+ "host:localhost\n" +
+ "login:guest\n" +
+ "passcode:guest\n" +
+ "request-id:1\n" +
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, connectFrame);
String response = receiveFrame(socket);
@@ -73,17 +65,17 @@ public class StompExample extends ActiveMQExample
// jms.queue.exampleQueue address with a text body
String text = "Hello World from Stomp 1.1 !";
String message = "SEND\n" +
- "destination:jms.queue.exampleQueue\n" +
- "\n" +
- text +
- END_OF_FRAME;
+ "destination:jms.queue.exampleQueue\n" +
+ "\n" +
+ text +
+ END_OF_FRAME;
sendFrame(socket, message);
System.out.println("Sent Stomp message: " + text);
// Step 4. Send a DISCONNECT frame to disconnect from the server
String disconnectFrame = "DISCONNECT\n" +
- "\n" +
- END_OF_FRAME;
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, disconnectFrame);
// Step 5. Slose the TCP socket
@@ -109,8 +101,6 @@ public class StompExample extends ActiveMQExample
// Step 10. Receive the message
TextMessage messageReceived = (TextMessage)consumer.receive(5000);
System.out.println("Received JMS message: " + messageReceived.getText());
-
- return true;
}
finally
{
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp1.1/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml b/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml
index b24f1da..9688ae9 100644
--- a/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
<core xmlns="urn:activemq:core">
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+ <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir:./data}/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:./data}/paging</paging-directory>
<!-- Acceptors -->
<acceptors>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/pom.xml b/examples/jms/stomp1.2/pom.xml
index c696d8b..e673181 100644
--- a/examples/jms/stomp1.2/pom.xml
+++ b/examples/jms/stomp1.2/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -61,9 +56,18 @@ under the License.
<goals>
<goal>create</goal>
</goals>
+ </execution>
+ <execution>
+ <id>start</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
<configuration>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <spawn>true</spawn>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
</configuration>
</execution>
<execution>
@@ -73,8 +77,16 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
<args>
- <param>${basedir}/target/server0</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.2/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
index f3a0ad7..fc978f7 100644
--- a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
+++ b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/artemis/jms/example/StompExample.java
@@ -28,23 +28,15 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
/**
* An example where a Stomp 1.2 client sends a message on a TCP socket
* and consumes it from a JMS MessageConsumer.
*/
-public class StompExample extends ActiveMQExample
+public class StompExample
{
private static final String END_OF_FRAME = "\u0000";
- public static void main(final String[] args)
- {
- new StompExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
Connection connection = null;
InitialContext initialContext = null;
@@ -56,13 +48,13 @@ public class StompExample extends ActiveMQExample
// Step 2. Send a CONNECT frame to connect to the server
String connectFrame = "CONNECT\n" +
- "accept-version:1.2\n" +
- "host:localhost\n" +
- "login:guest\n" +
- "passcode:guest\n" +
- "request-id:1\n" +
- "\n" +
- END_OF_FRAME;
+ "accept-version:1.2\n" +
+ "host:localhost\n" +
+ "login:guest\n" +
+ "passcode:guest\n" +
+ "request-id:1\n" +
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, connectFrame);
String response = receiveFrame(socket);
@@ -72,17 +64,17 @@ public class StompExample extends ActiveMQExample
// jms.queue.exampleQueue address with a text body
String text = "Hello World from Stomp 1.2 !";
String message = "SEND\n" +
- "destination:jms.queue.exampleQueue\n" +
- "\n" +
- text +
- END_OF_FRAME;
+ "destination:jms.queue.exampleQueue\n" +
+ "\n" +
+ text +
+ END_OF_FRAME;
sendFrame(socket, message);
System.out.println("Sent Stomp message: " + text);
// Step 4. Send a DISCONNECT frame to disconnect from the server
String disconnectFrame = "DISCONNECT\n" +
- "\n" +
- END_OF_FRAME;
+ "\n" +
+ END_OF_FRAME;
sendFrame(socket, disconnectFrame);
// Step 5. Slose the TCP socket
@@ -108,8 +100,6 @@ public class StompExample extends ActiveMQExample
// Step 10. Receive the message
TextMessage messageReceived = (TextMessage)consumer.receive(5000);
System.out.println("Received JMS message: " + messageReceived.getText());
-
- return true;
}
finally
{
@@ -147,7 +137,5 @@ public class StompExample extends ActiveMQExample
String frame = new String(data, "UTF-8");
return frame;
-
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stomp1.2/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stomp1.2/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/broker.xml b/examples/jms/stomp1.2/src/main/resources/activemq/server0/broker.xml
index b24f1da..9688ae9 100644
--- a/examples/jms/stomp1.2/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/stomp1.2/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
<core xmlns="urn:activemq:core">
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+ <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir:./data}/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:./data}/paging</paging-directory>
<!-- Acceptors -->
<acceptors>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/pom.xml b/examples/jms/stop-server-failover/pom.xml
index e1ebe90..2ba5e69 100644
--- a/examples/jms/stop-server-failover/pom.xml
+++ b/examples/jms/stop-server-failover/pom.xml
@@ -37,11 +37,6 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</dependency>
@@ -57,25 +52,59 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>create</id>
+ <id>create0</id>
<goals>
<goal>create</goal>
</goals>
<configuration>
<instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
- <javaOptions>-Dudp-address=${udp-address}</javaOptions>
+ <sharedStore>true</sharedStore>
+ <slave>false</slave>
+ <dataFolder>../data</dataFolder>
+ <failoverOnShutdown>true</failoverOnShutdown>
</configuration>
</execution>
<execution>
- <id>create2</id>
+ <id>create1</id>
<goals>
<goal>create</goal>
</goals>
<configuration>
<instance>${basedir}/target/server1</instance>
- <configuration>${basedir}/target/classes/activemq/server1</configuration>
- <javaOptions>-Dudp-address=${udp-address}</javaOptions>
+ <sharedStore>true</sharedStore>
+ <slave>true</slave>
+ <dataFolder>../data</dataFolder>
+ <failoverOnShutdown>true</failoverOnShutdown>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start0</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server0</location>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server0</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start1</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server1</location>
+ <testURI>tcp://localhost:61617</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server1</name>
</configuration>
</execution>
<execution>
@@ -85,9 +114,29 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.StopServerFailoverExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop0</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server0</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop1</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server1</location>
<args>
- <param>${basedir}/target/server0</param>
- <param>${basedir}/target/server1</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/artemis/jms/example/StopServerFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/artemis/jms/example/StopServerFailoverExample.java b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/artemis/jms/example/StopServerFailoverExample.java
index 7f170f6..01ee51b 100644
--- a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/artemis/jms/example/StopServerFailoverExample.java
+++ b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/artemis/jms/example/StopServerFailoverExample.java
@@ -16,8 +16,6 @@
*/
package org.apache.activemq.artemis.jms.example;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
@@ -32,15 +30,9 @@ import javax.naming.InitialContext;
* A simple example that demonstrates failover of the JMS connection from one node to another
* when the live server crashes using a JMS <em>non-transacted</em> session.
*/
-public class StopServerFailoverExample extends ActiveMQExample
+public class StopServerFailoverExample
{
- public static void main(final String[] args)
- {
- new StopServerFailoverExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
final int numMessages = 10;
@@ -94,10 +86,9 @@ public class StopServerFailoverExample extends ActiveMQExample
System.out.println("Got message: " + message0.getText());
}
- // Step 10. Crash server #1, the live server, and wait a little while to make sure
+ // Step 10. Crash server #0, the live server, and wait a little while to make sure
// it has really crashed
- Thread.sleep(5000);
- System.out.println("stop the server by logging into jconsole");
+ System.out.println("Stop the live server by logging into JConsole and then press any key to continue...");
System.in.read();
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
@@ -118,8 +109,6 @@ public class StopServerFailoverExample extends ActiveMQExample
System.out.printf("Got message: %s (redelivered?: %s)\n", message0.getText(), message0.getJMSRedelivered());
}
message0.acknowledge();
-
- return true;
}
finally
{
@@ -136,5 +125,4 @@ public class StopServerFailoverExample extends ActiveMQExample
}
}
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/stop-server-failover/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 6ea24c1..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF 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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:activemq"
- xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
- <jms xmlns="urn:activemq:jms">
- <!--the queue used by the example-->
- <queue name="exampleQueue"/>
- </jms>
-
- <core xmlns="urn:activemq:core">
-
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
-
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
-
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
-
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
-
- <ha-policy>
- <shared-store>
- <master/>
- </shared-store>
- </ha-policy>
-
- <!-- Connectors -->
- <connectors>
- <connector name="netty-connector">tcp://localhost:61616</connector>
- </connectors>
-
- <!-- Acceptors -->
- <acceptors>
- <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
- </acceptors>
-
- <broadcast-groups>
- <broadcast-group name="bg-group1">
- <group-address>${udp-address:231.7.7.7}</group-address>
- <group-port>9876</group-port>
- <broadcast-period>1000</broadcast-period>
- <connector-ref>netty-connector</connector-ref>
- </broadcast-group>
- </broadcast-groups>
-
- <discovery-groups>
- <discovery-group name="dg-group1">
- <group-address>${udp-address:231.7.7.7}</group-address>
- <group-port>9876</group-port>
- <refresh-timeout>60000</refresh-timeout>
- </discovery-group>
- </discovery-groups>
-
- <cluster-connections>
- <cluster-connection name="my-cluster">
- <address>jms</address>
- <connector-ref>netty-connector</connector-ref>
- <discovery-group-ref discovery-group-name="dg-group1"/>
- </cluster-connection>
- </cluster-connections>
-
- <security-settings>
- <!--security for example queue-->
- <security-setting match="jms.queue.exampleQueue">
- <permission type="createDurableQueue" roles="guest"/>
- <permission type="deleteDurableQueue" roles="guest"/>
- <permission type="createNonDurableQueue" roles="guest"/>
- <permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
- </security-setting>
- </security-settings>
-
- </core>
-</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/stop-server-failover/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/stop-server-failover/src/main/resources/activemq/server1/broker.xml
deleted file mode 100644
index da69fce..0000000
--- a/examples/jms/stop-server-failover/src/main/resources/activemq/server1/broker.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF 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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:activemq"
- xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
- <jms xmlns="urn:activemq:jms">
- <!--the queue used by the example-->
- <queue name="exampleQueue"/>
- </jms>
-
- <core xmlns="urn:activemq:core">
-
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
-
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
-
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
-
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
-
- <ha-policy>
- <shared-store>
- <slave/>
- </shared-store>
- </ha-policy>
-
- <!-- Connectors -->
- <connectors>
- <connector name="netty-connector">tcp://localhost:61617</connector>
- </connectors>
-
- <!-- Acceptors -->
- <acceptors>
- <acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
- </acceptors>
-
- <broadcast-groups>
- <broadcast-group name="bg-group1">
- <group-address>${udp-address:231.7.7.7}</group-address>
- <group-port>9876</group-port>
- <broadcast-period>1000</broadcast-period>
- <connector-ref>netty-connector</connector-ref>
- </broadcast-group>
- </broadcast-groups>
-
- <discovery-groups>
- <discovery-group name="dg-group1">
- <group-address>${udp-address:231.7.7.7}</group-address>
- <group-port>9876</group-port>
- <refresh-timeout>60000</refresh-timeout>
- </discovery-group>
- </discovery-groups>
-
- <cluster-connections>
- <cluster-connection name="my-cluster">
- <address>jms</address>
- <connector-ref>netty-connector</connector-ref>
- <discovery-group-ref discovery-group-name="dg-group1"/>
- </cluster-connection>
- </cluster-connections>
-
- <security-settings>
- <!--security for example queue-->
- <security-setting match="jms.queue.exampleQueue">
- <permission type="createDurableQueue" roles="guest"/>
- <permission type="deleteDurableQueue" roles="guest"/>
- <permission type="createNonDurableQueue" roles="guest"/>
- <permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
- </security-setting>
- </security-settings>
-
- </core>
-</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/pom.xml b/examples/jms/symmetric-cluster/pom.xml
index a7d35f7..d6ed189 100644
--- a/examples/jms/symmetric-cluster/pom.xml
+++ b/examples/jms/symmetric-cluster/pom.xml
@@ -37,8 +37,8 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>common</artifactId>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-jms-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -57,7 +57,7 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>create</id>
+ <id>create0</id>
<goals>
<goal>create</goal>
</goals>
@@ -122,7 +122,96 @@ under the License.
<javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
-
+ <execution>
+ <id>start0</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server0</location>
+ <testURI>tcp://localhost:61616</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server0</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start1</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server1</location>
+ <testURI>tcp://localhost:61617</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server1</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start2</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server2</location>
+ <testURI>tcp://localhost:61618</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server2</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start3</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server3</location>
+ <testURI>tcp://localhost:61619</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server3</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start4</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server4</location>
+ <testURI>tcp://localhost:61620</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server4</name>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start5</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <spawn>true</spawn>
+ <location>${basedir}/target/server5</location>
+ <testURI>tcp://localhost:61621</testURI>
+ <args>
+ <param>run</param>
+ </args>
+ <name>server5</name>
+ </configuration>
+ </execution>
<execution>
<id>runClient</id>
<goals>
@@ -130,13 +219,77 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.SymmetricClusterExample</clientClass>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop0</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server0</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop1</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server1</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop2</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server2</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop3</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server3</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop4</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server4</location>
+ <args>
+ <param>stop</param>
+ </args>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop5</id>
+ <goals>
+ <goal>cli</goal>
+ </goals>
+ <configuration>
+ <location>${basedir}/target/server5</location>
<args>
- <param>${basedir}/target/server0</param>
- <param>${basedir}/target/server1</param>
- <param>${basedir}/target/server2</param>
- <param>${basedir}/target/server3</param>
- <param>${basedir}/target/server4</param>
- <param>${basedir}/target/server5</param>
+ <param>stop</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
index 24e75f0..e332f04 100644
--- a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
+++ b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
@@ -29,7 +29,6 @@ import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
import org.apache.activemq.artemis.api.jms.JMSFactoryType;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
/**
* This example demonstrates a cluster of three nodes set up in a symmetric topology - i.e. each
@@ -48,15 +47,9 @@ import org.apache.activemq.artemis.common.example.ActiveMQExample;
* <p>
* Please see the readme.html file for more information.
*/
-public class SymmetricClusterExample extends ActiveMQExample
+public class SymmetricClusterExample
{
- public static void main(final String[] args)
- {
- new SymmetricClusterExample().run(args);
- }
-
- @Override
- public boolean runExample() throws Exception
+ public static void main(final String[] args) throws Exception
{
Connection connection0 = null;
@@ -180,53 +173,51 @@ public class SymmetricClusterExample extends ActiveMQExample
if (received0 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received1 = (TextMessage)subscriber1.receive(5000);
if (received1 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received2 = (TextMessage)subscriber2.receive(5000);
if (received2 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received3 = (TextMessage)subscriber3.receive(5000);
if (received3 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received4 = (TextMessage)subscriber4.receive(5000);
if (received4 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received5 = (TextMessage)subscriber5.receive(5000);
if (received5 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
TextMessage received6 = (TextMessage)consumer0.receive(5000);
if (received6 == null)
{
- return false;
+ throw new IllegalStateException("Message is null!");
}
}
-
- return true;
}
finally
{
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
index 27b7489..9c672d7 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
@@ -30,14 +30,13 @@ under the License.
<core xmlns="urn:activemq:core">
+ <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
- <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+ <journal-directory>${data.dir:./data}/journal</journal-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
-
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:./data}/paging</paging-directory>
<!-- Connectors -->
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF 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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
index 16a7931..f02759b 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
@@ -30,14 +30,13 @@ under the License.
<core xmlns="urn:activemq:core">
+ <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
- <bindings-directory>${data.dir}/server1/data/messaging/bindings</bindings-directory>
+ <journal-directory>${data.dir:./data}/journal</journal-directory>
- <journal-directory>${data.dir}/server1/data/messaging/journal</journal-directory>
+ <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
- <large-messages-directory>${data.dir}/server1/data/messaging/largemessages</large-messages-directory>
-
- <paging-directory>${data.dir}/server1/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir:./data}/paging</paging-directory>
<!-- Connectors -->