http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java index daa8507..94d69ef 100644 --- a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java +++ b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java @@ -60,14 +60,14 @@ public class DivertExample extends ActiveMQExample initialContextLondon = getContext(0); // Step 2. Look-up the queue orderQueue on the London server - this is the queue any orders are sent to - Queue orderQueue = (Queue)initialContextLondon.lookup("/queue/orders"); + Queue orderQueue = (Queue)initialContextLondon.lookup("queue/orders"); // Step 3. Look-up the topic priceUpdates on the London server- this is the topic that any price updates are // sent to - Topic priceUpdates = (Topic)initialContextLondon.lookup("/topic/priceUpdates"); + Topic priceUpdates = (Topic)initialContextLondon.lookup("topic/priceUpdates"); // Step 4. Look-up the spy topic on the London server- this is what we will use to snoop on any orders - Topic spyTopic = (Topic)initialContextLondon.lookup("/topic/spyTopic"); + Topic spyTopic = (Topic)initialContextLondon.lookup("topic/spyTopic"); // Step 6. Create an initial context to perform the JNDI lookup on the New York server initialContextNewYork = getContext(1); @@ -79,13 +79,13 @@ public class DivertExample extends ActiveMQExample // them to the address newYorkPriceUpdates on the New York server where they will be distributed to the topic // subscribers on // the New York server - Topic newYorkPriceUpdates = (Topic)initialContextNewYork.lookup("/topic/newYorkPriceUpdates"); + Topic newYorkPriceUpdates = (Topic)initialContextNewYork.lookup("topic/newYorkPriceUpdates"); // Step 8. Perform a lookup on the Connection Factory on the London server - ConnectionFactory cfLondon = (ConnectionFactory)initialContextLondon.lookup("/ConnectionFactory"); + ConnectionFactory cfLondon = (ConnectionFactory)initialContextLondon.lookup("ConnectionFactory"); // Step 9. Perform a lookup on the Connection Factory on the New York server - ConnectionFactory cfNewYork = (ConnectionFactory)initialContextNewYork.lookup("/ConnectionFactory"); + ConnectionFactory cfNewYork = (ConnectionFactory)initialContextNewYork.lookup("ConnectionFactory"); // Step 10. Create a JMS Connection on the London server connectionLondon = cfLondon.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml index 8d78604..d82f40c 100644 --- a/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,38 +1,18 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - - <!-- the connection factory used by the example --> - - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> - <!-- Destinations used by the example --> <!-- The order queue --> - <queue name="orders"> - <entry name="/queue/orders"/> - </queue> + <queue name="orders"/> <!-- The queue that prices are forwarded to before being bridged to the New York server --> - <queue name="priceForwarding"> - <entry name="/queue/priceForwarding"/> - </queue> + <queue name="priceForwarding"/> <!-- The topic for price updates --> - <topic name="priceUpdates"> - <entry name="/topic/priceUpdates"/> - </topic> + <topic name="priceUpdates"/> <!-- The spy topic for snooping on orders --> - <topic name="spyTopic"> - <entry name="/topic/spyTopic"/> - </topic> + <topic name="spyTopic"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml index 97c9aab..8cb753a 100644 --- a/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml +++ b/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml @@ -1,24 +1,11 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - - <!-- the connection factory used by the example --> - - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!-- Destinations used by the example --> <!-- The topic for New York price updates --> - <topic name="newYorkPriceUpdates"> - <entry name="/topic/newYorkPriceUpdates"/> - </topic> + <topic name="newYorkPriceUpdates"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/pom.xml b/examples/jms/durable-subscription/pom.xml index 61c6f59..2149c87 100644 --- a/examples/jms/durable-subscription/pom.xml +++ b/examples/jms/durable-subscription/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.DurableSubscriptionExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java index c33027e..792e82e 100644 --- a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java +++ b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java @@ -50,10 +50,10 @@ public class DurableSubscriptionExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Look-up the JMS topic - Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic"); + Topic topic = (Topic)initialContext.lookup("topic/exampleTopic"); // Step 3. Look-up the JMS connection factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4. Create a JMS connection connection = cf.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml index 1dd09a6..ab4841d 100644 --- a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the topic used by the example--> - <topic name="exampleTopic"> - <entry name="/topic/exampleTopic"/> - </topic> + <topic name="exampleTopic"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties index 080524f..f68e7f7 100644 --- a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties +++ b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties @@ -1,3 +1,2 @@ -java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -java.naming.provider.url=jnp://localhost:1099 -java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces +java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory +java.naming.provider.url=tcp://localhost:5445 http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/embedded-simple/pom.xml b/examples/jms/embedded-simple/pom.xml index 251e5a9..1b01307 100644 --- a/examples/jms/embedded-simple/pom.xml +++ b/examples/jms/embedded-simple/pom.xml @@ -48,8 +48,8 @@ <configuration> <clientClass>org.apache.activemq.jms.example.EmbeddedExample</clientClass> <args> - <param>jnp://localhost:1099</param> - <param>jnp://localhost:1199</param> + <param>tcp://localhost:5445</param> + <param>tcp://localhost:5445</param> </args> <systemProperties> <property> @@ -96,11 +96,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java index 11103ec..e41a025 100644 --- a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java +++ b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java @@ -53,7 +53,7 @@ public class EmbeddedExample extends ActiveMQExample System.out.println("Started Embedded JMS Server"); ConnectionFactory cf = (ConnectionFactory)jmsServer.lookup("ConnectionFactory"); - Queue queue = (Queue)jmsServer.lookup("/queue/exampleQueue"); + Queue queue = (Queue)jmsServer.lookup("queue/exampleQueue"); // Step 10. Send and receive a message using JMS API Connection connection = null; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml b/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml index bce97ab..3758989 100644 --- a/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml +++ b/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="in-vm"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/embedded/pom.xml b/examples/jms/embedded/pom.xml index 98d854c..c6441f0 100644 --- a/examples/jms/embedded/pom.xml +++ b/examples/jms/embedded/pom.xml @@ -48,8 +48,8 @@ <configuration> <clientClass>org.apache.activemq.jms.example.EmbeddedExample</clientClass> <args> - <param>jnp://localhost:1099</param> - <param>jnp://localhost:1199</param> + <param>tcp://localhost:5445</param> + <param>tcp://localhost:5446</param> </args> <systemProperties> <property> @@ -100,11 +100,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> </plugin> </plugins> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/embedded/readme.html b/examples/jms/embedded/readme.html index 8964d14..195175e 100644 --- a/examples/jms/embedded/readme.html +++ b/examples/jms/embedded/readme.html @@ -30,36 +30,12 @@ <pre class="prettyprint"> <code>ActiveMQServer activemqServer = ActiveMQ.newActiveMQServer(configuration);</code> </pre> - - <li>Create and start the JNDI server (using JBoss JNDI implementation)</li> - <pre class="prettyprint"> - <code>System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); - NamingBeanImpl naming = new NamingBeanImpl(); - naming.start(); - Main jndiServer = new Main(); - jndiServer.setNamingInfo(naming); - jndiServer.setPort(1099); - jndiServer.setBindAddress("localhost"); - jndiServer.setRmiPort(1098); - jndiServer.setRmiBindAddress("localhost"); - jndiServer.start();</code> - </pre> <li>Create the JMS configuration</li> <pre class="prettyprint"> <code>JMSConfiguration jmsConfig = new JMSConfigurationImpl();</code> </pre> - <li>Configure context used to bind the JMS resources to JNDI</li> - <pre class="prettyprint"> - <code>Hashtable<String, String> env = new Hashtable<String, String>(); - env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); - env.put("java.naming.provider.url", "jnp://localhost:1099"); - env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); - Context context = new InitialContext(env); - jmsConfig.setContext(context);</code> - </pre> - <li>Configure the JMS ConnectionFactory</li> <pre class="prettyprint"> <code>TransportConfiguration connectorConfig = new TransportConfiguration(NettyConnectorFactory.class.getName()); @@ -101,8 +77,7 @@ <li>Stop the JNDI server</li> <pre class="prettyprint"> - <code>naming.stop(); - jndiServer.stop();</code> + <code>naming.stop();</code> </pre> </ol> </body> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java index 5c22d41..06fdb14 100644 --- a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java +++ b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java @@ -85,7 +85,7 @@ public final class EmbeddedExample extends ActiveMQExample jmsConfig.getConnectionFactoryConfigurations().add(cfConfig); // Step 4. Configure the JMS Queue - JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "/queue/queue1"); + JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "queue/queue1"); jmsConfig.getQueueConfigurations().add(queueConfig); // Step 5. Start the JMS Server using the ActiveMQ core server and the JMS configuration @@ -97,7 +97,7 @@ public final class EmbeddedExample extends ActiveMQExample // Step 6. Lookup JMS resources defined in the configuration ConnectionFactory cf = (ConnectionFactory)jmsServer.lookup("/cf"); - Queue queue = (Queue)jmsServer.lookup("/queue/queue1"); + Queue queue = (Queue)jmsServer.lookup("queue/queue1"); // Step 7. Send and receive a message using JMS API Connection connection = null; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/expiry/pom.xml b/examples/jms/expiry/pom.xml index ac0563c..70fc1ad 100644 --- a/examples/jms/expiry/pom.xml +++ b/examples/jms/expiry/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.ExpiryExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java index c086593..a74467c 100644 --- a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java +++ b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java @@ -51,10 +51,10 @@ public class ExpiryExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection connection = cf.createConnection(); @@ -91,7 +91,7 @@ public class ExpiryExample extends ActiveMQExample System.out.println("Received message from " + queue.getQueueName() + ": " + messageReceived); // Step 14. Perfom a lookup on the expiry queue - Queue expiryQueue = (Queue)initialContext.lookup("/queue/expiryQueue"); + Queue expiryQueue = (Queue)initialContext.lookup("queue/expiryQueue"); // Step 15. Create a JMS Message Consumer for the expiry queue MessageConsumer expiryConsumer = session.createConsumer(expiryQueue); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml index 96ae117..d41da70 100644 --- a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,24 +1,11 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> <!--the expiry queue where expired messages will be sent--> - <queue name="expiryQueue"> - <entry name="/queue/expiryQueue"/> - </queue> + <queue name="expiryQueue"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/ha-policy-autobackup/pom.xml b/examples/jms/ha-policy-autobackup/pom.xml index 2b7fe80..86f5d47 100644 --- a/examples/jms/ha-policy-autobackup/pom.xml +++ b/examples/jms/ha-policy-autobackup/pom.xml @@ -71,8 +71,8 @@ <configuration> <clientClass>org.apache.activemq.jms.example.HAPolicyAutoBackupExample</clientClass> <args> - <param>jnp://localhost:1099</param> - <param>jnp://localhost:1199</param> + <param>tcp://localhost:5445</param> + <param>tcp://localhost:5446</param> </args> <systemProperties> <property> @@ -137,11 +137,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java index d3860d4..3eebb40 100644 --- a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java +++ b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java @@ -67,11 +67,11 @@ public class HAPolicyAutoBackupExample extends ActiveMQExample ic1 = getContext(1); // Step 2. Look-up the JMS Queue object from JNDI - Queue queue = (Queue) ic0.lookup("/queue/exampleQueue"); + Queue queue = (Queue) ic0.lookup("queue/exampleQueue"); // Step 3. Look-up a JMS Connection Factory object from JNDI on server 0 and 1 - ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("/ConnectionFactory"); - ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("/ConnectionFactory"); + ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("ConnectionFactory"); + ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("ConnectionFactory"); // Step 6. We create JMS Connections to server 0 and 1 connection0 = cf0.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml index 28e738b..847659f 100644 --- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,30 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - <ha>true</ha> - <!-- Pause 1 second between connect attempts --> - <retry-interval>1000</retry-interval> - - <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to - implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect - pause is the same length --> - <retry-interval-multiplier>1.0</retry-interval-multiplier> - - <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") --> - <reconnect-attempts>-1</reconnect-attempts> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/http-transport/pom.xml b/examples/jms/http-transport/pom.xml index f136dbb..24a5f54 100644 --- a/examples/jms/http-transport/pom.xml +++ b/examples/jms/http-transport/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.HttpTransportExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java index 46c5c94..efba974 100644 --- a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java +++ b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java @@ -50,10 +50,10 @@ public class HttpTransportExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection connection = cf.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml index 452b958..847659f 100644 --- a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/instantiate-connection-factory/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/instantiate-connection-factory/pom.xml b/examples/jms/instantiate-connection-factory/pom.xml index a5fce8d..4b60d79 100644 --- a/examples/jms/instantiate-connection-factory/pom.xml +++ b/examples/jms/instantiate-connection-factory/pom.xml @@ -62,7 +62,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.InstantiateConnectionFactoryExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -109,11 +109,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/interceptor/pom.xml b/examples/jms/interceptor/pom.xml index 9e7b439..34dff8c 100644 --- a/examples/jms/interceptor/pom.xml +++ b/examples/jms/interceptor/pom.xml @@ -57,7 +57,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.InterceptorExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -104,11 +104,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java index 325b536..e2b2b40 100644 --- a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java +++ b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java @@ -50,10 +50,10 @@ public class InterceptorExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perform a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection connection = cf.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml index 3058fc8..0d5c953 100644 --- a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jaas/pom.xml b/examples/jms/jaas/pom.xml index f3bcb55..1ce345b 100644 --- a/examples/jms/jaas/pom.xml +++ b/examples/jms/jaas/pom.xml @@ -75,7 +75,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JAASExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -122,11 +122,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java index 80307ac..7813924 100644 --- a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java +++ b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java @@ -51,10 +51,10 @@ public class JAASExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection with user "jboss" and password "redhat" connection = cf.createConnection("jboss", "redhat"); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml index 3058fc8..0d5c953 100644 --- a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-auto-closeable/pom.xml b/examples/jms/jms-auto-closeable/pom.xml index 8468aa4..d0c49da 100644 --- a/examples/jms/jms-auto-closeable/pom.xml +++ b/examples/jms/jms-auto-closeable/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMSAutoCloseableExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java index fa58f45..d832771 100644 --- a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java +++ b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java @@ -43,10 +43,10 @@ public class JMSAutoCloseableExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Context using the try-with-resources statement try http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml index 3058fc8..0d5c953 100644 --- a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/pom.xml b/examples/jms/jms-bridge/pom.xml index fec058c..20231fc 100644 --- a/examples/jms/jms-bridge/pom.xml +++ b/examples/jms/jms-bridge/pom.xml @@ -77,8 +77,8 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMSBridgeExample</clientClass> <args> - <param>jnp://localhost:1099</param> - <param>jnp://localhost:1199</param> + <param>tcp://localhost:5445</param> + <param>tcp://localhost:5455</param> </args> <systemProperties> <property> @@ -143,11 +143,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/readme.html b/examples/jms/jms-bridge/readme.html index 6a5959b..827d173 100644 --- a/examples/jms/jms-bridge/readme.html +++ b/examples/jms/jms-bridge/readme.html @@ -11,8 +11,8 @@ <img src="jms-bridge.png" /> <p>The example will use two ActiveMQ servers:</p> <ul> - <li>Server #0 – the <em>Source</em> server. It will be configured with a JMS Topic bound to JNDI under <code>/source/topic</code> - <li>Server #1 – the <em>Target</em> server. It will be configured with a JMS Queue bound to JNDI under <code>/target/queue</code><br /> + <li>Server #0 – the <em>Source</em> server. It will be configured with a JMS Topic bound to JNDI under <code>source/topic</code> + <li>Server #1 – the <em>Target</em> server. It will be configured with a JMS Queue bound to JNDI under <code>target/queue</code><br /> </ul> <p>Both ActiveMQ server will run their own JNDI server used by the JMS Bridge and the JMS Client to lookup JMS resources (ConnectionFactory and Destination).</p> @@ -102,10 +102,10 @@ <li>We then create a JMS Bridge and start it, Note, the Bridge needs a transaction manager, in this instance we will use the JBoss TM</li> <pre class="prettyprint"> JMSBridge jmsBridge = new JMSBridgeImpl( - new JNDIConnectionFactoryFactory(sourceJndiParams, "/source/ConnectionFactory"), - new JNDIConnectionFactoryFactory(targetJndiParams, "/target/ConnectionFactory"), - new JNDIDestinationFactory(sourceJndiParams, "/source/topic"), - new JNDIDestinationFactory(targetJndiParams, "/target/queue"), + new JNDIConnectionFactoryFactory(sourceJndiParams, "source/ConnectionFactory"), + new JNDIConnectionFactoryFactory(targetJndiParams, "target/ConnectionFactory"), + new JNDIDestinationFactory(sourceJndiParams, "source/topic"), + new JNDIDestinationFactory(targetJndiParams, "target/queue"), null, null, null, @@ -125,8 +125,8 @@ </pre> <li>We look up the JMS resources from the Source server</li> <pre class="prettyprint"> - ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("/source/ConnectionFactory"); - Topic sourceTopic = (Topic)sourceContext.lookup("/source/topic"); + ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("source/ConnectionFactory"); + Topic sourceTopic = (Topic)sourceContext.lookup("source/topic"); </pre> <li>We create JMS objects to send a message to the source destination</li> @@ -153,8 +153,8 @@ <li>We look up the JMS resources from the target server</li> <pre class="prettyprint"> - ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/target/ConnectionFactory"); - Queue targetQueue = (Queue)targetContext.lookup("/target/queue"); + ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("target/ConnectionFactory"); + Queue targetQueue = (Queue)targetContext.lookup("target/queue"); </pre> <li>We create JMS objects to receive a message from the target destination</li> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java index 690deaf..0126251 100644 --- a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java +++ b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java @@ -66,10 +66,10 @@ public class JMSBridgeExample // Step 2. Create and start a JMS Bridge // Note, the Bridge needs a transaction manager, in this instance we will use the JBoss TM JMSBridge jmsBridge = new JMSBridgeImpl( - new JNDIConnectionFactoryFactory(sourceJndiParams, "/source/ConnectionFactory"), - new JNDIConnectionFactoryFactory(targetJndiParams, "/target/ConnectionFactory"), - new JNDIDestinationFactory(sourceJndiParams, "/source/topic"), - new JNDIDestinationFactory(targetJndiParams, "/target/queue"), + new JNDIConnectionFactoryFactory(sourceJndiParams, "source/ConnectionFactory"), + new JNDIConnectionFactoryFactory(targetJndiParams, "target/ConnectionFactory"), + new JNDIDestinationFactory(sourceJndiParams, "source/topic"), + new JNDIDestinationFactory(targetJndiParams, "target/queue"), null, null, null, @@ -111,8 +111,8 @@ public class JMSBridgeExample sourceConnection.close(); // Step 7. Lookup the *target* JMS resources - ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/client/ConnectionFactory"); - Queue targetQueue = (Queue)targetContext.lookup("/target/queue"); + ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("client/ConnectionFactory"); + Queue targetQueue = (Queue)targetContext.lookup("target/queue"); // Step 8. Create a connection, a session and a message consumer for the *target* queue targetConnection = targetConnectionFactory.createConnection(); @@ -168,8 +168,7 @@ public class JMSBridgeExample { Hashtable<String, String> jndiProps = new Hashtable<String, String>(); jndiProps.put("java.naming.provider.url", server); - jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); - jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + jndiProps.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory"); return jndiProps; } } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml index c9beb0e..e2bb478 100644 --- a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml @@ -2,26 +2,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <connection-factory name="ConnectionFactory"> - <xa>true</xa> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="/source/ConnectionFactory"/> - </entries> - </connection-factory> + <topic name="topic"/> - <connection-factory name="ClientConnectionFactory"> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="/client/ConnectionFactory"/> - </entries> - </connection-factory> - - <topic name="topic"> - <entry name="/source/topic"/> - </topic> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties deleted file mode 100644 index 66bc507..0000000 --- a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties +++ /dev/null @@ -1,2 +0,0 @@ -java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml index d496c12..0f89939 100644 --- a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml +++ b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml @@ -2,26 +2,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <connection-factory name="ConnectionFactory"> - <xa>true</xa> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="/target/ConnectionFactory"/> - </entries> - </connection-factory> + <queue name="target"/> - <connection-factory name="ClientConnectionFactory"> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="/client/ConnectionFactory"/> - </entries> - </connection-factory> - - <queue name="target"> - <entry name="/target/queue"/> - </queue> </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties ---------------------------------------------------------------------- diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties deleted file mode 100644 index 66bc507..0000000 --- a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties +++ /dev/null @@ -1,2 +0,0 @@ -java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-completion-listener/pom.xml b/examples/jms/jms-completion-listener/pom.xml index 302d535..c7909ab 100644 --- a/examples/jms/jms-completion-listener/pom.xml +++ b/examples/jms/jms-completion-listener/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMSCompletionListenerExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java index 7be10ac..fdb66fe 100644 --- a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java +++ b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java @@ -52,10 +52,10 @@ public class JMSCompletionListenerExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Context jmsContext = cf.createContext(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml index 3058fc8..0d5c953 100644 --- a/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-context/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-context/pom.xml b/examples/jms/jms-context/pom.xml index e2737e5..8371058 100644 --- a/examples/jms/jms-context/pom.xml +++ b/examples/jms/jms-context/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMSContextExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java index 16f7d42..9a78e7c 100644 --- a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java +++ b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java @@ -47,10 +47,10 @@ public class JMSContextExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Context jmsContext = cf.createContext(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-shared-consumer/pom.xml b/examples/jms/jms-shared-consumer/pom.xml index 7c2bd38..c59597a 100644 --- a/examples/jms/jms-shared-consumer/pom.xml +++ b/examples/jms/jms-shared-consumer/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMSSharedConsumerExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java index 524d8af..70c8ec5 100644 --- a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java +++ b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java @@ -55,10 +55,10 @@ public class JMSSharedConsumerExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Topic topic = (Topic) initialContext.lookup("/topic/exampleTopic"); + Topic topic = (Topic) initialContext.lookup("topic/exampleTopic"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Context jmsContext = cf.createContext(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml index 8c54278..a053116 100644 --- a/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the topic used by the example--> - <topic name="exampleTopic"> - <entry name="/topic/exampleTopic"/> - </topic> + <topic name="exampleTopic"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jmx/pom.xml b/examples/jms/jmx/pom.xml index ede344e..88d0ae6 100644 --- a/examples/jms/jmx/pom.xml +++ b/examples/jms/jmx/pom.xml @@ -80,7 +80,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.JMXExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -127,11 +127,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java index 17a24b4..af7e21f 100644 --- a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java +++ b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java @@ -63,10 +63,10 @@ public class JMXExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory"); + QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection connection = cf.createQueueConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml index 2fa9178..b53cafe 100644 --- a/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,19 +1,9 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory" signature="queue"> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> + <queue name="exampleQueue"/> </queue> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/large-message/pom.xml b/examples/jms/large-message/pom.xml index b1db82f..312ca1a 100644 --- a/examples/jms/large-message/pom.xml +++ b/examples/jms/large-message/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.LargeMessageExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> <systemProperties> <property> @@ -105,11 +105,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java index 9d3cddc..7ffc7b9 100644 --- a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java +++ b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java @@ -70,12 +70,12 @@ public class LargeMessageExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory. This ConnectionFactory has a special attribute set on // it. // Messages with more than 10K are considered large - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4. Create the JMS objects connection = cf.createConnection(); @@ -139,9 +139,9 @@ public class LargeMessageExample extends ActiveMQExample initialContext = getContext(0); - queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + queue = (Queue)initialContext.lookup("queue/exampleQueue"); - cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); connection = cf.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml index cfd7043..0d5c953 100644 --- a/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,20 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <min-large-message-size>10240</min-large-message-size> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> </configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/last-value-queue/pom.xml b/examples/jms/last-value-queue/pom.xml index b138e82..bfefd5f 100644 --- a/examples/jms/last-value-queue/pom.xml +++ b/examples/jms/last-value-queue/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.LastValueQueueExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java index 73e2ff2..d62ea0b 100644 --- a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java +++ b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java @@ -55,10 +55,10 @@ public class LastValueQueueExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/lastValueQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection, session and producer on the queue connection = cf.createConnection(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml index ad731a8..847659f 100644 --- a/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,18 +1,8 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty-connector"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="lastValueQueue"> - <entry name="/queue/lastValueQueue"/> - </queue> + <queue name="exampleQueue"/> + </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/management-notifications/pom.xml b/examples/jms/management-notifications/pom.xml index 605b4eb..4afe1d4 100644 --- a/examples/jms/management-notifications/pom.xml +++ b/examples/jms/management-notifications/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.ManagementNotificationExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java index f33decd..b98f825 100644 --- a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java +++ b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java @@ -55,10 +55,10 @@ public class ManagementNotificationExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perform a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); + ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS connection, a session and a producer for the queue connection = cf.createConnection(); @@ -66,7 +66,7 @@ public class ManagementNotificationExample extends ActiveMQExample MessageProducer producer = session.createProducer(queue); // Step 5. Perform a lookup on the notifications topic - Topic notificationsTopic = (Topic)initialContext.lookup("/topic/notificationsTopic"); + Topic notificationsTopic = (Topic)initialContext.lookup("topic/notificationsTopic"); // Step 6. Create a JMS message consumer for the notification queue and set its message listener // It will display all the properties of the JMS Message http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml ---------------------------------------------------------------------- diff --git a/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml index 7b997ee..65e5a5c 100644 --- a/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml +++ b/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml @@ -1,23 +1,11 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd"> - <!--the connection factory used by the example--> - <connection-factory name="ConnectionFactory"> - <connectors> - <connector-ref connector-name="netty"/> - </connectors> - <entries> - <entry name="ConnectionFactory"/> - </entries> - </connection-factory> <!--the queue used by the example--> - <queue name="exampleQueue"> - <entry name="/queue/exampleQueue"/> - </queue> + <queue name="exampleQueue"/> <!--the notifications topic used by the example--> - <topic name="notificationsTopic"> - <entry name="/topic/notificationsTopic"/> - </topic> + <topic name="notificationsTopic"/> + </configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/management/pom.xml b/examples/jms/management/pom.xml index 41192c6..8fecd6f 100644 --- a/examples/jms/management/pom.xml +++ b/examples/jms/management/pom.xml @@ -52,7 +52,7 @@ <configuration> <clientClass>org.apache.activemq.jms.example.ManagementExample</clientClass> <args> - <param>jnp://localhost:1099</param> + <param>tcp://localhost:5445</param> </args> </configuration> </execution> @@ -99,11 +99,6 @@ <artifactId>jboss-jms-api</artifactId> <version>1.1.0.GA</version> </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnpserver</artifactId> - <version>5.0.3.GA</version> - </dependency> </dependencies> <configuration> <waitOnStart>false</waitOnStart> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java index e7af331..1ab1ac4 100644 --- a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java +++ b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java @@ -55,10 +55,10 @@ public class ManagementExample extends ActiveMQExample initialContext = getContext(0); // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue"); + Queue queue = (Queue)initialContext.lookup("queue/exampleQueue"); // Step 3. Perform a lookup on the Connection Factory - QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory"); + QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory"); // Step 4.Create a JMS Connection connection = cf.createQueueConnection();
