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:22 UTC
[16/24] activemq-artemis git commit: ARTEMIS-178 Refactor examples to
use CLI
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue-message-redistribution/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/pom.xml b/examples/jms/queue-message-redistribution/pom.xml
index f8448d6..c54657c 100644
--- a/examples/jms/queue-message-redistribution/pom.xml
+++ b/examples/jms/queue-message-redistribution/pom.xml
@@ -57,42 +57,23 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
</configuration>
</execution>
<execution>
@@ -103,33 +84,9 @@ under the License.
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.QueueMessageRedistributionExample</clientClass>
<args>
- <param>tcp://localhost:61616</param>
- <param>tcp://localhost:61617</param>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
</args>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
</configuration>
</execution>
</executions>
@@ -139,46 +96,7 @@ under the License.
<artifactId>artemis-jms-queue-message-redistribution-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/artemis/jms/example/QueueMessageRedistributionExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/artemis/jms/example/QueueMessageRedistributionExample.java b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/artemis/jms/example/QueueMessageRedistributionExample.java
index fc5ef2c..a1d0a8f 100644
--- a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/artemis/jms/example/QueueMessageRedistributionExample.java
+++ b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/artemis/jms/example/QueueMessageRedistributionExample.java
@@ -16,8 +16,6 @@
*/
package org.apache.activemq.artemis.jms.example;
-import java.util.Hashtable;
-
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageConsumer;
@@ -26,6 +24,7 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
+import java.util.Hashtable;
import org.apache.activemq.artemis.common.example.ActiveMQExample;
@@ -58,7 +57,7 @@ public class QueueMessageRedistributionExample extends ActiveMQExample
// Step 1. Get an initial context for looking up JNDI from server 0
Hashtable<String, Object> properties = new Hashtable<String, Object>();
properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
- properties.put("connectionFactory.ConnectionFactory", args[0]);
+ properties.put("connectionFactory.ConnectionFactory", DEFAULT_TCP1);
properties.put("queue.queue/exampleQueue", "exampleQueue");
ic0 = new InitialContext(properties);
@@ -71,7 +70,7 @@ public class QueueMessageRedistributionExample extends ActiveMQExample
// Step 4. Get an initial context for looking up JNDI from server 1
properties = new Hashtable<String, Object>();
properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
- properties.put("connectionFactory.ConnectionFactory", args[1]);
+ properties.put("connectionFactory.ConnectionFactory", DEFAULT_TCP2);
ic1 = new InitialContext(properties);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue-message-redistribution/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/b3af4bb7/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/queue-message-redistribution/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue-message-redistribution/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/b3af4bb7/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue-message-redistribution/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/b3af4bb7/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/queue-message-redistribution/src/main/resources/activemq/server1/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue-message-redistribution/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/b3af4bb7/examples/jms/queue-requestor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-requestor/pom.xml b/examples/jms/queue-requestor/pom.xml
index 9ab5b2d..893aef7 100644
--- a/examples/jms/queue-requestor/pom.xml
+++ b/examples/jms/queue-requestor/pom.xml
@@ -57,17 +57,13 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
@@ -77,14 +73,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.QueueRequestorExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -92,41 +85,7 @@ under the License.
<artifactId>artemis-jms-queue-requestor-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/pom.xml b/examples/jms/queue-selector/pom.xml
index fb7bd90..8ccd41c 100644
--- a/examples/jms/queue-selector/pom.xml
+++ b/examples/jms/queue-selector/pom.xml
@@ -57,17 +57,13 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
@@ -77,14 +73,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.QueueSelectorExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -92,41 +85,7 @@ under the License.
<artifactId>artemis-jms-queue-selector-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue/pom.xml b/examples/jms/queue/pom.xml
index 23a1788..9619a7f 100644
--- a/examples/jms/queue/pom.xml
+++ b/examples/jms/queue/pom.xml
@@ -55,20 +55,15 @@ under the License.
<plugin>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-maven-plugin</artifactId>
- <version>${project.version}</version>
<executions>
<execution>
- <id>start</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <!-- this example only uses default configuration from the create -->
</configuration>
</execution>
<execution>
@@ -78,14 +73,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.QueueExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -93,41 +85,7 @@ under the License.
<artifactId>artemis-jms-queue-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/queue/readme.html b/examples/jms/queue/readme.html
index 788f9b7..a80d973 100644
--- a/examples/jms/queue/readme.html
+++ b/examples/jms/queue/readme.html
@@ -30,6 +30,7 @@ under the License.
<p>This example shows you how to send and receive a message to a JMS Queue using ActiveMQ Artemis.</p>
<p>Queues are a standard part of JMS, please consult the JMS 1.1 specification for full details.</p>
<p>A Queue is used to send messages point to point, from a producer to a consumer. The queue guarantees message ordering between these 2 points.</p>
+ <p>Notice this example is using pretty much a default stock configuration</p>
<h2>Example step-by-step</h2>
<p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/queue/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/queue/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue/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/b3af4bb7/examples/jms/queue/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/queue/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/queue/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/b3af4bb7/examples/jms/queue/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/resources/activemq/server0/broker.xml b/examples/jms/queue/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 7690094..0000000
--- a/examples/jms/queue/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,60 +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>
-
- <!-- Acceptors -->
- <acceptors>
- <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
- </acceptors>
-
- <!-- Other config -->
-
- <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/b3af4bb7/examples/jms/reattach-node/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/pom.xml b/examples/jms/reattach-node/pom.xml
index 4cf1c93..76ae5d7 100644
--- a/examples/jms/reattach-node/pom.xml
+++ b/examples/jms/reattach-node/pom.xml
@@ -57,12 +57,13 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
@@ -72,21 +73,9 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ReattachExample</clientClass>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -96,46 +85,7 @@ under the License.
<artifactId>artemis-jms-reattach-node-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-failback-static/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/pom.xml b/examples/jms/replicated-failback-static/pom.xml
index 9b0a522..9a9a2f7 100644
--- a/examples/jms/replicated-failback-static/pom.xml
+++ b/examples/jms/replicated-failback-static/pom.xml
@@ -57,42 +57,25 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
@@ -102,30 +85,10 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ReplicatedFailbackStaticExample</clientClass>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+ <args>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -135,46 +98,7 @@ under the License.
<artifactId>artemis-jms-replicated-failback-static-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/pom.xml b/examples/jms/replicated-failback/pom.xml
index 005ce53..7a27d38 100644
--- a/examples/jms/replicated-failback/pom.xml
+++ b/examples/jms/replicated-failback/pom.xml
@@ -57,42 +57,25 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
@@ -102,30 +85,10 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ReplicatedFailbackExample</clientClass>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+ <args>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -135,46 +98,7 @@ under the License.
<artifactId>artemis-jms-replicated-failback-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
index 6bf2b01..02fcbaf 100644
--- a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
+++ b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
@@ -42,6 +42,12 @@ public class ReplicatedFailbackExample extends ActiveMQExample
new ReplicatedFailbackExample().run(args);
}
+ protected void startServers(String[] serversArgs) throws Exception
+ {
+ startServer(0, 60000);
+ startServer(1, 10000);
+ }
+
@Override
public boolean runExample() throws Exception
{
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
index 8a93350..e762e2c 100644
--- a/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/replicated-failback/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}/live/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir}/live/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir}/live/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir}/live/paging</paging-directory>
<cluster-user>exampleUser</cluster-user>
@@ -72,7 +72,7 @@ under the License.
<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>
+ <refresh-timeout>5000</refresh-timeout>
</discovery-group>
</discovery-groups>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
index eec921f..af242b9 100644
--- a/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
@@ -29,13 +29,13 @@ under the License.
<core xmlns="urn:activemq:core">
- <bindings-directory>${data.dir}/server1/data/messaging/bindings</bindings-directory>
+ <bindings-directory>${data.dir}/bkp/bindings</bindings-directory>
- <journal-directory>${data.dir}/server1/data/messaging/journal</journal-directory>
+ <journal-directory>${data.dir}/bkp/journal</journal-directory>
- <large-messages-directory>${data.dir}/server1/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>${data.dir}/bkp/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server1/data/messaging/paging</paging-directory>
+ <paging-directory>${data.dir}/bkp/paging</paging-directory>
<cluster-user>exampleUser</cluster-user>
@@ -73,7 +73,7 @@ under the License.
<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>
+ <refresh-timeout>5000</refresh-timeout>
</discovery-group>
</discovery-groups>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/pom.xml b/examples/jms/replicated-multiple-failover/pom.xml
index 90ed9e9..60ba4a6 100644
--- a/examples/jms/replicated-multiple-failover/pom.xml
+++ b/examples/jms/replicated-multiple-failover/pom.xml
@@ -57,62 +57,25 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>start2</id>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
@@ -122,39 +85,10 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ReplicatedMultipleFailoverExample</clientClass>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop2</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
+ <args>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -164,46 +98,7 @@ under the License.
<artifactId>artemis-jms-replicated-multiple-failover-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/replicated-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/pom.xml b/examples/jms/replicated-transaction-failover/pom.xml
index f64eec3..b6def66 100644
--- a/examples/jms/replicated-transaction-failover/pom.xml
+++ b/examples/jms/replicated-transaction-failover/pom.xml
@@ -57,42 +57,25 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
- <fork>true</fork>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
@@ -102,30 +85,10 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ReplicatedTransactionFailoverExample</clientClass>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+ <args>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -135,46 +98,7 @@ under the License.
<artifactId>artemis-jms-replicated-transaction-failover-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/request-reply/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/pom.xml b/examples/jms/request-reply/pom.xml
index 9610f67..5880d9d 100644
--- a/examples/jms/request-reply/pom.xml
+++ b/examples/jms/request-reply/pom.xml
@@ -57,17 +57,13 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
@@ -77,14 +73,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.RequestReplyExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -92,41 +85,7 @@ under the License.
<artifactId>artemis-jms-request-reply-example</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/scale-down/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/pom.xml b/examples/jms/scale-down/pom.xml
index 3d8f617..5a1cd36 100644
--- a/examples/jms/scale-down/pom.xml
+++ b/examples/jms/scale-down/pom.xml
@@ -57,34 +57,25 @@ under the License.
<artifactId>artemis-maven-plugin</artifactId>
<executions>
<execution>
- <id>start0</id>
+ <id>create</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</goal>
</goals>
<configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
- <fork>true</fork>
- <systemProperties>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
+ <instance>${basedir}/target/server1</instance>
+ <configuration>${basedir}/target/classes/activemq/server1</configuration>
+ <javaOptions>-Dudp-address=${udp-address}</javaOptions>
</configuration>
</execution>
<execution>
@@ -95,33 +86,9 @@ under the License.
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ScaleDownExample</clientClass>
<args>
- <param>tcp://localhost:61616</param>
- <param>tcp://localhost:61617</param>
+ <param>${basedir}/target/server0</param>
+ <param>${basedir}/target/server1</param>
</args>
- <systemProperties>
- <property>
- <name>exampleConfigDir</name>
- <value>${basedir}/target/classes/activemq</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- <execution>
- <id>stop0</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- </execution>
- <execution>
- <id>stop1</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <configuration>
- <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
</configuration>
</execution>
</executions>
@@ -131,40 +98,7 @@ under the License.
<artifactId>scale-down</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-core-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>${netty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_2.0_spec</artifactId>
- <version>${geronimo.jms.2.spec.version}</version>
- </dependency>
</dependencies>
- <configuration>
- <waitOnStart>false</waitOnStart>
- </configuration>
</plugin>
</plugins>
</build>