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:23 UTC
[17/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/multiple-failover-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/pom.xml b/examples/jms/multiple-failover-failback/pom.xml
index 62bb695..0e429b7 100644
--- a/examples/jms/multiple-failover-failback/pom.xml
+++ b/examples/jms/multiple-failover-failback/pom.xml
@@ -57,62 +57,33 @@ 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>create1</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>
- <id>start2</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</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/server2</instance>
+ <configuration>${basedir}/target/classes/activemq/server2</configuration>
</configuration>
</execution>
<execution>
@@ -122,39 +93,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverFailbackExample</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>
+ <param>${basedir}/target/server2</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -164,47 +107,8 @@ under the License.
<artifactId>artemis-jms-multiple-failover-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>
+ </plugin>
</plugins>
</build>
</profile>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverFailbackExample.java b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverFailbackExample.java
index d59e494..9ea1dc9 100644
--- a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverFailbackExample.java
+++ b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverFailbackExample.java
@@ -30,11 +30,22 @@ import org.apache.activemq.artemis.common.example.ActiveMQExample;
public class MultipleFailoverFailbackExample extends ActiveMQExample
{
- public static void main(final String[] args)
+ public static void main(final String[] args) throws Exception
{
new MultipleFailoverFailbackExample().run(args);
}
+ protected void startServers(String[] serversArgs) throws Exception
+ {
+ for (int i = 0; i < serversArgs.length; i++)
+ {
+ startServer(i, i == 0 ? 5000 : 0);
+ }
+
+ Thread.sleep(5000);
+ }
+
+
@Override
public boolean runExample() throws Exception
{
@@ -94,6 +105,7 @@ public class MultipleFailoverFailbackExample extends ActiveMQExample
// it has really crashed
Thread.sleep(2000);
killServer(0);
+ Thread.sleep(5000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occurred
@@ -115,7 +127,7 @@ public class MultipleFailoverFailbackExample extends ActiveMQExample
message0.acknowledge();
Thread.sleep(2000);
- reStartServer(0, 10000);
+ startServer(0, 10000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occurred
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover-failback/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server0/broker.xml b/examples/jms/multiple-failover-failback/src/main/resources/activemq/server0/broker.xml
index 52eb917..4cf5582 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/multiple-failover-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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover-failback/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server1/broker.xml b/examples/jms/multiple-failover-failback/src/main/resources/activemq/server1/broker.xml
index eb70455..f910045 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/multiple-failover-failback/src/main/resources/activemq/server1/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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover-failback/src/main/resources/activemq/server2/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server2/broker.xml b/examples/jms/multiple-failover-failback/src/main/resources/activemq/server2/broker.xml
index dff08b3..76a521a 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/activemq/server2/broker.xml
+++ b/examples/jms/multiple-failover-failback/src/main/resources/activemq/server2/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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/pom.xml b/examples/jms/multiple-failover/pom.xml
index 2bd00f8..a68679d 100644
--- a/examples/jms/multiple-failover/pom.xml
+++ b/examples/jms/multiple-failover/pom.xml
@@ -57,62 +57,33 @@ 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>create1</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>
- <id>start2</id>
+ <id>create2</id>
<goals>
- <goal>start</goal>
+ <goal>create</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/server2</instance>
+ <configuration>${basedir}/target/classes/activemq/server2</configuration>
</configuration>
</execution>
<execution>
@@ -122,39 +93,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverExample</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>
+ <param>${basedir}/target/server2</param>
+ </args>
</configuration>
</execution>
</executions>
@@ -164,46 +107,7 @@ under the License.
<artifactId>artemis-jms-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/multiple-failover/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverExample.java b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverExample.java
index dfa5402..a2b55e4 100644
--- a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverExample.java
+++ b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/artemis/jms/example/MultipleFailoverExample.java
@@ -30,11 +30,22 @@ import org.apache.activemq.artemis.common.example.ActiveMQExample;
public class MultipleFailoverExample extends ActiveMQExample
{
- public static void main(final String[] args)
+ public static void main(final String[] args) throws Exception
{
new MultipleFailoverExample().run(args);
}
+ protected void startServers(String[] serversArgs) throws Exception
+ {
+ for (int i = 0; i < serversArgs.length; i++)
+ {
+ startServer(i, i == 0 ? 5000 : 0);
+ }
+
+ Thread.sleep(5000);
+ }
+
+
@Override
public boolean runExample() throws Exception
{
@@ -92,8 +103,9 @@ public class MultipleFailoverExample extends ActiveMQExample
// Step 10. Crash server #1, the live server, and wait a little while to make sure
// it has really crashed
- Thread.sleep(2000);
+ Thread.sleep(1000);
killServer(0);
+ Thread.sleep(5000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occurred
@@ -114,8 +126,9 @@ public class MultipleFailoverExample extends ActiveMQExample
}
message0.acknowledge();
- Thread.sleep(2000);
+ Thread.sleep(1000);
killServer(getServer(connection));
+ Thread.sleep(5000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occurred
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server0/broker.xml
index ca23965..323bfef 100644
--- a/examples/jms/multiple-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/multiple-failover/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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server1/broker.xml
index eb70455..f910045 100644
--- a/examples/jms/multiple-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server1/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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/multiple-failover/src/main/resources/activemq/server2/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server2/broker.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server2/broker.xml
index 482b4ce..c114ed2 100644
--- a/examples/jms/multiple-failover/src/main/resources/activemq/server2/broker.xml
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server2/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>../../server0/data/messaging/bindings</bindings-directory>
- <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+ <journal-directory>../../server0/data/messaging/journal</journal-directory>
- <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+ <large-messages-directory>../../server0/data/messaging/largemessages</large-messages-directory>
- <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+ <paging-directory>../../server0/data/messaging/paging</paging-directory>
<ha-policy>
<shared-store>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/no-consumer-buffering/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/pom.xml b/examples/jms/no-consumer-buffering/pom.xml
index 7373bb4..6e4818f 100644
--- a/examples/jms/no-consumer-buffering/pom.xml
+++ b/examples/jms/no-consumer-buffering/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.NoConsumerBufferingExample</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-no-consumer-buffering-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/non-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/pom.xml b/examples/jms/non-transaction-failover/pom.xml
index d90c9d4..675dc23 100644
--- a/examples/jms/non-transaction-failover/pom.xml
+++ b/examples/jms/non-transaction-failover/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>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- <property>
- <name>udp-address</name>
- <value>${udp-address}</value>
- </property>
- </systemProperties>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
- <id>start1</id>
+ <id>create1</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>
@@ -102,30 +83,10 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.NonTransactionFailoverExample</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,40 +96,7 @@ under the License.
<artifactId>non-transaction-failover</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>
+ </dependencies>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/NonTransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/NonTransactionFailoverExample.java b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/NonTransactionFailoverExample.java
index 021835e..e690fd6 100644
--- a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/NonTransactionFailoverExample.java
+++ b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/NonTransactionFailoverExample.java
@@ -34,11 +34,21 @@ import org.apache.activemq.artemis.common.example.ActiveMQExample;
*/
public class NonTransactionFailoverExample extends ActiveMQExample
{
- public static void main(final String[] args)
+ public static void main(final String[] args) throws Exception
{
new NonTransactionFailoverExample().run(args);
}
+ protected void startServers(String[] serversArgs) throws Exception
+ {
+ for (int i = 0; i < serversArgs.length; i++)
+ {
+ startServer(i, i == 0 ? 5000 : 0);
+ }
+
+ Thread.sleep(5000);
+ }
+
@Override
public boolean runExample() throws Exception
{
@@ -98,6 +108,7 @@ public class NonTransactionFailoverExample extends ActiveMQExample
// pending Acks are on the server's side
Thread.sleep(2000);
killServer(0);
+ Thread.sleep(5000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occurred
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/broker.xml
index 1a5bc0b..00e724b 100644
--- a/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/broker.xml
@@ -71,10 +71,10 @@ under the License.
</cluster-connection>
</cluster-connections>
- <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
- <bindings-directory>target/server0/data/bindings</bindings-directory>
- <journal-directory>target/server0/data/journal</journal-directory>
- <paging-directory>target/server0/data/paging</paging-directory>
+ <large-messages-directory>../../server0/data/large-messages</large-messages-directory>
+ <bindings-directory>../../server0/data/bindings</bindings-directory>
+ <journal-directory>../../server0/data/journal</journal-directory>
+ <paging-directory>../../server0/data/paging</paging-directory>
<!-- Other config -->
<security-settings>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/broker.xml
index ecb5cda..0406b8f 100644
--- a/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/broker.xml
@@ -71,10 +71,10 @@ under the License.
</cluster-connection>
</cluster-connections>
- <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
- <bindings-directory>target/server0/data/bindings</bindings-directory>
- <journal-directory>target/server0/data/journal</journal-directory>
- <paging-directory>target/server0/data/paging</paging-directory>
+ <large-messages-directory>../../server0/data/large-messages</large-messages-directory>
+ <bindings-directory>../../server0/data/bindings</bindings-directory>
+ <journal-directory>../../server0/data/journal</journal-directory>
+ <paging-directory>../../server0/data/paging</paging-directory>
<!-- Other config -->
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/openwire/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/pom.xml b/examples/jms/openwire/pom.xml
index 2de0c1d..1ee5cfc 100644
--- a/examples/jms/openwire/pom.xml
+++ b/examples/jms/openwire/pom.xml
@@ -45,17 +45,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>
@@ -65,14 +61,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.OpenWireExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -80,46 +73,7 @@ under the License.
<artifactId>artemis-jms-openwire-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>org.apache.activemq</groupId>
- <artifactId>artemis-openwire-protocol</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/openwire/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/src/main/resources/activemq/server0/broker.xml b/examples/jms/openwire/src/main/resources/activemq/server0/broker.xml
index dbb0ca6..c281c60 100644
--- a/examples/jms/openwire/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/openwire/src/main/resources/activemq/server0/broker.xml
@@ -43,7 +43,9 @@ under the License.
<!-- Acceptors -->
<acceptors>
- <acceptor name="openwire-acceptor">tcp://localhost:61616?protocols=OPENWIRE</acceptor>
+ <!-- the same acceptor can deal with more than one protocol. We are adding CORE here as some of
+ the example super classes will check for if the server is alive after starting it -->
+ <acceptor name="openwire-acceptor">tcp://localhost:61616?protocols=OPENWIRE,CORE</acceptor>
</acceptors>
<!-- Other config -->
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/paging/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/paging/pom.xml b/examples/jms/paging/pom.xml
index a0251a0..83103ed 100644
--- a/examples/jms/paging/pom.xml
+++ b/examples/jms/paging/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.PagingExample</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-paging-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/perf/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/perf/pom.xml b/examples/jms/perf/pom.xml
index 07e3410..2db189a 100644
--- a/examples/jms/perf/pom.xml
+++ b/examples/jms/perf/pom.xml
@@ -70,65 +70,37 @@ under the License.
<plugin>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <waitOnStart>true</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- <systemProperties>
- <property>
- <name>data.dir</name>
- <value>${basedir}/target/</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <waitOnStart>false</waitOnStart>
- <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.jms</groupId>
- <artifactId>artemis-jms-perf-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>
+ <executions>
+ <execution>
+ <id>create</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/server0</instance>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <id>runClient</id>
+ <goals>
+ <goal>runClient</goal>
+ </goals>
+ <configuration>
+ <clientClass>org.apache.activemq.artemis.jms.example.Server</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.activemq.examples.jms</groupId>
+ <artifactId>artemis-jms-perf-example</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/perf/src/main/java/org/apache/activemq/artemis/jms/example/Server.java
----------------------------------------------------------------------
diff --git a/examples/jms/perf/src/main/java/org/apache/activemq/artemis/jms/example/Server.java b/examples/jms/perf/src/main/java/org/apache/activemq/artemis/jms/example/Server.java
new file mode 100644
index 0000000..d844c40
--- /dev/null
+++ b/examples/jms/perf/src/main/java/org/apache/activemq/artemis/jms/example/Server.java
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+package org.apache.activemq.artemis.jms.example;
+
+public class Server
+{
+ public static void main(String arg[])
+ {
+ System.out.println("***********************************************************************************");
+ System.out.println("You need to start manually under ./target/server/bin just run ./artemis run");
+ System.out.println("***********************************************************************************");
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/perf/src/main/resources/perf.properties
----------------------------------------------------------------------
diff --git a/examples/jms/perf/src/main/resources/perf.properties b/examples/jms/perf/src/main/resources/perf.properties
index 8dbf02a..5f6f975 100644
--- a/examples/jms/perf/src/main/resources/perf.properties
+++ b/examples/jms/perf/src/main/resources/perf.properties
@@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-num-messages=1
-num-warmup-messages=0
+num-messages=100000
+num-warmup-messages=1000
message-size=1024
-durable=true
+durable=false
transacted=false
batch-size=1000
drain-queue=false
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/pre-acknowledge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/pre-acknowledge/pom.xml b/examples/jms/pre-acknowledge/pom.xml
index d644d80..030d77f 100644
--- a/examples/jms/pre-acknowledge/pom.xml
+++ b/examples/jms/pre-acknowledge/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>
@@ -78,16 +74,10 @@ under the License.
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.PreacknowledgeExample</clientClass>
<args>
- <param>tcp://localhost:61616</param>
+ <param>${basedir}/target/server0</param>
</args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -95,41 +85,7 @@ under the License.
<artifactId>artemis-jms-pre-acknowledge-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/producer-rate-limit/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/producer-rate-limit/pom.xml b/examples/jms/producer-rate-limit/pom.xml
index 2b2dbe0..535a7d5 100644
--- a/examples/jms/producer-rate-limit/pom.xml
+++ b/examples/jms/producer-rate-limit/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.ProducerRateLimitExample</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-producer-rate-limit-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/proton-cpp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/pom.xml b/examples/jms/proton-cpp/pom.xml
index 9422c83..c5e41a4 100644
--- a/examples/jms/proton-cpp/pom.xml
+++ b/examples/jms/proton-cpp/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>
+ <configuration>${basedir}/target/classes/activemq/server0</configuration>
</configuration>
</execution>
<execution>
@@ -78,14 +73,11 @@ under the License.
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ProtonCPPExample</clientClass>
+ <args>
+ <param>${basedir}/target/server0</param>
+ </args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -93,46 +85,7 @@ under the License.
<artifactId>artemis-jms-protoncpp</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>org.apache.activemq</groupId>
- <artifactId>artemis-amqp-protocol</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/proton-cpp/src/main/java/org/apache/activemq/artemis/jms/example/ProtonCPPExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/src/main/java/org/apache/activemq/artemis/jms/example/ProtonCPPExample.java b/examples/jms/proton-cpp/src/main/java/org/apache/activemq/artemis/jms/example/ProtonCPPExample.java
index df4503e..b23dc55 100644
--- a/examples/jms/proton-cpp/src/main/java/org/apache/activemq/artemis/jms/example/ProtonCPPExample.java
+++ b/examples/jms/proton-cpp/src/main/java/org/apache/activemq/artemis/jms/example/ProtonCPPExample.java
@@ -26,13 +26,10 @@ import javax.jms.QueueConnection;
import javax.jms.QueueRequestor;
import javax.jms.QueueSession;
import javax.jms.Session;
-import javax.jms.TextMessage;
import javax.naming.InitialContext;
import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSConstants;
import org.apache.activemq.artemis.api.jms.management.JMSManagementHelper;
-
import org.apache.activemq.artemis.common.example.ActiveMQExample;
/**
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/proton-j/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-j/pom.xml b/examples/jms/proton-j/pom.xml
index 42e9ea9..3001867 100644
--- a/examples/jms/proton-j/pom.xml
+++ b/examples/jms/proton-j/pom.xml
@@ -58,17 +58,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>
@@ -79,16 +75,10 @@ under the License.
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ProtonJExample</clientClass>
<args>
- <param>tcp://localhost:61616</param>
+ <param>${basedir}/target/server0</param>
</args>
</configuration>
</execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
</executions>
<dependencies>
<dependency>
@@ -96,46 +86,7 @@ under the License.
<artifactId>artemis-proton-j-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>org.apache.activemq</groupId>
- <artifactId>artemis-amqp-protocol</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/proton-j/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-j/src/main/resources/activemq/server0/broker.xml b/examples/jms/proton-j/src/main/resources/activemq/server0/broker.xml
index c27781d..f1df1c6 100644
--- a/examples/jms/proton-j/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/proton-j/src/main/resources/activemq/server0/broker.xml
@@ -41,6 +41,7 @@ under the License.
<!-- Acceptors -->
<acceptors>
<acceptor name="proton-acceptor">tcp://localhost:5672</acceptor>
+ <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
</acceptors>
<queues>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/proton-ruby/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-ruby/pom.xml b/examples/jms/proton-ruby/pom.xml
index 6db85cd..b00e308 100644
--- a/examples/jms/proton-ruby/pom.xml
+++ b/examples/jms/proton-ruby/pom.xml
@@ -53,18 +53,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>
- <waitOnStart>true</waitOnStart>
- <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>
</executions>
@@ -74,46 +69,7 @@ under the License.
<artifactId>artemis-jms-proton-ruby-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>org.apache.activemq</groupId>
- <artifactId>artemis-amqp-protocol</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/proton-ruby/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/proton-ruby/readme.html b/examples/jms/proton-ruby/readme.html
index 0277e7b..951a654 100644
--- a/examples/jms/proton-ruby/readme.html
+++ b/examples/jms/proton-ruby/readme.html
@@ -42,7 +42,8 @@ under the License.
</code>
</pre>
<h2>Example step-by-step</h2>
- <p>Firstly start the server by running the command <literal>mvn verify -Pexample</literal></p>
+ <p>Firstly create the server by running the command <literal>mvn verify -Pexample</literal></p>
+ <p>Start the server manually under ./target/server1/bin by calling ./artemis run</p>
<p>Then in a separate window you can run the send ruby script by running the command <literal>ruby src/main/scripts/send.rb</literal></p>
<p>You can then receive the message via the receive ruby script by running <literal>ruby src/main/scripts/receive.rb</literal></p>