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/08/13 06:13:49 UTC
[31/48] activemq-artemis git commit: renaming broker-features ->
features on examples
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/producer-rate-limit/src/main/java/org/apache/activemq/artemis/jms/example/ProducerRateLimitExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/producer-rate-limit/src/main/java/org/apache/activemq/artemis/jms/example/ProducerRateLimitExample.java b/examples/broker-features/standard/producer-rate-limit/src/main/java/org/apache/activemq/artemis/jms/example/ProducerRateLimitExample.java
deleted file mode 100644
index a7623bb..0000000
--- a/examples/broker-features/standard/producer-rate-limit/src/main/java/org/apache/activemq/artemis/jms/example/ProducerRateLimitExample.java
+++ /dev/null
@@ -1,106 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * This example demonstrates how a message producer can be limited to produce messages at a maximum rate
- * specified in messages per sec.
- */
-public class ProducerRateLimitExample {
-
- public static void main(final String[] args) throws Exception {
- Connection connection = null;
- try {
- // Step 2. Perfom a lookup on the queue
- Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
-
- // Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?producerMaxRate=50");
-
- // Step 4. Create a JMS Connection
- connection = cf.createConnection();
-
- // Step 5. Create a JMS Session
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Step 6. Create a JMS Message Producer
- MessageProducer producer = session.createProducer(queue);
-
- System.out.println("Will now send as many messages as we can in 10 seconds...");
-
- // Step 7. Send as many messages as we can in 10 seconds
-
- final long duration = 10000;
-
- int i = 0;
-
- long start = System.currentTimeMillis();
-
- while (System.currentTimeMillis() - start <= duration) {
- TextMessage message = session.createTextMessage("This is text message: " + i++);
-
- producer.send(message);
- }
-
- long end = System.currentTimeMillis();
-
- double rate = 1000 * (double) i / (end - start);
-
- System.out.println("We sent " + i + " messages in " + (end - start) + " milliseconds");
-
- System.out.println("Actual send rate was " + rate + " messages per second");
-
- // Step 8. For good measure we consumer the messages we produced.
-
- MessageConsumer messageConsumer = session.createConsumer(queue);
-
- connection.start();
-
- System.out.println("Now consuming the messages...");
-
- i = 0;
- while (true) {
- TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
- if (messageReceived == null) {
- break;
- }
-
- i++;
- }
-
- System.out.println("Received " + i + " messages");
- }
- finally {
- // Step 9. Be sure to close our resources!
- if (connection != null) {
- connection.close();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/producer-rate-limit/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/producer-rate-limit/src/main/resources/jndi.properties b/examples/broker-features/standard/producer-rate-limit/src/main/resources/jndi.properties
deleted file mode 100644
index 0e42b2a..0000000
--- a/examples/broker-features/standard/producer-rate-limit/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?producerMaxRate=50
-queue.queue/exampleQueue=exampleQueue
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-requestor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/pom.xml b/examples/broker-features/standard/queue-requestor/pom.xml
deleted file mode 100644
index df59a6a..0000000
--- a/examples/broker-features/standard/queue-requestor/pom.xml
+++ /dev/null
@@ -1,104 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>jms-examples</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>queue-requestor</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ Artemis JMS Queue Requestor Example</name>
-
- <properties>
- <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>create</id>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- <execution>
- <id>start</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <spawn>true</spawn>
- <testURI>tcp://localhost:61616</testURI>
- <args>
- <param>run</param>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>runClient</id>
- <goals>
- <goal>runClient</goal>
- </goals>
- <configuration>
- <clientClass>org.apache.activemq.artemis.jms.example.QueueRequestorExample</clientClass>
- </configuration>
- </execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <args>
- <param>stop</param>
- </args>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>queue-requestor</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-requestor/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/readme.html b/examples/broker-features/standard/queue-requestor/readme.html
deleted file mode 100644
index 68a1c95..0000000
--- a/examples/broker-features/standard/queue-requestor/readme.html
+++ /dev/null
@@ -1,46 +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.
--->
-
-<html>
- <head>
- <title>ActiveMQ Artemis JMS QueueRequestor Example</title>
- <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
- <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
- <script type="text/javascript" src="../../../common/prettify.js"></script>
- </head>
- <body onload="prettyPrint()">
- <h1>JMS QueueRequestor Example</h1>
-
- <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
- <p>This example shows you how to use a <a href="http://java.sun.com/javaee/5/docs/api/javax/jms/QueueRequestor.html">QueueRequestor</a> with ActiveMQ Artemis.</p>
- <p>JMS is mainly used to send messages asynchronously so that the producer of a message is not waiting for the result of the message consumption.
- However, there are cases where it is necessary to have a synchronous behavior: the code sending a message requires a reply for this message
- before continuing its execution.<br />
- A QueueRequestor facilitates this use case by providing a simple request/reply abstraction on top of JMS.</p>
- <p>The example consists in two classes:</p>
- <dl>
- <dt><code>TextReverserService</code></dt>
- <dd>A JMS MessageListener which consumes text messages and sends replies containing the reversed text</dd>
- <dt><code>QueueRequestorExample</code></dt>
- <dd>A JMS Client which uses a QueueRequestor to send text requests to a queue and receive replies with the reversed text in a synchronous fashion</dd>
- </dl>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/QueueRequestorExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/QueueRequestorExample.java b/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/QueueRequestorExample.java
deleted file mode 100644
index 607d82f..0000000
--- a/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/QueueRequestorExample.java
+++ /dev/null
@@ -1,96 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueRequestor;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * A simple JMS example that shows how to use queues requestors.
- */
-public class QueueRequestorExample {
-
- public static void main(final String[] args) throws Exception {
- QueueConnection connection = null;
- InitialContext initialContext = null;
- try {
- // Step 1. Create an initial context to perform the JNDI lookup.
- initialContext = new InitialContext();
-
- // Step 2. Perfom a lookup on the queue
- Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
- // Step 3. Look-up the JMS queue connection factory
- QueueConnectionFactory cf = (QueueConnectionFactory) initialContext.lookup("ConnectionFactory");
-
- // Step 4. Create a TextReverserService which consumes messages from the queue and sends message with reversed
- // text
- TextReverserService reverserService = new TextReverserService(cf, queue);
-
- // Step 5. Create a JMS QueueConnection
- connection = cf.createQueueConnection();
-
- // Step 6. Start the connection
- connection.start();
-
- // Step 7. Create a JMS queue session with AUTO_ACKNOWLEDGE mode
- QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Step 8. Create a JMS queue requestor to send requests to the queue
- QueueRequestor queueRequestor = new QueueRequestor(session, queue);
-
- // Step 9. Create a JMS message to send as a request
- TextMessage request = session.createTextMessage("Hello, World!");
-
- // Step 10. Use the requestor to send the request and wait to receive a reply
- TextMessage reply = (TextMessage) queueRequestor.request(request);
-
- // Step 11. The reply's text contains the reversed request's text
- System.out.println("Send request: " + request.getText());
- System.out.println("Received reply:" + reply.getText());
-
- // Step.12 close the queue requestor
- queueRequestor.close();
-
- // Step 13. close the text reverser service
- reverserService.close();
- }
- finally {
- if (connection != null) {
- try {
- // Step 14. Be sure to close the JMS resources!
- connection.close();
- }
- catch (JMSException e) {
- e.printStackTrace();
- }
- }
-
- if (initialContext != null) {
- // Also the InitialContext
- initialContext.close();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java b/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java
deleted file mode 100644
index 63fdad2..0000000
--- a/examples/broker-features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java
+++ /dev/null
@@ -1,113 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-/**
- * A TextReverserService is a MessageListener which consume text messages from a destination
- * and replies with text messages containing the reversed text.
- * It sends replies to the destination specified by the JMS ReplyTo header of the consumed messages.
- */
-public class TextReverserService implements MessageListener {
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private final Session session;
-
- private final Connection connection;
-
- // Static --------------------------------------------------------
-
- private static String reverse(final String text) {
- return new StringBuffer(text).reverse().toString();
- }
-
- // Constructors --------------------------------------------------
-
- public TextReverserService(final ConnectionFactory cf, final Destination destination) throws JMSException {
- // create a JMS connection
- connection = cf.createConnection();
- // create a JMS session
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- // create a JMS MessageConsumer to consume message from the destination
- MessageConsumer consumer = session.createConsumer(destination);
- // let TextReverter implement MessageListener to consume messages
- consumer.setMessageListener(this);
-
- // start the connection to start consuming messages
- connection.start();
- }
-
- // MessageListener implementation --------------------------------
-
- public void onMessage(final Message request) {
- TextMessage textMessage = (TextMessage) request;
- try {
- // retrieve the request's text
- String text = textMessage.getText();
- // create a reply containing the reversed text
- TextMessage reply = session.createTextMessage(TextReverserService.reverse(text));
-
- // retrieve the destination to reply to
- Destination replyTo = request.getJMSReplyTo();
- // create a producer to send the reply
- MessageProducer producer = session.createProducer(replyTo);
- // send the reply
- producer.send(reply);
- // close the producer
- producer.close();
- }
- catch (JMSException e) {
- e.printStackTrace();
- }
- }
-
- // Public --------------------------------------------------------
-
- public void close() {
- if (connection != null) {
- try {
- // be sure to close the JMS resources
- connection.close();
- }
- catch (JMSException e) {
- e.printStackTrace();
- }
- }
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-roles.properties b/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/broker-features/standard/queue-requestor/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/6b17d966/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-users.properties b/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/broker-features/standard/queue-requestor/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/6b17d966/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/broker.xml b/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 6c344c2..0000000
--- a/examples/broker-features/standard/queue-requestor/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,67 +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 queues -->
- <security-setting match="jms.queue.#">
- <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 for JMS temporary queue -->
- <security-setting match="jms.tempqueue.#">
- <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/6b17d966/examples/broker-features/standard/queue-requestor/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-requestor/src/main/resources/jndi.properties b/examples/broker-features/standard/queue-requestor/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/broker-features/standard/queue-requestor/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-selector/pom.xml b/examples/broker-features/standard/queue-selector/pom.xml
deleted file mode 100644
index 9da147c..0000000
--- a/examples/broker-features/standard/queue-selector/pom.xml
+++ /dev/null
@@ -1,109 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>jms-examples</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>queue-selector</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ Artemis JMS Queue Selector Example</name>
-
- <properties>
- <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>create</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- </configuration>
- </execution>
- <execution>
- <id>start</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <spawn>true</spawn>
- <testURI>tcp://localhost:61616</testURI>
- <args>
- <param>run</param>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>runClient</id>
- <goals>
- <goal>runClient</goal>
- </goals>
- <configuration>
- <clientClass>org.apache.activemq.artemis.jms.example.QueueSelectorExample</clientClass>
- </configuration>
- </execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <args>
- <param>stop</param>
- </args>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>queue-selector</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-selector/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-selector/readme.html b/examples/broker-features/standard/queue-selector/readme.html
deleted file mode 100644
index ef63063..0000000
--- a/examples/broker-features/standard/queue-selector/readme.html
+++ /dev/null
@@ -1,52 +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.
--->
-
-<html>
- <head>
- <title>ActiveMQ Artemis JMS Queue Selector Example</title>
- <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
- <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
- <script type="text/javascript" src="../../../common/prettify.js"></script>
- </head>
- <body onload="prettyPrint()">
- <h1>JMS Queue Selector Example</h1>
-
- <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
- <p>This example shows you how to selectively consume messages using message selectors with queue consumers.</p>
-
- <p>Message selectors are strings with special syntax that can be used in creating consumers. Message consumers
- created with a message selector will only receive messages that match its selector. On message delivery, the JBoss Message
- Server evaluates the corresponding message headers of the messages against each selector, if any, and then delivers
- the 'matched' messages to its consumer. Please consult the JMS 1.1 specification for full details.</p>
-
- <p>In this example, three message consumers are created on a queue. The first consumer is created with selector
- <code>'color=red'</code>, it only receives messages that
- have a 'color' string property of 'red' value; the second is created with selector <code>'color=green'</code>, it
- only receives messages who have a 'color' string property of
- 'green' value; and the third without a selector, which means it receives all messages. To illustrate, three messages
- with different 'color' property values are created and sent.</p>
-
- <p>Selectors can be used with both queue consumers and topic consumers. The difference is that with queue consumers,
- a message is only delivered to one consumer on the queue, while topic consumers the message will be delivered to every
- matching consumers. In this example, if the third consumer (anyConsumer) were the first consumer created, it will
- consume the first message delivered, therefore there is no chance for the next consumer to get the message, even if it
- matches the selector.</p>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java b/examples/broker-features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
deleted file mode 100644
index 465a4e2..0000000
--- a/examples/broker-features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
+++ /dev/null
@@ -1,143 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * A simple JMS example that uses selectors with queue consumers.
- */
-public class QueueSelectorExample {
-
- public static void main(final String[] args) throws Exception {
- AtomicBoolean result = new AtomicBoolean(true);
- Connection connection = null;
- InitialContext initialContext = null;
- try {
- // Step 1. Create an initial context to perform the JNDI lookup.
- initialContext = new InitialContext();
-
- // Step 2. look-up the JMS queue object from JNDI
- Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
- // Step 3. look-up the JMS connection factory object from JNDI
- ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
- // Step 4. Create a JMS Connection
- connection = cf.createConnection();
-
- // Step 5. Start the connection
- connection.start();
-
- // Step 5. Create a JMS Session
- Session senderSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Step 6. Create a JMS Message Producer
- MessageProducer producer = senderSession.createProducer(queue);
-
- // Step 8. Prepare two selectors
- String redSelector = "color='red'";
- String greenSelector = "color='green'";
-
- // Step 9. Create a JMS Message Consumer that receives 'red' messages
- Session redSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer redConsumer = redSession.createConsumer(queue, redSelector);
- redConsumer.setMessageListener(new SimpleMessageListener("red", result));
-
- // Step 10. Create a second JMS message consumer that receives 'green' messages
- Session greenSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer greenConsumer = greenSession.createConsumer(queue, greenSelector);
- greenConsumer.setMessageListener(new SimpleMessageListener("green", result));
-
- // Step 11. Create another JMS message consumer that receives any messages.
- Session blankSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer anyConsumer = blankSession.createConsumer(queue);
- anyConsumer.setMessageListener(new SimpleMessageListener("any", result));
-
- // Step 12. Create three messages, each has a color property
- TextMessage redMessage = senderSession.createTextMessage("Red");
- redMessage.setStringProperty("color", "red");
- TextMessage greenMessage = senderSession.createTextMessage("Green");
- greenMessage.setStringProperty("color", "green");
- TextMessage blueMessage = senderSession.createTextMessage("Blue");
- blueMessage.setStringProperty("color", "blue");
-
- // Step 13. Send the Messages
- producer.send(redMessage);
- System.out.println("Message sent: " + redMessage.getText());
- producer.send(greenMessage);
- System.out.println("Message sent: " + greenMessage.getText());
- producer.send(blueMessage);
- System.out.println("Message sent: " + blueMessage.getText());
-
- Thread.sleep(5000);
-
- if (!result.get())
- throw new IllegalStateException();
- }
- finally {
- // Step 12. Be sure to close our JMS resources!
- if (initialContext != null) {
- initialContext.close();
- }
- if (connection != null) {
- connection.close();
- }
- }
- }
-}
-
-class SimpleMessageListener implements MessageListener {
-
- private final String name;
- private AtomicBoolean result;
-
- public SimpleMessageListener(final String listener, AtomicBoolean result) {
- name = listener;
- this.result = result;
- }
-
- public void onMessage(final Message msg) {
- TextMessage textMessage = (TextMessage) msg;
- try {
- String colorProp = msg.getStringProperty("color");
- System.out.println("Receiver " + name +
- " receives message [" +
- textMessage.getText() +
- "] with color property: " +
- colorProp);
- if (!colorProp.equals(name) && !name.equals("any")) {
- result.set(false);
- }
- }
- catch (JMSException e) {
- e.printStackTrace();
- result.set(false);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue-selector/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue-selector/src/main/resources/jndi.properties b/examples/broker-features/standard/queue-selector/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/broker-features/standard/queue-selector/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue/pom.xml b/examples/broker-features/standard/queue/pom.xml
deleted file mode 100644
index e20a38c..0000000
--- a/examples/broker-features/standard/queue/pom.xml
+++ /dev/null
@@ -1,109 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>jms-examples</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>queue</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ Artemis JMS Queue Example</name>
-
- <properties>
- <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>create</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- </configuration>
- </execution>
- <execution>
- <id>start</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <spawn>true</spawn>
- <ignore>${noServer}</ignore>
- <testURI>tcp://localhost:61616</testURI>
- <args>
- <param>run</param>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>runClient</id>
- <goals>
- <goal>runClient</goal>
- </goals>
- <configuration>
- <clientClass>org.apache.activemq.artemis.jms.example.QueueExample</clientClass>
- </configuration>
- </execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <args>
- <param>stop</param>
- </args>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>queue</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue/readme.html b/examples/broker-features/standard/queue/readme.html
deleted file mode 100644
index 0cdbd5f..0000000
--- a/examples/broker-features/standard/queue/readme.html
+++ /dev/null
@@ -1,38 +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.
--->
-
-<html>
- <head>
- <title>ActiveMQ Artemis JMS Queue Example</title>
- <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
- <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
- <script type="text/javascript" src="../../../common/prettify.js"></script>
- </head>
- <body onload="prettyPrint()">
- <h1>JMS Queue Example</h1>
-
- <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
- <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>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java b/examples/broker-features/standard/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
deleted file mode 100644
index b6ce381..0000000
--- a/examples/broker-features/standard/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
+++ /dev/null
@@ -1,84 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message.
- */
-public class QueueExample {
-
- public static void main(final String[] args) throws Exception {
- Connection connection = null;
- InitialContext initialContext = null;
- try {
- // Step 1. Create an initial context to perform the JNDI lookup.
- initialContext = new InitialContext();
-
- // Step 2. Perfom a lookup on the queue
- Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
- // Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
- // Step 4.Create a JMS Connection
- connection = cf.createConnection();
-
- // Step 5. Create a JMS Session
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Step 6. Create a JMS Message Producer
- MessageProducer producer = session.createProducer(queue);
-
- // Step 7. Create a Text Message
- TextMessage message = session.createTextMessage("This is a text message");
-
- System.out.println("Sent message: " + message.getText());
-
- // Step 8. Send the Message
- producer.send(message);
-
- // Step 9. Create a JMS Message Consumer
- MessageConsumer messageConsumer = session.createConsumer(queue);
-
- // Step 10. Start the Connection
- connection.start();
-
- // Step 11. Receive the message
- TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
- System.out.println("Received message: " + messageReceived.getText());
- }
- finally {
- // Step 12. Be sure to close our JMS resources!
- if (initialContext != null) {
- initialContext.close();
- }
- if (connection != null) {
- connection.close();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/queue/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/queue/src/main/resources/jndi.properties b/examples/broker-features/standard/queue/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/broker-features/standard/queue/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/pom.xml b/examples/broker-features/standard/reattach-node/pom.xml
deleted file mode 100644
index 4683e86..0000000
--- a/examples/broker-features/standard/reattach-node/pom.xml
+++ /dev/null
@@ -1,111 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>jms-examples</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>reattach-node</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ Artemis JMS Reattach Node Example</name>
-
- <properties>
- <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>create</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <instance>${basedir}/target/server0</instance>
- <configuration>${basedir}/target/classes/activemq/server0</configuration>
- </configuration>
- </execution>
- <execution>
- <id>start</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <spawn>true</spawn>
- <testURI>tcp://localhost:61616</testURI>
- <args>
- <param>run</param>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>runClient</id>
- <goals>
- <goal>runClient</goal>
- </goals>
- <configuration>
- <clientClass>org.apache.activemq.artemis.jms.example.ReattachExample</clientClass>
- </configuration>
- </execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <args>
- <param>stop</param>
- </args>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>reattach-node</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/readme.html b/examples/broker-features/standard/reattach-node/readme.html
deleted file mode 100644
index bc7d090..0000000
--- a/examples/broker-features/standard/reattach-node/readme.html
+++ /dev/null
@@ -1,55 +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.
--->
-
-<html>
- <head>
- <title>ActiveMQ Artemis JMS Automatic Reattach Example</title>
- <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
- <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
- <script type="text/javascript" src="../../../common/prettify.js"></script>
- </head>
- <body onload="prettyPrint()">
- <h1>JMS Reattach Example</h1>
-
- <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
- <p>This example demonstrates how ActiveMQ Artemis connections can be configured to be resilient to
- temporary network failures.</p>
- <p>In the case of a network failure being detected, either as a result of a failure to read/write to the connection,
- or the failure of a pong to arrive back from the server in good time after a ping is sent, instead of
- failing the connection immediately and notifying any user ExceptionListener objects, ActiveMQ
- can be configured to automatically retry the connection, and reattach to the server when it becomes
- available again across the network.</p>
- <p>When the client reattaches to the server it will be able to resume using its sessions and connections
- where it left off</p>
- <p>This is different to client reconnect as the sessions, consumers etc still exist on the server. With reconnect
- The client recreates its sessions and consumers as needed.</p>
- <p>This example starts a single server, connects to it and performs some JMS operations. We then
- simulate failure of the network connection by temporarily stopping the network acceptor on the server.
- (This is done by sending management messages, but that is not central to the purpose of the example).</p>
- <p>We then wait a few seconds, then restart the acceptor. The client reattaches and the session resumes
- as if nothing happened.</p>
- <p>The JMS Connection Factory is configured to reattach automatically by specifying the various reconnect
- related attributes in the <code>activemq-jms.xml</code> file.</p>
-
- <p>For more details on how to configure this and for clustering in general
- please consult the ActiveMQ Artemis user manual.</p>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java b/examples/broker-features/standard/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
deleted file mode 100644
index 459c33b..0000000
--- a/examples/broker-features/standard/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
+++ /dev/null
@@ -1,150 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-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.management.JMSManagementHelper;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * This examples demonstrates a connection created to a server. Failure of the network connection is then simulated
- *
- * The network is brought back up and the client reconnects and resumes transparently.
- */
-public class ReattachExample {
-
- public static void main(final String[] args) throws Exception {
- Connection connection = null;
- InitialContext initialContext = null;
-
- try {
- // Step 1. Create an initial context to perform the JNDI lookup.
- initialContext = new InitialContext();
-
- // Step 2. Perform a lookup on the queue
- Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
- // Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
- // Step 4. Create a JMS Connection
- connection = cf.createConnection();
-
- // Step 5. Create a JMS Session
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Step 6. Create a JMS Message Producer
- MessageProducer producer = session.createProducer(queue);
-
- // Step 7. Create a Text Message
- TextMessage message = session.createTextMessage("This is a text message");
-
- System.out.println("Sent message: " + message.getText());
-
- // Step 8. Send the Message
- producer.send(message);
-
- // Step 9. Create a JMS Message Consumer
- MessageConsumer messageConsumer = session.createConsumer(queue);
-
- // Step 10. Start the Connection
- connection.start();
-
- // Step 11. To simulate a temporary problem on the network, we stop the remoting acceptor on the
- // server which will close all connections
- stopAcceptor();
-
- System.out.println("Acceptor now stopped, will wait for 10 seconds. This simulates the network connection failing for a while");
-
- // Step 12. Wait a while then restart the acceptor
- Thread.sleep(10000);
-
- System.out.println("Re-starting acceptor");
-
- startAcceptor();
-
- System.out.println("Restarted acceptor. The client will now reconnect.");
-
- // Step 13. We receive the message
- TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
- System.out.println("Received message: " + messageReceived.getText());
- }
- finally {
- // Step 14. Be sure to close our JMS resources!
- if (initialContext != null) {
- initialContext.close();
- }
-
- if (connection != null) {
- connection.close();
- }
- }
- }
-
- private static void stopAcceptor() throws Exception {
- stopStartAcceptor(true);
- }
-
- private static void startAcceptor() throws Exception {
- stopStartAcceptor(false);
- }
-
- // To do this we send a management message to close the acceptor, we do this on a different
- // connection factory which uses a different remoting connection so we can still send messages
- // when the main connection has been stopped
- private static void stopStartAcceptor(final boolean stop) throws Exception {
- ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61617");
-
- Connection connection = null;
- try {
- connection = cf.createConnection();
-
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management");
-
- MessageProducer producer = session.createProducer(managementQueue);
-
- connection.start();
-
- Message m = session.createMessage();
-
- String oper = stop ? "stop" : "start";
-
- JMSManagementHelper.putOperationInvocation(m, "core.acceptor.netty-acceptor", oper);
-
- producer.send(m);
- }
- finally {
- if (connection != null) {
- connection.close();
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties b/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index d82bc7e..0000000
--- a/examples/broker-features/standard/reattach-node/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,admin
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-users.properties b/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/broker-features/standard/reattach-node/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/6b17d966/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/broker.xml b/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 07e09bb..0000000
--- a/examples/broker-features/standard/reattach-node/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,82 +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/bindings</bindings-directory>
-
- <journal-directory>./data/journal</journal-directory>
-
- <large-messages-directory>./data/largemessages</large-messages-directory>
-
- <paging-directory>./data/paging</paging-directory>
-
- <!-- Connectors -->
-
- <connectors>
- <connector name="netty-connector">tcp://localhost:61616</connector>
-
- <!-- We just use this connector so we can send management operations while the other acceptor
- is stopped -->
- <connector name="netty-connector2">tcp://localhost:61617</connector>
- </connectors>
-
- <!-- Acceptors -->
- <acceptors>
- <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-
- <!-- We just use this acceptor so we can send management operations while the other acceptor
- is stopped -->
- <acceptor name="netty-acceptor2">tcp://localhost:61617</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-setting match="jms.queue.activemq.management">
- <!-- only the admin role can interact with the management address -->
- <permission type="consume" roles="admin"/>
- <permission type="send" roles="admin"/>
- <permission type="manage" roles="admin"/>
- </security-setting>
- </security-settings>
-
- </core>
-</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/reattach-node/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/reattach-node/src/main/resources/jndi.properties b/examples/broker-features/standard/reattach-node/src/main/resources/jndi.properties
deleted file mode 100644
index b6f8ff8..0000000
--- a/examples/broker-features/standard/reattach-node/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1&failoverOnServerShutdown=true&confirmationWindowSize=1048576
-queue.queue/exampleQueue=exampleQueue
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/request-reply/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/standard/request-reply/pom.xml b/examples/broker-features/standard/request-reply/pom.xml
deleted file mode 100644
index b4474b0..0000000
--- a/examples/broker-features/standard/request-reply/pom.xml
+++ /dev/null
@@ -1,112 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>jms-examples</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>request-reply</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ Artemis JMS Request Reply Example</name>
-
- <properties>
- <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>create</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <args>
- <arg>--queues</arg>
- <arg>exampleQueue</arg>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>start</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <spawn>true</spawn>
- <testURI>tcp://localhost:61616</testURI>
- <args>
- <param>run</param>
- </args>
- </configuration>
- </execution>
- <execution>
- <id>runClient</id>
- <goals>
- <goal>runClient</goal>
- </goals>
- <configuration>
- <clientClass>org.apache.activemq.artemis.jms.example.RequestReplyExample</clientClass>
- </configuration>
- </execution>
- <execution>
- <id>stop</id>
- <goals>
- <goal>cli</goal>
- </goals>
- <configuration>
- <ignore>${noServer}</ignore>
- <args>
- <param>stop</param>
- </args>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq.examples.broker</groupId>
- <artifactId>request-reply</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>