http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/ssl-enabled/src/main/resources/activemq/server0/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/broker.xml b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/broker.xml deleted file mode 100644 index f0de0fc..0000000 --- a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/broker.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version='1.0'?> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="urn:activemq" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - - <jms xmlns="urn:activemq:jms"> - <!--the queue used by the example--> - <queue name="exampleQueue"/> - </jms> - - <core xmlns="urn:activemq:core"> - - <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory> - - <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory> - - <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory> - - <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory> - - <!-- Acceptors --> - <acceptors> - <acceptor name="netty-ssl-acceptor">tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample</acceptor> - </acceptors> - - <!-- Other config --> - - <security-settings> - <!--security for example queue--> - <security-setting match="jms.queue.exampleQueue"> - <permission type="createDurableQueue" roles="guest"/> - <permission type="deleteDurableQueue" roles="guest"/> - <permission type="createNonDurableQueue" roles="guest"/> - <permission type="deleteNonDurableQueue" roles="guest"/> - <permission type="consume" roles="guest"/> - <permission type="send" roles="guest"/> - </security-setting> - </security-settings> - - </core> -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/ssl-enabled/src/main/resources/jndi.properties ---------------------------------------------------------------------- diff --git a/examples/jms/ssl-enabled/src/main/resources/jndi.properties b/examples/jms/ssl-enabled/src/main/resources/jndi.properties deleted file mode 100644 index 7929c7c..0000000 --- a/examples/jms/ssl-enabled/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:5500?sslEnabled=true&trustStorePath=activemq/server0/activemq.example.truststore&trustStorePassword=activemqexample -queue.queue/exampleQueue=exampleQueue http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/pom.xml b/examples/jms/static-selector/pom.xml deleted file mode 100644 index 0880cba..0000000 --- a/examples/jms/static-selector/pom.xml +++ /dev/null @@ -1,117 +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.jms</groupId> - <artifactId>jms-examples</artifactId> - <version>1.0.1-SNAPSHOT</version> - </parent> - - <artifactId>static-selector</artifactId> - <packaging>jar</packaging> - <name>ActiveMQ Artemis Static Selector Example</name> - - <properties> - <activemq.basedir>${project.basedir}/../../..</activemq.basedir> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>artemis-jms-client</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <profiles> - <profile> - <!-- specify -PnoServer if you don't want to start the server --> - <id>noServer</id> - <properties> - <noServer>true</noServer> - </properties> - </profile> - </profiles> - <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.StaticSelectorExample</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.jms</groupId> - <artifactId>static-selector</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/readme.html b/examples/jms/static-selector/readme.html deleted file mode 100644 index 171f15a..0000000 --- a/examples/jms/static-selector/readme.html +++ /dev/null @@ -1,60 +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 Static Message Selector Example</title> - <link rel="stylesheet" type="text/css" href="../common/common.css" /> - <link rel="stylesheet" type="text/css" href="../common/prettify.css" /> - <script type="text/javascript" src="../common/prettify.js"></script> - </head> - <body onload="prettyPrint()"> - <h1>Static Message Selector Example</h1> - - <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre> - - - <p>This example shows you how to configure a ActiveMQ Artemis queue with static message selectors (filters) - (to configure a static selector directly on a <em>JMS</em> queue, please see the - <a href="../static-selector-jms/readme.html">static-selector-jms example</a>).</p> - - <p>Static message selectors are ActiveMQ's extension to message selectors as defined in JMS spec 1.1. - Rather than specifying the selector in the application code, static message selectors are defined in one of - ActiveMQ's configuration files, broker.xml, as an element called 'filter' inside each queue - definition, like</p> - - <pre class="prettyprint"><code> - <queues> - <queue name="jms.queue.selectorQueue"> - <address>jms.queue.selectorQueue</address> - <filter string="color='red'"/> - </queue> - </queues> - </code></pre> - - <p>Once configured the queue 'selectorQueue' only delivers messages that are selected against the filter, i.e., - only the messages whose 'color' properties are of 'red' values can be received by its consumers. Those that don't match - the filter will be dropped by the queue and therefore will never be delivered to any of its consumers.</p> - - <p>In the example code, five messages with different 'color' property values are sent to queue 'selectorQueue'. One consumer - is created to receive messages from the queue. Of the five sent messages, two are of 'red' color properties, one is 'blue', - one is 'green' and one has not the 'color' property at all. The result is that the consumer only gets the two 'red' messages.</p> - - </body> -</html> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java b/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java deleted file mode 100644 index 08f9db9..0000000 --- a/examples/jms/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.activemq.artemis.jms.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.InitialContext; -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * A simple JMS example that shows how static message selectors work. - */ -public class StaticSelectorExample { - - public static void main(final String[] args) throws Exception { - AtomicBoolean result = new AtomicBoolean(true); - Connection connection = null; - InitialContext initialContext = null; - try { - // Step 1. Create an initial context to perform the JNDI lookup. - initialContext = new InitialContext(); - - // Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it. - Queue queue = (Queue) initialContext.lookup("queue/exampleQueue"); - - // Step 3. look-up the JMS connection factory object from JNDI - ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory"); - - // Step 4. Create a JMS Connection - connection = cf.createConnection(); - - // Step 5. Start the connection - connection.start(); - - // Step 6. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 7. Create a JMS Message Producer - MessageProducer producer = producerSession.createProducer(queue); - - // Step 8. Create a JMS Message Consumer that receives 'red' messages - MessageConsumer redConsumer = session.createConsumer(queue); - redConsumer.setMessageListener(new SimpleMessageListener("red", result)); - - // Step 9. Create five messages with different 'color' properties - TextMessage redMessage1 = session.createTextMessage("Red-1"); - redMessage1.setStringProperty("color", "red"); - TextMessage redMessage2 = session.createTextMessage("Red-2"); - redMessage2.setStringProperty("color", "red"); - TextMessage greenMessage = session.createTextMessage("Green"); - greenMessage.setStringProperty("color", "green"); - TextMessage blueMessage = session.createTextMessage("Blue"); - blueMessage.setStringProperty("color", "blue"); - TextMessage normalMessage = session.createTextMessage("No color"); - - // Step 10. Send the Messages - producer.send(redMessage1); - System.out.println("Message sent: " + redMessage1.getText()); - producer.send(greenMessage); - System.out.println("Message sent: " + greenMessage.getText()); - producer.send(blueMessage); - System.out.println("Message sent: " + blueMessage.getText()); - producer.send(redMessage2); - System.out.println("Message sent: " + redMessage2.getText()); - producer.send(normalMessage); - System.out.println("Message sent: " + normalMessage.getText()); - - // Step 11. Waiting for the message listener to check the received messages. - Thread.sleep(5000); - - if (!result.get()) - throw new IllegalStateException(); - } - finally { - // Step 12. Be sure to close our JMS resources! - if (initialContext != null) { - initialContext.close(); - } - if (connection != null) { - connection.close(); - } - } - } -} - -class SimpleMessageListener implements MessageListener { - - private final String name; - private AtomicBoolean result; - - public SimpleMessageListener(final String listener, AtomicBoolean result) { - name = listener; - this.result = result; - } - - public void onMessage(final Message msg) { - TextMessage textMessage = (TextMessage) msg; - try { - String colorProp = msg.getStringProperty("color"); - System.out.println("Receiver " + name + - " receives message [" + - textMessage.getText() + - "] with color property: " + - colorProp); - if (colorProp != null && !colorProp.equals(name)) { - result.set(false); - } - } - catch (JMSException e) { - e.printStackTrace(); - result.set(false); - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/static-selector/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/src/main/resources/activemq/server0/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/broker.xml b/examples/jms/static-selector/src/main/resources/activemq/server0/broker.xml deleted file mode 100644 index ca09b3b..0000000 --- a/examples/jms/static-selector/src/main/resources/activemq/server0/broker.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version='1.0'?> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="urn:activemq" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - - <jms xmlns="urn:activemq:jms"> - <!--the queue used by the example--> - <queue name="exampleQueue"/> - </jms> - - <core xmlns="urn:activemq:core"> - - <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory> - - <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory> - - <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory> - - <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory> - - <!-- Acceptors --> - <acceptors> - <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor> - </acceptors> - - <queues> - <queue name="jms.queue.exampleQueue"> - <address>jms.queue.exampleQueue</address> - <filter string="color='red'"/> - </queue> - </queues> - - <!-- Other config --> - - <security-settings> - <!--security for example queue--> - <security-setting match="jms.queue.exampleQueue"> - <permission type="createDurableQueue" roles="guest"/> - <permission type="deleteDurableQueue" roles="guest"/> - <permission type="createNonDurableQueue" roles="guest"/> - <permission type="deleteNonDurableQueue" roles="guest"/> - <permission type="consume" roles="guest"/> - <permission type="send" roles="guest"/> - </security-setting> - </security-settings> - - </core> -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/static-selector/src/main/resources/jndi.properties ---------------------------------------------------------------------- diff --git a/examples/jms/static-selector/src/main/resources/jndi.properties b/examples/jms/static-selector/src/main/resources/jndi.properties deleted file mode 100644 index 93537c4..0000000 --- a/examples/jms/static-selector/src/main/resources/jndi.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory -connectionFactory.ConnectionFactory=tcp://localhost:61616 -queue.queue/exampleQueue=exampleQueue http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.css ---------------------------------------------------------------------- diff --git a/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.css b/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.css deleted file mode 100644 index 1a75b9f..0000000 --- a/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.css +++ /dev/null @@ -1,102 +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. - */ - -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Helvetica Neue', Helvetica, Verdana, Arial, sans-serif; - padding: 10px; -} - -#disconnect { - display: none; -} - -#unsubscribe { - display: none; -} - -#subscribe { - display: none; -} - -#debug { - background-color: #F0F0F0; - font-size: 12px; - height: 75%; - overflow: auto; - padding: 10px; - position: absolute; - right: 10px; - top: 10px; - width: 250px; - z-index: 100; -} - -#send_form { - bottom: 5px; - position: absolute; - width: 99%; -} - -#send_form #send_form_input { - border: 1px solid #CCC; - font-size: 16px; - height: 20px; - padding: 5px; - width: 98%; -} - -#send_form input[disabled] { - background-color: #EEE; -} - -#messages { - bottom: 25px; - left: 0; - overflow: auto; - padding: 5px; - right: 0; - top: 2em; - z-index: -1; -} - -.message { - width: 95%; -} - -form dt { - clear:both; - width:19%; - float:left; - text-align:right; -} - -form dd { - float:left; - width:80%; - margin:0 0 0.5em 0.25em; -} - -input { - width: 320px; -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.js ---------------------------------------------------------------------- diff --git a/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.js b/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.js deleted file mode 100644 index a4fe2e8..0000000 --- a/examples/jms/stomp-websockets/aerogear-chat/aerogear-chat.js +++ /dev/null @@ -1,116 +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. - */ - -$( document ).ready( function () { - - var client, - destination; - - $( '#connect_form' ).submit( function ( e ) { - - e.preventDefault(); - - var url = $( '#connect_url' ).val(), - loginName = $( '#connect_login' ).val(), - passcode = $( '#connect_passcode' ).val(); - - destination = $( '#destination' ).val(); - - client = AeroGear.Notifier({ - name: 'stomp', - type: 'stompws', - settings: { - connectURL: url - } - }).clients.stomp; - - var debug = function ( str ) { - $( '#debug' ).append( str + "\n" ); - }, - onconnect = function () { - debug( 'connected to Stomp'); - $( '#connect' ).fadeOut({ - duration: 'fast' - }); - $( '#disconnect' ).fadeIn(); - $( '#send_form_input' ).removeAttr( 'disabled' ); - $( '#unsubscribe' ).fadeIn(); - - client.debug( debug ); - - var onsubscribe = function ( message ) { - $( '#messages' ).append( "<p>" + message.body + "</p>\n" ); - }; - - client.subscribe({ - address: destination, - callback: onsubscribe - }); - }; - - client.connect({ - login: loginName, - password: passcode, - onConnect: onconnect - }); - }); - - $( '#disconnect_form' ).submit( function ( e ) { - - e.preventDefault(); - - var ondisconnect = function () { - $( '#disconnect' ).fadeOut({ - duration: 'fast' - }); - $( '#unsubscribe' ).fadeOut({ - duration: 'fast' - }); - $( '#connect' ).fadeIn(); - $( '#send_form_input' ).attr( 'disabled', 'disabled' ); - $( '#messages' ).empty(); - $( '#debug' ).empty(); - }; - - client.disconnect( ondisconnect ); - }); - - $( '#unsubscribe_form' ).submit( function ( e ) { - - e.preventDefault(); - - client.unsubscribe( [{ address: destination }] ); - - $( '#unsubscribe' ).fadeOut({ - duration: 'fast' - }); - }); - - $( '#send_form' ).submit( function ( e ) { - - e.preventDefault(); - - var text = $( '#send_form_input' ).val(); - if (text) { - client.send( destination, text ); - $('#send_form_input').val( '' ); - } - }); - -}); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/stomp-websockets/aerogear-chat/aerogear-index.html ---------------------------------------------------------------------- diff --git a/examples/jms/stomp-websockets/aerogear-chat/aerogear-index.html b/examples/jms/stomp-websockets/aerogear-chat/aerogear-index.html deleted file mode 100644 index 434be6b..0000000 --- a/examples/jms/stomp-websockets/aerogear-chat/aerogear-index.html +++ /dev/null @@ -1,97 +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> -<html> - -<head> - <title>Chat Example Using Stomp Over Web Sockets</title> - <link rel="stylesheet" href="aerogear-chat.css" /> - <script src='http://code.jquery.com/jquery-1.9.1.min.js'></script> - <script src='stomp.js'></script> - <script src='aerogear.min.js'></script> - <script src='aerogear-chat.js'></script> - <script> - $(document).ready(function() { - var supported = ("WebSocket" in window); - if(!supported) { - var msg = "Your browser does not support Web Sockets. This example will not work properly.<br>"; - msg += "Please use a Web Browser with Web Sockets support (WebKit or Google Chrome)."; - $("#connect").html(msg); - } - }); - </script> -</head> -<body> - - <div id='connect'> - <form id='connect_form'> - <dl> - <dt> - <label for=connect_url>Server URL</label> - </dt> - <dd> - <input name=url id='connect_url' value='ws://localhost:61614/stomp'> - </dd> - <dt> - <label for=connect_login>Login</label> - </dt> - <dd> - <input id='connect_login' placeholder="User Login" value="guest"> - </dd> - <dt> - <label for=connect_passcode>Password</label> - </dt> - <dd> - <input id='connect_passcode' type=password placeholder="User Password" value="guest"> - </dd> - <dt> - <label for=destination>Destination</label> - </dt> - <dd> - <input id='destination' placeholder="Destination" value="jms.topic.chat"> - </dd> - <dt> </dt> - <dd> - <input type="submit" id='connect_submit' value="Connect"> - </dd> - </dl> - </form> - - <p>Use the form above to connect to the Stomp server and subscribe to the destination.</p> - <p>Once connected, you can send messages to the destination with the text field at the bottom of this page</p> - </div> - <div id="disconnect"> - <form id='disconnect_form'> - <input type="submit" id='disconnect_submit' value="Disconnect"> - </form> - </div> - <div id="unsubscribe"> - <form id='unsubscribe_form'> - <input type="submit" id='unsubscribe_submit' value="Unsubscribe"> - </form> - </div> - <pre id="debug"></pre> - <div id="messages"></div> - <form id='send_form'> - <input id='send_form_input' placeholder="Type your message here" disabled /> - </form> -</body> -</html> -
