http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/postOrder.py ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/postOrder.py b/examples/broker-features/standard/rest/jms-to-rest/postOrder.py deleted file mode 100644 index 3580986..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/postOrder.py +++ /dev/null @@ -1,44 +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. -import httplib, urlparse - -conn = httplib.HTTPConnection("localhost:9095") -conn.request("HEAD", "/queues/jms.queue.orders") -res = conn.getresponse() -createLink = res.getheader("msg-create") -print createLink -conn.close() - -createParsed = urlparse.urlparse(createLink) -conn = httplib.HTTPConnection(createParsed.netloc) -headers = {'Content-Type' : 'application/xml'} -xml = """<?xml version="1.0"?> -<order> - <name>Bill</name> - <amount>$199.99</amount> - <item>iPhone4</item> -</order>""" -conn.request("POST", createParsed.path, xml, headers) -res = conn.getresponse() -print res.status, res.reason - - - - - - -
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/receiveOrder.py ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/receiveOrder.py b/examples/broker-features/standard/rest/jms-to-rest/receiveOrder.py deleted file mode 100644 index ce73f5c..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/receiveOrder.py +++ /dev/null @@ -1,68 +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. -import httplib, urlparse - -conn = httplib.HTTPConnection("localhost:9095") -conn.request("HEAD", "/queues/jms.queue.orders") -res = conn.getresponse() -consumersLink = res.getheader("msg-pull-consumers") -consumersParsed = urlparse.urlparse(consumersLink) -conn = httplib.HTTPConnection(consumersParsed.netloc) -conn.request("POST", consumersParsed.path) -res = conn.getresponse() -consumeLink = res.getheader("msg-consume-next") -session = res.getheader("Location") -print consumeLink -conn.close() - -headers = {"Accept-Wait" : "3", "Accept" : "application/xml"} - -try: - print "Waiting..." - while True: - createParsed = urlparse.urlparse(consumeLink) - conn = httplib.HTTPConnection(createParsed.netloc) - conn.request("POST", createParsed.path, None, headers) - res = conn.getresponse() - if res.status == 503: - consumeLink = res.getheader("msg-consume-next") - elif res.status == 200: - print "Success!" - data = res.read() - print data - consumeLink = res.getheader("msg-consume-next") - print "Waiting" - else: - raise Exception('failed') -finally: - if session != None: - print "deleting activemq session..." - createParsed = urlparse.urlparse(session) - conn = httplib.HTTPConnection(createParsed.netloc) - conn.request("DELETE", createParsed.path) - res = conn.getresponse() - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsHelper.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsHelper.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsHelper.java deleted file mode 100644 index ef7a575..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsHelper.java +++ /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. - */ - -import org.apache.activemq.artemis.api.core.TransportConfiguration; -import org.apache.activemq.artemis.api.core.client.ActiveMQClient; -import org.apache.activemq.artemis.core.config.FileDeploymentManager; -import org.apache.activemq.artemis.core.config.impl.FileConfiguration; -import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory; - -import javax.jms.ConnectionFactory; - -public class JmsHelper { - - public static ConnectionFactory createConnectionFactory(String configFile) throws Exception { - FileConfiguration config = new FileConfiguration(); - FileDeploymentManager deploymentManager = new FileDeploymentManager(configFile); - deploymentManager.addDeployable(config); - deploymentManager.readConfiguration(); - TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector"); - return new ActiveMQJMSConnectionFactory(ActiveMQClient.createServerLocatorWithoutHA(transport)); - - } - -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsReceive.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsReceive.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsReceive.java deleted file mode 100644 index d3c05b2..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsReceive.java +++ /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. - */ - -import org.apache.activemq.artemis.jms.client.ActiveMQDestination; -import org.apache.activemq.artemis.rest.Jms; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.Session; - -public class JmsReceive { - - public static void main(String[] args) throws Exception { - System.out.println("Receive Setup..."); - ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); - Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); - - Connection conn = factory.createConnection(); - try { - Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumer = session.createConsumer(destination); - consumer.setMessageListener(new MessageListener() { - @Override - public void onMessage(Message message) { - System.out.println("Received Message: "); - Order order = Jms.getEntity(message, Order.class); - System.out.println(order); - } - }); - conn.start(); - Thread.sleep(1000000); - } - finally { - conn.close(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsSend.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsSend.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsSend.java deleted file mode 100644 index bf3370e..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/JmsSend.java +++ /dev/null @@ -1,47 +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. - */ - -import org.apache.activemq.artemis.jms.client.ActiveMQDestination; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Session; - -public class JmsSend { - - public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); - Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); - - Connection conn = factory.createConnection(); - try { - Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = session.createProducer(destination); - ObjectMessage message = session.createObjectMessage(); - - Order order = new Order("Bill", "$199.99", "iPhone4"); - message.setObject(order); - producer.send(message); - } - finally { - conn.close(); - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/Order.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/Order.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/Order.java deleted file mode 100644 index 2b938f7..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/Order.java +++ /dev/null @@ -1,69 +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. - */ - -import javax.xml.bind.annotation.XmlRootElement; -import java.io.Serializable; - -@XmlRootElement(name = "order") -public class Order implements Serializable { - - private String name; - private String amount; - private String item; - - public Order() { - } - - public Order(String name, String amount, String item) { - this.name = name; - this.amount = amount; - this.item = item; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getItem() { - return item; - } - - public void setItem(String item) { - this.item = item; - } - - @Override - public String toString() { - return "Order{" + - "name='" + name + '\'' + - ", amount='" + amount + '\'' + - ", item='" + item + '\'' + - '}'; - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestReceive.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestReceive.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestReceive.java deleted file mode 100644 index 4fc493a..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestReceive.java +++ /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. - */ - -import org.jboss.resteasy.client.ClientRequest; -import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.spi.Link; - -public class RestReceive { - - public static void main(String[] args) throws Exception { - // first get the create URL for the shipping queue - ClientRequest request = new ClientRequest("http://localhost:9095/queues/jms.queue.orders"); - ClientResponse res = request.head(); - Link pullConsumers = res.getHeaderAsLink("msg-pull-consumers"); - res = pullConsumers.request().formParameter("autoAck", "false").post(); - Link ackNext = res.getHeaderAsLink("msg-acknowledge-next"); - res.releaseConnection(); - while (true) { - System.out.println("Waiting..."); - res = ackNext.request().header("Accept-Wait", "10").header("Accept", "application/xml").post(); - if (res.getStatus() == 503) { - System.out.println("Timeout..."); - ackNext = res.getHeaderAsLink("msg-acknowledge-next"); - } - else if (res.getStatus() == 200) { - Order order = (Order) res.getEntity(Order.class); - System.out.println(order); - Link ack = res.getHeaderAsLink("msg-acknowledgement"); - res = ack.request().formParameter("acknowledge", "true").post(); - ackNext = res.getHeaderAsLink("msg-acknowledge-next"); - } - else { - throw new RuntimeException("Failure! " + res.getStatus()); - } - res.releaseConnection(); - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestSend.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestSend.java b/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestSend.java deleted file mode 100644 index 902c4f7..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/java/RestSend.java +++ /dev/null @@ -1,40 +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. - */ - -import org.jboss.resteasy.client.ClientRequest; -import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.spi.Link; - -public class RestSend { - - public static void main(String[] args) throws Exception { - // first get the create URL for the shipping queue - ClientRequest request = new ClientRequest("http://localhost:9095/queues/jms.queue.orders"); - ClientResponse res = request.head(); - Link create = res.getHeaderAsLink("msg-create"); - - System.out.println("Send order..."); - Order order = new Order(); - order.setName("Bill"); - order.setItem("iPhone4"); - order.setAmount("$199.99"); - - res = create.request().body("application/xml", order).post(); - if (res.getStatus() != 201) - throw new RuntimeException("Failed to post"); - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/activemq-client.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/activemq-client.xml b/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/activemq-client.xml deleted file mode 100644 index 6fe4547..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/activemq-client.xml +++ /dev/null @@ -1,36 +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="urn:activemq" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - - <jms xmlns="urn:activemq:jms"> - </jms> - - <core xmlns="urn:activemq:core"> - - <!-- Connectors --> - <connectors> - <connector name="netty-connector">tcp://localhost:61616</connector> - </connectors> - </core> - -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/artemis-roles.properties b/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/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/rest/jms-to-rest/src/main/resources/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/artemis-users.properties b/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/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/rest/jms-to-rest/src/main/resources/broker.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/broker.xml b/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/broker.xml deleted file mode 100644 index 8cc0fa6..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/resources/broker.xml +++ /dev/null @@ -1,59 +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="orders"/> - </jms> - - <core xmlns="urn:activemq:core"> - - <persistence-enabled>false</persistence-enabled> - <!-- Connectors --> - - <connectors> - <connector name="in-vm">vm://0</connector> - </connectors> - - <acceptors> - <acceptor name="in-vm">vm://0</acceptor> - <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor> - </acceptors> - - <!-- Other config --> - - <security-settings> - <!--security for example queue--> - <security-setting match="#"> - <permission type="createDurableQueue" roles="guest"/> - <permission type="deleteDurableQueue" roles="guest"/> - <permission type="createNonDurableQueue" roles="guest"/> - <permission type="deleteNonDurableQueue" roles="guest"/> - <permission type="consume" roles="guest"/> - <permission type="send" roles="guest"/> - </security-setting> - </security-settings> - - </core> -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml b/examples/broker-features/standard/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e82738a..0000000 --- a/examples/broker-features/standard/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,51 +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. ---> - -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd"> - -<web-app> - - <filter> - <filter-name>Rest-Messaging</filter-name> - <filter-class> - org.jboss.resteasy.plugins.server.servlet.FilterDispatcher - </filter-class> - </filter> - - <filter-mapping> - <filter-name>Rest-Messaging</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <listener> - <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> - </listener> - - <listener> - <listener-class>org.apache.activemq.rest.integration.ActiveMQBootstrapListener</listener-class> - </listener> - - <listener> - <listener-class>org.apache.activemq.rest.integration.RestMessagingBootstrapListener</listener-class> - </listener> - -</web-app> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/pom.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/pom.xml b/examples/broker-features/standard/rest/pom.xml deleted file mode 100644 index bb6c81e..0000000 --- a/examples/broker-features/standard/rest/pom.xml +++ /dev/null @@ -1,45 +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> - - <groupId>org.apache.activemq.examples.rest</groupId> - <artifactId>artemis-rests-pom</artifactId> - <packaging>pom</packaging> - <name>ActiveMQ Artemis REST Examples</name> - - <properties> - <activemq.basedir>${project.basedir}/../../../..</activemq.basedir> - </properties> - - <modules> - <module>javascript-chat</module> - <module>jms-to-rest</module> - <module>push</module> - <module>dup-send</module> - </modules> -</project> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/README.txt ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/README.txt b/examples/broker-features/standard/rest/push/README.txt deleted file mode 100644 index 307e444..0000000 --- a/examples/broker-features/standard/rest/push/README.txt +++ /dev/null @@ -1,32 +0,0 @@ -System Requirements: -You will need JDK 1.6 and Maven to run this example. This example has been tested with Maven 2.2.1. It may or may not work -with earlier or later versions of Maven. - - -This is an example of having the ActiveMQ Artemis REST interface forward a posted message to a registered URL. - -To run the example you will need 3 shell-script windows (or you'll need to run 2 processes in background) - -Step 1: -$ mvn jetty:run - -This will bring up ActiveMQ Artemis and the ActiveMQ Artemis REST Interface. Two queues will be created. An "order" queue and a "shipping" -queue. The server will forward posted messages to the "shipping" queue through a registered push subscription. - -Step 2: -$ mvn exec:java -Dexec.mainClass="ReceiveShipping" - -This will bring up a JMS client registers a MessageListener consumer to receive Order objects. It will automatically -convert a posted HTTP message into an Order object using JAX-RS content handlers. - -Step 3: -$ mvn exec:java -Dexec.mainClass="PushReg" - -This creates a push registration that listens on the "order" queue and forwards messages posted to it to a URL. This -URL is the REST resource of the "shipping" queue. - -Step 4: - -$ mvn exec:java -Dexec.mainClass="PostOrder" - -This posts an order to the "order" queue. You'll see it eventually consumed by the ReceiveShipping process. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/pom.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/pom.xml b/examples/broker-features/standard/rest/push/pom.xml deleted file mode 100644 index 49eba5e..0000000 --- a/examples/broker-features/standard/rest/push/pom.xml +++ /dev/null @@ -1,176 +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.rest</groupId> - <artifactId>artemis-rests-pom</artifactId> - <version>1.0.1-SNAPSHOT</version> - </parent> - <artifactId>push</artifactId> - <packaging>war</packaging> - <name>Push Subscriptions</name> - - <properties> - <activemq.basedir>${project.basedir}/../../../../..</activemq.basedir> - </properties> - - <repositories> - <repository> - <id>jboss</id> - <url>http://repository.jboss.org/nexus/content/groups/public/</url> - </repository> - </repositories> - - <profiles> - <profile> - <id>example</id> - <build> - <finalName>order-flow</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - <executions> - <execution> - <id>surefire-it</id> - <phase>integration-test</phase> - <goals> - <goal>test</goal> - </goals> - <configuration> - <skip>false</skip> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <goals> - <goal>java</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>maven-jetty-plugin</artifactId> - <version>6.1.15</version> - <configuration> - <!-- By default the artifactId is taken, override it with something simple --> - <contextPath>/</contextPath> - <scanIntervalSeconds>2</scanIntervalSeconds> - <stopKey>foo</stopKey> - <stopPort>9999</stopPort> - <connectors> - <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> - <port>9095</port> - <maxIdleTime>60000</maxIdleTime> - </connector> - </connectors> - <userRealms> - <userRealm implementation="org.mortbay.jetty.security.HashUserRealm"> - <name>Test</name> - <config>${project.build.outputDirectory}/test-realm.properties</config> - </userRealm> - </userRealms> - </configuration> - <executions> - <execution> - <id>start-jetty</id> - <phase>pre-integration-test</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <scanIntervalSeconds>0</scanIntervalSeconds> - <daemon>true</daemon> - </configuration> - </execution> - <execution> - <id>stop-jetty</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - <dependencies> - <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> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jms_2.0_spec</artifactId> - </dependency> - <dependency> - <groupId>org.apache.activemq.rest</groupId> - <artifactId>artemis-rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jaxrs</artifactId> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jaxb-provider</artifactId> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/java/JmsHelper.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/java/JmsHelper.java b/examples/broker-features/standard/rest/push/src/main/java/JmsHelper.java deleted file mode 100644 index add00c2..0000000 --- a/examples/broker-features/standard/rest/push/src/main/java/JmsHelper.java +++ /dev/null @@ -1,37 +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. - */ - -import org.apache.activemq.artemis.api.core.TransportConfiguration; -import org.apache.activemq.artemis.api.core.client.ActiveMQClient; -import org.apache.activemq.artemis.core.config.FileDeploymentManager; -import org.apache.activemq.artemis.core.config.impl.FileConfiguration; -import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory; - -import javax.jms.ConnectionFactory; - -public class JmsHelper { - - public static ConnectionFactory createConnectionFactory(String configFile) throws Exception { - FileConfiguration config = new FileConfiguration(); - FileDeploymentManager deploymentManager = new FileDeploymentManager(configFile); - deploymentManager.addDeployable(config); - deploymentManager.readConfiguration(); - TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector"); - return new ActiveMQJMSConnectionFactory(ActiveMQClient.createServerLocatorWithoutHA(transport)); - - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/java/Order.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/java/Order.java b/examples/broker-features/standard/rest/push/src/main/java/Order.java deleted file mode 100644 index 2b938f7..0000000 --- a/examples/broker-features/standard/rest/push/src/main/java/Order.java +++ /dev/null @@ -1,69 +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. - */ - -import javax.xml.bind.annotation.XmlRootElement; -import java.io.Serializable; - -@XmlRootElement(name = "order") -public class Order implements Serializable { - - private String name; - private String amount; - private String item; - - public Order() { - } - - public Order(String name, String amount, String item) { - this.name = name; - this.amount = amount; - this.item = item; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getItem() { - return item; - } - - public void setItem(String item) { - this.item = item; - } - - @Override - public String toString() { - return "Order{" + - "name='" + name + '\'' + - ", amount='" + amount + '\'' + - ", item='" + item + '\'' + - '}'; - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/java/PostOrder.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/java/PostOrder.java b/examples/broker-features/standard/rest/push/src/main/java/PostOrder.java deleted file mode 100644 index 96786e6..0000000 --- a/examples/broker-features/standard/rest/push/src/main/java/PostOrder.java +++ /dev/null @@ -1,47 +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. - */ - -import org.apache.activemq.artemis.jms.client.ActiveMQDestination; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Session; - -public class PostOrder { - - public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); - Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); - - Connection conn = factory.createConnection(); - try { - Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = session.createProducer(destination); - ObjectMessage message = session.createObjectMessage(); - - Order order = new Order("Bill", "$199.99", "iPhone4"); - message.setObject(order); - producer.send(message); - } - finally { - conn.close(); - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/java/PushReg.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/java/PushReg.java b/examples/broker-features/standard/rest/push/src/main/java/PushReg.java deleted file mode 100644 index 2567826..0000000 --- a/examples/broker-features/standard/rest/push/src/main/java/PushReg.java +++ /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. - */ - -import org.apache.activemq.artemis.rest.queue.push.xml.Authentication; -import org.apache.activemq.artemis.rest.queue.push.xml.BasicAuth; -import org.apache.activemq.artemis.rest.queue.push.xml.PushRegistration; -import org.apache.activemq.artemis.rest.queue.push.xml.XmlLink; -import org.jboss.resteasy.client.ClientRequest; -import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.spi.Link; - -public class PushReg { - - public static void main(String[] args) throws Exception { - // get the push consumers factory resource - ClientRequest request = new ClientRequest("http://localhost:9095/queues/jms.queue.orders"); - ClientResponse res = request.head(); - Link pushConsumers = res.getHeaderAsLink("msg-push-consumers"); - - // next create the XML document that represents the registration - // Really, just create a link with the shipping URL and the type you want posted - PushRegistration reg = new PushRegistration(); - BasicAuth authType = new BasicAuth(); - authType.setUsername("guest"); - authType.setPassword("guest"); - Authentication auth = new Authentication(); - auth.setType(authType); - reg.setAuthenticationMechanism(auth); - XmlLink target = new XmlLink(); - target.setHref("http://localhost:9095/queues/jms.queue.shipping"); - target.setType("application/xml"); - target.setRelationship("destination"); - reg.setTarget(target); - - res = pushConsumers.request().body("application/xml", reg).post(); - System.out.println("Create push registration. Resource URL: " + res.getLocationLink().getHref()); - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/java/ReceiveShipping.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/java/ReceiveShipping.java b/examples/broker-features/standard/rest/push/src/main/java/ReceiveShipping.java deleted file mode 100644 index 80a3892..0000000 --- a/examples/broker-features/standard/rest/push/src/main/java/ReceiveShipping.java +++ /dev/null @@ -1,54 +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. - */ - -import org.apache.activemq.artemis.jms.client.ActiveMQDestination; -import org.apache.activemq.artemis.rest.Jms; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.Session; - -public class ReceiveShipping { - - public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); - Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.shipping"); - - Connection conn = factory.createConnection(); - try { - Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumer = session.createConsumer(destination); - consumer.setMessageListener(new MessageListener() { - @Override - public void onMessage(Message message) { - System.out.println("Received Message: "); - Order order = Jms.getEntity(message, Order.class); - System.out.println(order); - } - }); - conn.start(); - Thread.sleep(1000000); - } - finally { - conn.close(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/resources/activemq-client.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/resources/activemq-client.xml b/examples/broker-features/standard/rest/push/src/main/resources/activemq-client.xml deleted file mode 100644 index 6fe4547..0000000 --- a/examples/broker-features/standard/rest/push/src/main/resources/activemq-client.xml +++ /dev/null @@ -1,36 +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="urn:activemq" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - - <jms xmlns="urn:activemq:jms"> - </jms> - - <core xmlns="urn:activemq:core"> - - <!-- Connectors --> - <connectors> - <connector name="netty-connector">tcp://localhost:61616</connector> - </connectors> - </core> - -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/resources/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/resources/artemis-roles.properties b/examples/broker-features/standard/rest/push/src/main/resources/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/broker-features/standard/rest/push/src/main/resources/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/rest/push/src/main/resources/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/resources/artemis-users.properties b/examples/broker-features/standard/rest/push/src/main/resources/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/broker-features/standard/rest/push/src/main/resources/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/rest/push/src/main/resources/broker.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/resources/broker.xml b/examples/broker-features/standard/rest/push/src/main/resources/broker.xml deleted file mode 100644 index 13f2f23..0000000 --- a/examples/broker-features/standard/rest/push/src/main/resources/broker.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version='1.0'?> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="urn:activemq" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - - <jms xmlns="urn:activemq:jms"> - <!--the queues used by the example--> - <queue name="orders"/> - <queue name="shipping"/> - </jms> - - <core xmlns="urn:activemq:core"> - - <persistence-enabled>false</persistence-enabled> - <!-- Connectors --> - - <connectors> - <connector name="in-vm">vm://0</connector> - </connectors> - - <acceptors> - <acceptor name="in-vm">vm://0</acceptor> - <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor> - </acceptors> - - <!-- Other config --> - - <security-settings> - <!--security for example queue--> - <security-setting match="#"> - <permission type="createDurableQueue" roles="guest"/> - <permission type="deleteDurableQueue" roles="guest"/> - <permission type="createNonDurableQueue" roles="guest"/> - <permission type="deleteNonDurableQueue" roles="guest"/> - <permission type="consume" roles="guest"/> - <permission type="send" roles="guest"/> - </security-setting> - </security-settings> - - </core> -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/resources/test-realm.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/resources/test-realm.properties b/examples/broker-features/standard/rest/push/src/main/resources/test-realm.properties deleted file mode 100644 index 65f2dd9..0000000 --- a/examples/broker-features/standard/rest/push/src/main/resources/test-realm.properties +++ /dev/null @@ -1,18 +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 http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/rest/push/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/rest/push/src/main/webapp/WEB-INF/web.xml b/examples/broker-features/standard/rest/push/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d4ba92b..0000000 --- a/examples/broker-features/standard/rest/push/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,70 +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. ---> - -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd"> - -<web-app> - - <filter> - <filter-name>Rest-Messaging</filter-name> - <filter-class> - org.jboss.resteasy.plugins.server.servlet.FilterDispatcher - </filter-class> - </filter> - - <filter-mapping> - <filter-name>Rest-Messaging</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <listener> - <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> - </listener> - - <listener> - <listener-class>org.apache.activemq.rest.integration.ActiveMQBootstrapListener</listener-class> - </listener> - - <listener> - <listener-class>org.apache.activemq.rest.integration.RestMessagingBootstrapListener</listener-class> - </listener> - - <security-constraint> - <web-resource-collection> - <web-resource-name>Resteasy</web-resource-name> - <url-pattern>/queues/jms.queue.shipping/*</url-pattern> - </web-resource-collection> - <auth-constraint> - <role-name>admin</role-name> - </auth-constraint> - </security-constraint> - - <login-config> - <auth-method>BASIC</auth-method> - <realm-name>Test</realm-name> - </login-config> - - <security-role> - <role-name>admin</role-name> - </security-role> - -</web-app> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/scheduled-message/pom.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/scheduled-message/pom.xml b/examples/broker-features/standard/scheduled-message/pom.xml deleted file mode 100644 index 7447f33..0000000 --- a/examples/broker-features/standard/scheduled-message/pom.xml +++ /dev/null @@ -1,114 +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>scheduled-message</artifactId> - <packaging>jar</packaging> - <name>ActiveMQ Artemis JMS Scheduled Message Example</name> - - <properties> - <activemq.basedir>${project.basedir}/../../../..</activemq.basedir> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>artemis-core-client</artifactId> - <version>${project.version}</version> - </dependency> - <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.ScheduledMessageExample</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>scheduled-message</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/scheduled-message/readme.html ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/scheduled-message/readme.html b/examples/broker-features/standard/scheduled-message/readme.html deleted file mode 100644 index 9144f94..0000000 --- a/examples/broker-features/standard/scheduled-message/readme.html +++ /dev/null @@ -1,134 +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 Scheduled Message 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 Scheduled Message 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 a scheduled message to a JMS Queue using ActiveMQ Artemis.</p> - <p>A Scheduled Message is a message that will be delivered at a time specified by the sender. To do this, - simply set a HDR_SCHEDULED_DELIVERY_TIME header property. The value of the property should be the time of - delivery in milliseconds. </p> - - <p>In this example, a message is created with the scheduled delivery time set to 5 seconds after the current time.</p> - - - <h2>Example step-by-step</h2> - <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p> - - <ol> - <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li> - <pre class="prettyprint"> - <code>InitialContext initialContext = getContext();</code> - </pre> - - <li>We look-up the JMS queue object from JNDI</li> - <pre class="prettyprint"> - <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code> - </pre> - - <li>We look-up the JMS connection factory object from JNDI</li> - <pre class="prettyprint"> - <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code> - </pre> - - <li>We create a JMS connection</li> - <pre class="prettyprint"> - <code>connection = cf.createConnection();</code> - </pre> - - <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li> - <pre class="prettyprint"> - <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code> - </pre> - - <li>We create a JMS message producer on the session. This will be used to send the messages.</li> - <pre class="prettyprint"> - <code>MessageProducer producer = session.createProducer(queue);</code> - </pre> - - <li>We create a JMS text message that we are going to send.</li> - <pre class="prettyprint"> - <code>TextMessage message = session.createTextMessage("This is a scheduled message message which will be delivered in 5 sec.");</code> - </pre> - - <li>We schedule the delivery time to be 5 sec later.</li> - <pre class="prettyprint"> - <code> - long time = System.currentTimeMillis(); - time += 5000; - message.setLongProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME.toString(), time); - </code> - </pre> - - <li>We send message to the queue</li> - <pre class="prettyprint"> - <code>messageProducer.send(message);</code> - </pre> - - <li>We create a JMS Message Consumer to receive the message.</li> - <pre class="prettyprint"> - <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code> - </pre> - - <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li> - <pre class="prettyprint"> - <code>connection.start();</code> - </pre> - - <li>We use a blocking receive() to consume the message and see when the message arrives.</li> - <pre class="prettyprint"> - <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive();</code> - </pre> - - <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li> - - <pre class="prettyprint"> - <code>finally - { - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - }</code> - </pre> - - </ol> - - <h2>More information</h2> - - <ul> - <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#scheduled-messages">Scheduled Messages chapter</a></li> - </ul> - - </body> -</html> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6b17d966/examples/broker-features/standard/scheduled-message/src/main/java/org/apache/activemq/artemis/jms/example/ScheduledMessageExample.java ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/scheduled-message/src/main/java/org/apache/activemq/artemis/jms/example/ScheduledMessageExample.java b/examples/broker-features/standard/scheduled-message/src/main/java/org/apache/activemq/artemis/jms/example/ScheduledMessageExample.java deleted file mode 100644 index ba86949..0000000 --- a/examples/broker-features/standard/scheduled-message/src/main/java/org/apache/activemq/artemis/jms/example/ScheduledMessageExample.java +++ /dev/null @@ -1,94 +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 java.text.SimpleDateFormat; -import java.util.Date; - -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; - -import org.apache.activemq.artemis.api.core.Message; - -public class ScheduledMessageExample { - - 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 scheduled message message which will be delivered in 5 sec."); - - // Step 8. Set the delivery time to be 5 sec later. - long time = System.currentTimeMillis(); - time += 5000; - message.setLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME.toString(), time); - - // Step 9. Send the Message - producer.send(message); - - System.out.println("Sent message: " + message.getText()); - SimpleDateFormat formatter = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss"); - System.out.println("Time of send: " + formatter.format(new Date())); - - // Step 10. Create a JMS Message Consumer - MessageConsumer messageConsumer = session.createConsumer(queue); - - // Step 11. Start the Connection - connection.start(); - - // Step 12. Receive the message - TextMessage messageReceived = (TextMessage) messageConsumer.receive(); - - System.out.println("Received message: " + messageReceived.getText()); - System.out.println("Time of receive: " + formatter.format(new Date())); - } - finally { - // Step 13. 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/scheduled-message/src/main/resources/jndi.properties ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/scheduled-message/src/main/resources/jndi.properties b/examples/broker-features/standard/scheduled-message/src/main/resources/jndi.properties deleted file mode 100644 index 93537c4..0000000 --- a/examples/broker-features/standard/scheduled-message/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/security/pom.xml ---------------------------------------------------------------------- diff --git a/examples/broker-features/standard/security/pom.xml b/examples/broker-features/standard/security/pom.xml deleted file mode 100644 index 13976db..0000000 --- a/examples/broker-features/standard/security/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>security</artifactId> - <packaging>jar</packaging> - <name>ActiveMQ Artemis JMS Security 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> - <testUser>bill</testUser> - <testPassword>activemq</testPassword> - <args> - <param>run</param> - </args> - </configuration> - </execution> - <execution> - <id>runClient</id> - <goals> - <goal>runClient</goal> - </goals> - <configuration> - <clientClass>org.apache.activemq.artemis.jms.example.SecurityExample</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>security</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - -</project>