http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/dup-send/src/main/java/Order.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/java/Order.java b/examples/jms/rest/dup-send/src/main/java/Order.java deleted file mode 100644 index 2b938f7..0000000 --- a/examples/jms/rest/dup-send/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/21bf4406/examples/jms/rest/dup-send/src/main/java/PostOrder.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/java/PostOrder.java b/examples/jms/rest/dup-send/src/main/java/PostOrder.java deleted file mode 100644 index 0e85300..0000000 --- a/examples/jms/rest/dup-send/src/main/java/PostOrder.java +++ /dev/null @@ -1,77 +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.jboss.resteasy.client.ClientRequest; -import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.spi.Link; - -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 { - // 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 Bill's 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() == 307) { - Link redirect = res.getLocationLink(); - res.releaseConnection(); - res = redirect.request().body("application/xml", order).post(); - } - - if (res.getStatus() != 201) - throw new RuntimeException("Failed to post"); - - create = res.getHeaderAsLink("msg-create-next"); - - if (res.getStatus() != 201) - throw new RuntimeException("Failed to post"); - - System.out.println("Send Monica's order..."); - order.setName("Monica"); - - res.releaseConnection(); - res = create.request().body("application/xml", order).post(); - - if (res.getStatus() != 201) - throw new RuntimeException("Failed to post"); - - System.out.println("Resend Monica's order over same create-next link..."); - - res.releaseConnection(); - 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/21bf4406/examples/jms/rest/dup-send/src/main/java/PostOrderWithId.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/java/PostOrderWithId.java b/examples/jms/rest/dup-send/src/main/java/PostOrderWithId.java deleted file mode 100644 index 6b610e7..0000000 --- a/examples/jms/rest/dup-send/src/main/java/PostOrderWithId.java +++ /dev/null @@ -1,45 +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 PostOrderWithId { - - public static void main(String[] args) throws Exception { - if (args.length < 1 || args[0] == null) - throw new RuntimeException("You must pass in a parameter"); - - // 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-with-id"); - - Order order = new Order(); - order.setName(args[0]); - order.setItem("iPhone4"); - order.setAmount("$199.99"); - - res = create.request().pathParameter("id", args[0]).body("application/xml", order).post(); - - if (res.getStatus() != 201) - throw new RuntimeException("Failed to post"); - - System.out.println("Sent order " + args[0]); - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/dup-send/src/main/java/ReceiveOrder.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/java/ReceiveOrder.java b/examples/jms/rest/dup-send/src/main/java/ReceiveOrder.java deleted file mode 100644 index a00d110..0000000 --- a/examples/jms/rest/dup-send/src/main/java/ReceiveOrder.java +++ /dev/null @@ -1,51 +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 ReceiveOrder { - - 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.releaseConnection(); - res = pullConsumers.request().post(); - Link consumeNext = res.getHeaderAsLink("msg-consume-next"); - res.releaseConnection(); - while (true) { - System.out.println("Waiting..."); - res = consumeNext.request().header("Accept-Wait", "10").post(); - if (res.getStatus() == 503) { - System.out.println("Timeout..."); - consumeNext = res.getHeaderAsLink("msg-consume-next"); - } - else if (res.getStatus() == 200) { - Order order = (Order) res.getEntity(Order.class); - System.out.println(order); - consumeNext = res.getHeaderAsLink("msg-consume-next"); - } - else { - throw new RuntimeException("Failure! " + res.getStatus()); - } - res.releaseConnection(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml b/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml deleted file mode 100644 index 6fe4547..0000000 --- a/examples/jms/rest/dup-send/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/21bf4406/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml b/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml deleted file mode 100644 index c1a7f21..0000000 --- a/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml +++ /dev/null @@ -1,23 +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. ---> - -<rest-messaging> - <dups-ok>false</dups-ok> -</rest-messaging> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/dup-send/src/main/resources/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/resources/artemis-roles.properties b/examples/jms/rest/dup-send/src/main/resources/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/rest/dup-send/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/21bf4406/examples/jms/rest/dup-send/src/main/resources/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/resources/artemis-users.properties b/examples/jms/rest/dup-send/src/main/resources/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/rest/dup-send/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/21bf4406/examples/jms/rest/dup-send/src/main/resources/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/resources/broker.xml b/examples/jms/rest/dup-send/src/main/resources/broker.xml deleted file mode 100644 index 8cc0fa6..0000000 --- a/examples/jms/rest/dup-send/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/21bf4406/examples/jms/rest/dup-send/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/dup-send/src/main/webapp/WEB-INF/web.xml b/examples/jms/rest/dup-send/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index ffb38b5..0000000 --- a/examples/jms/rest/dup-send/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,55 +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> - <context-param> - <param-name>rest.messaging.config.file</param-name> - <param-value>activemq-rest.xml</param-value> - </context-param> - - <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/21bf4406/examples/jms/rest/javascript-chat/README.txt ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/README.txt b/examples/jms/rest/javascript-chat/README.txt deleted file mode 100644 index ae0e57c..0000000 --- a/examples/jms/rest/javascript-chat/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -System Requirements: -You will need JDK 1.6, Maven, and a browser 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 producing and consuming messages through a topic. The client is Javascript code within your browser. -The example is a very simple chat application between two browser windows. - -Step 1: -$ mvn jetty:run - -This will bring up ActiveMQ Artemis and the ActiveMQ Artemis REST Interface. - -Step 2: -Bring up two browsers and point them to http://localhost:9095. In the textbox type a message you want to send. Click -the "Click to send message" button and you'll see the message show up in both browser windows. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/javascript-chat/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/pom.xml b/examples/jms/rest/javascript-chat/pom.xml deleted file mode 100644 index 9c84188..0000000 --- a/examples/jms/rest/javascript-chat/pom.xml +++ /dev/null @@ -1,184 +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>javascript-chat</artifactId> - <packaging>war</packaging> - <name>Browser Chat App</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>chat</finalName> - <plugins> - <!-- - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>maven-jetty-plugin</artifactId> - <version>6.1.15</version> - <configuration> - <contextPath>/</contextPath> - <scanIntervalSeconds>2</scanIntervalSeconds> - <connectors> - <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> - <port>9095</port> - <maxIdleTime>60000</maxIdleTime> - </connector> - </connectors> - <systemProperties> - <systemProperty> - <name>log4j.configuration</name> - <value> - file:./src/test/resources/log4j.properties - </value> - </systemProperty> - </systemProperties> - </configuration> - </plugin> - --> - <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.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> - </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> - <version>4.1</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/javascript-chat/src/main/resources/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/main/resources/artemis-roles.properties b/examples/jms/rest/javascript-chat/src/main/resources/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/rest/javascript-chat/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/21bf4406/examples/jms/rest/javascript-chat/src/main/resources/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/main/resources/artemis-users.properties b/examples/jms/rest/javascript-chat/src/main/resources/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/rest/javascript-chat/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/21bf4406/examples/jms/rest/javascript-chat/src/main/resources/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/main/resources/broker.xml b/examples/jms/rest/javascript-chat/src/main/resources/broker.xml deleted file mode 100644 index e5e1364..0000000 --- a/examples/jms/rest/javascript-chat/src/main/resources/broker.xml +++ /dev/null @@ -1,58 +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--> - <topic name="chat"/> - </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> - </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/21bf4406/examples/jms/rest/javascript-chat/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/main/webapp/WEB-INF/web.xml b/examples/jms/rest/javascript-chat/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e82738a..0000000 --- a/examples/jms/rest/javascript-chat/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/21bf4406/examples/jms/rest/javascript-chat/src/main/webapp/index.html ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/main/webapp/index.html b/examples/jms/rest/javascript-chat/src/main/webapp/index.html deleted file mode 100644 index f74e0ee..0000000 --- a/examples/jms/rest/javascript-chat/src/main/webapp/index.html +++ /dev/null @@ -1,189 +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. ---> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <script type="text/javascript"> - <!-- - - function createXHR() - { - var request = false; - try - { - request = new ActiveXObject('Msxml2.XMLHTTP'); - } - catch (err2) - { - try - { - request = new ActiveXObject('Microsoft.XMLHTTP'); - } - catch (err3) - { - try - { - request = new XMLHttpRequest(); - } - catch (err1) - { - request = false; - } - } - } - return request; - } - - var topicSender; - var nextMessage; - var subscriptions; - var count = 0; - var reconnect = true; - - function initializeSenderAndTop(topic) - { - var xhr = createXHR(); - xhr.open("HEAD", "topics/" + topic, true); - xhr.onreadystatechange = function() - { - if (xhr.readyState == 4) - { - if (xhr.status == 200) - { - // getting the links from the rest resource - topicSender = xhr.getResponseHeader("msg-create"); - subscriptions = xhr.getResponseHeader("msg-pull-subscriptions"); - - // just adding the report - document.getElementById("errors").innerHTML = "Subscriptions URL: " + subscriptions; - } - } - } - - // this will send the request from javascript - xhr.send(null); - } - - function postMessage(user, message) - { - var xhr = createXHR(); - xhr.open("POST", topicSender, false); - xhr.setRequestHeader("Content-Type", "text/plain"); - xhr.send(user + ": " + message); - if (xhr.status == 201) - { - topicSender = xhr.getResponseHeader("msg-create-next"); - } - else - { - document.getElementById("errors").innerHTML = "Failed to send message: " + topicSender; - } - } - - function receiveMessage() - { - var xhr = createXHR(); - if (reconnect) - { - document.getElementById("connection").innerHTML = "Trying to reconnect: " + subscriptions + " retries: " + count++; - xhr.open("POST", subscriptions, true); - xhr.onreadystatechange = function() - { - if (xhr.readyState == 4) - { - var status = xhr.status; - if (status == 201) - { - nextMessage = xhr.getResponseHeader("msg-consume-next"); - document.getElementById("connection").innerHTML = "Connected to: " + nextMessage; - count = 1; - reconnect = false; - } - setTimeout("receiveMessage()", 800); - } - } - xhr.send(null); - } - else - { - xhr.open("POST", nextMessage, true); - xhr.setRequestHeader("Accept-Wait", "10") - xhr.onreadystatechange = function() - { - if (xhr.readyState == 4) - { - var status = xhr.status; - if (status == 200) - { - document.getElementById("next").innerHTML = xhr.responseText + "\n" + document.getElementById("next").innerHTML; - nextMessage = xhr.getResponseHeader("msg-consume-next"); - } - else - { - reconnect = true; - } - setTimeout("receiveMessage()", 800); - } - } - xhr.send(null); - } - } - - initializeSenderAndTop('jms.topic.chat'); - - - setTimeout("receiveMessage()", 800); - - - // --> - </script> - <title>Ajax Chat Demo</title></head> - - -<body bgcolor="#FFFFFF"> - -<p><font size="+3">Ajax Chat Demo</font></p> -<hr> -<FORM name="ajax" method="POST" action=""> - - <p> - Username: <input type="text" name="user" value="Billy" size="10"><br/> - <input type="text" name="message"> - <INPUT type="BUTTON" value=" Click to send message " - ONCLICK="postMessage(this.form.user.value, this.form.message.value)"> - </p> - -</FORM> -<div id="connection"></div> -<br> - -<div id="errors"></div> - -<p> - -<h2>Messages:</h2></p> -<pre> -<div id="next"></div> -</pre> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/javascript-chat/src/test/java/org/jboss/resteasy/messaging/test/AutoAckTopicTest.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/javascript-chat/src/test/java/org/jboss/resteasy/messaging/test/AutoAckTopicTest.java b/examples/jms/rest/javascript-chat/src/test/java/org/jboss/resteasy/messaging/test/AutoAckTopicTest.java deleted file mode 100644 index 05bc685..0000000 --- a/examples/jms/rest/javascript-chat/src/test/java/org/jboss/resteasy/messaging/test/AutoAckTopicTest.java +++ /dev/null @@ -1,89 +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.jboss.resteasy.messaging.test; - -import org.jboss.resteasy.client.ClientRequest; -import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.spi.Link; -import org.apache.activemq.artemis.rest.util.LinkStrategy; -import org.junit.Assert; -import org.junit.Test; - -public class AutoAckTopicTest { - - public static Link getLinkByTitle(LinkStrategy strategy, ClientResponse response, String title) { - return response.getLinkHeader().getLinkByTitle(title); - } - - //todo fix - //@Test - public void testSuccessFirst() throws Exception { - ClientRequest request = new ClientRequest("http://localhost:9095/topics/jms.topic.chat"); - - ClientResponse response = request.head(); - Assert.assertEquals("*****", 200, response.getStatus()); - Link sender = getLinkByTitle(null, response, "create"); - Link subscriptions = getLinkByTitle(null, response, "subscriptions"); - - /* - ClientResponse res = subscriptions.request().post(); - Assert.assertEquals(201, res.getStatus()); - Link sub1 = res.getLocation(); - Assert.assertNotNull(sub1); - Link consumeNext1 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - Assert.assertNotNull(consumeNext1); - System.out.println("consumeNext1: " + consumeNext1); - - - res = subscriptions.request().post(); - Assert.assertEquals(201, res.getStatus()); - Link sub2 = res.getLocation(); - Assert.assertNotNull(sub2); - Link consumeNext2 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - Assert.assertNotNull(consumeNext1); - - - res = sender.request().body("text/plain", Integer.toString(1)).post(); - Assert.assertEquals(201, res.getStatus()); - res = sender.request().body("text/plain", Integer.toString(2)).post(); - Assert.assertEquals(201, res.getStatus()); - - res = consumeNext1.request().post(String.class); - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals("1", res.getEntity(String.class)); - consumeNext1 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - - res = consumeNext1.request().post(String.class); - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals("2", res.getEntity(String.class)); - consumeNext1 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - - res = consumeNext2.request().post(String.class); - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals("1", res.getEntity(String.class)); - consumeNext2 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - - res = consumeNext2.request().post(String.class); - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals("2", res.getEntity(String.class)); - consumeNext2 = MessageTestBase.getLinkByTitle(manager.getTopicManager().getLinkStrategy(), res, "consume-next"); - Assert.assertEquals(204, sub1.request().delete().getStatus()); - Assert.assertEquals(204, sub2.request().delete().getStatus()); - */ - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/jms-to-rest/README.txt ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/README.txt b/examples/jms/rest/jms-to-rest/README.txt deleted file mode 100644 index f012d94..0000000 --- a/examples/jms/rest/jms-to-rest/README.txt +++ /dev/null @@ -1,49 +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 mixing JMS producers and consumers with REST producers and consumers. The REST clients have been -written in both Java using RESTEasy's client library and within the Python language. You will need Python 2.6.1 or higher -to be able to run the Python clients. - -To run the example you will need 5 shell-script windows (or you'll need to run 4 processes in background) - -Step 1: -$ mvn jetty:run - -This will bring up ActiveMQ Artemis and the ActiveMQ Artemis REST Interface. - -Step 2: -$ mvn exec:java -Dexec.mainClass="RestReceive" - -This will bring up a Java REST client that is continuously pulling the server through a consume-next (see doco for details). - -Step 3: -$ mvn exec:java -Dexec.mainClass="JmsReceive" - -This will bring up a Java JMS consumer that is using the MessageListener interface to consume messages. It will -extract a Order instance from the JMS Message it receives. - -Step 4: - -$ python receiveOrder.py - -This runs a very simple Python program to consume messages - -Step 5: -Use one of these three commands to post messages to the system. One of the receive clients will consume the message. - -$ mvn exec:java -Dexec.mainClass="JmsSend" - -A JMS client will create an Order object and send it to the queue. You'll see one of the 4 clients receive the message. -Notice that the REST clients automatically cause the Order object to be transformed on the server and passed as XML -to the REST client. - -$ mvn exec:java -Dexec.mainClass="RestSend" - -THis is a REST client that uses the Acknowledgement protocol to receive a message from the queue. - -$ python postOrder.py - -This is a Python client that posts one message to the queue RESTfully (of course ;) ) http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/rest/jms-to-rest/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/pom.xml b/examples/jms/rest/jms-to-rest/pom.xml deleted file mode 100644 index 0ccd4d8..0000000 --- a/examples/jms/rest/jms-to-rest/pom.xml +++ /dev/null @@ -1,170 +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>mixed-jms-rest</artifactId> - <packaging>war</packaging> - <name>Mixed JMS and REST Producers/Consumers</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> - </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/21bf4406/examples/jms/rest/jms-to-rest/postOrder.py ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/postOrder.py b/examples/jms/rest/jms-to-rest/postOrder.py deleted file mode 100644 index 3580986..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/receiveOrder.py ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/receiveOrder.py b/examples/jms/rest/jms-to-rest/receiveOrder.py deleted file mode 100644 index ce73f5c..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java deleted file mode 100644 index 8de4ab6..0000000 --- a/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java +++ /dev/null @@ -1,43 +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.ClientSessionFactory; -import org.apache.activemq.artemis.api.core.client.ActiveMQClient; -import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl; -import org.apache.activemq.artemis.core.config.FileDeploymentManager; -import org.apache.activemq.artemis.core.config.impl.FileConfiguration; -import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.jms.client.ActiveMQDestination; -import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory; - -import javax.jms.ConnectionFactory; -import javax.jms.Destination; - -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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java deleted file mode 100644 index 37de8a2..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java deleted file mode 100644 index bf3370e..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/Order.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/Order.java b/examples/jms/rest/jms-to-rest/src/main/java/Order.java deleted file mode 100644 index 2b938f7..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/RestReceive.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/RestReceive.java b/examples/jms/rest/jms-to-rest/src/main/java/RestReceive.java deleted file mode 100644 index 4fc493a..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/java/RestSend.java ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/java/RestSend.java b/examples/jms/rest/jms-to-rest/src/main/java/RestSend.java deleted file mode 100644 index 902c4f7..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml b/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml deleted file mode 100644 index 6fe4547..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/resources/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/artemis-roles.properties b/examples/jms/rest/jms-to-rest/src/main/resources/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/resources/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/artemis-users.properties b/examples/jms/rest/jms-to-rest/src/main/resources/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/resources/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/broker.xml b/examples/jms/rest/jms-to-rest/src/main/resources/broker.xml deleted file mode 100644 index 8cc0fa6..0000000 --- a/examples/jms/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/21bf4406/examples/jms/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/examples/jms/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml b/examples/jms/rest/jms-to-rest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e82738a..0000000 --- a/examples/jms/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>
