[jboss-cvs] JBoss Messaging SVN: r6336 - in trunk/examples/jms: browser/src/org/jboss/jms/example and 33 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 7 07:29:18 EDT 2009


Author: ataylor
Date: 2009-04-07 07:29:18 -0400 (Tue, 07 Apr 2009)
New Revision: 6336

Added:
   trunk/examples/jms/browser/server0/client-jndi.properties
   trunk/examples/jms/clustered-queue/server0/client-jndi.properties
   trunk/examples/jms/clustered-queue/server1/client-jndi.properties
   trunk/examples/jms/clustered-topic/server0/client-jndi.properties
   trunk/examples/jms/clustered-topic/server1/client-jndi.properties
   trunk/examples/jms/dead-letter/server0/client-jndi.properties
   trunk/examples/jms/durable-subscription/server0/client-jndi.properties
   trunk/examples/jms/expiry/server0/client-jndi.properties
   trunk/examples/jms/large-message/server0/client-jndi.properties
   trunk/examples/jms/paging/server0/client-jndi.properties
   trunk/examples/jms/queue-requestor/server0/client-jndi.properties
   trunk/examples/jms/queue/server0/client-jndi.properties
   trunk/examples/jms/request-reply/server0/client-jndi.properties
   trunk/examples/jms/temp-queue/server0/client-jndi.properties
   trunk/examples/jms/topic-selector/server0/client-jndi.properties
   trunk/examples/jms/topic/server0/client-jndi.properties
   trunk/examples/jms/transactional/server0/client-jndi.properties
Removed:
   trunk/examples/jms/clustered-queue/config/
   trunk/examples/jms/clustered-topic/config/
   trunk/examples/jms/request-reply/config/
   trunk/examples/jms/temp-queue/config/
Modified:
   trunk/examples/jms/browser/src/org/jboss/jms/example/QueueBrowserExample.java
   trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
   trunk/examples/jms/dead-letter/src/org/jboss/jms/example/DeadLetterExample.java
   trunk/examples/jms/durable-subscription/src/org/jboss/jms/example/DurableSubscriptionExample.java
   trunk/examples/jms/expiry/src/org/jboss/jms/example/ExpiryExample.java
   trunk/examples/jms/large-message/src/org/jboss/jms/example/LargeMessageExample.java
   trunk/examples/jms/paging/src/org/jboss/jms/example/PagingExample.java
   trunk/examples/jms/queue-requestor/src/org/jboss/jms/example/QueueRequestorExample.java
   trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java
   trunk/examples/jms/request-reply/src/org/jboss/jms/example/RequestReplyExample.java
   trunk/examples/jms/temp-queue/src/org/jboss/jms/example/TemporaryQueueExample.java
   trunk/examples/jms/topic-selector/src/org/jboss/jms/example/TopicSelectorExample.java
   trunk/examples/jms/topic/src/org/jboss/jms/example/TopicExample.java
   trunk/examples/jms/transactional/src/org/jboss/jms/example/TransactionalExample.java
Log:
tidied examples

Copied: trunk/examples/jms/browser/server0/client-jndi.properties (from rev 6328, trunk/examples/jms/common/config/client-jndi.properties)
===================================================================
--- trunk/examples/jms/browser/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/browser/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/browser/src/org/jboss/jms/example/QueueBrowserExample.java
===================================================================
--- trunk/examples/jms/browser/src/org/jboss/jms/example/QueueBrowserExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/browser/src/org/jboss/jms/example/QueueBrowserExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -22,8 +22,6 @@
 
 package org.jboss.jms.example;
 
-import java.util.Enumeration;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -33,6 +31,7 @@
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
+import java.util.Enumeration;
 
 /**
  * A simple example which shows how to use a QueueBrowser to look at messages of a queue without removing them from the queue
@@ -56,7 +55,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Perfom a lookup on the queue
          Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/clustered-queue/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/clustered-queue/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-queue/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Copied: trunk/examples/jms/clustered-queue/server1/client-jndi.properties (from rev 6331, trunk/examples/jms/clustered-queue/config/client-jndi.properties)
===================================================================
--- trunk/examples/jms/clustered-queue/server1/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-queue/server1/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:2099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/clustered-topic/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/clustered-topic/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-topic/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Copied: trunk/examples/jms/clustered-topic/server1/client-jndi.properties (from rev 6328, trunk/examples/jms/clustered-topic/config/client-jndi.properties)
===================================================================
--- trunk/examples/jms/clustered-topic/server1/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-topic/server1/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:2099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Modified: trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -24,7 +24,8 @@
 import javax.jms.Connection;
 import javax.jms.JMSException;
 import javax.naming.InitialContext;
-import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
 import java.util.Properties;
 import java.util.logging.Logger;
 
@@ -96,11 +97,13 @@
       reportResultAndExit();
    }
 
-   protected InitialContext getContext() throws Exception
+   protected InitialContext getContext(int serverId) throws Exception
    {
-      URL url = Thread.currentThread().getContextClassLoader().getResource("client-jndi.properties");
+      String jndiFilename = "server" + serverId + "/client-jndi.properties";
+      File jndiFile = new File(jndiFilename);
+      log.info("using " + jndiFile + " for jndi");
       Properties props = new Properties();
-      props.load(url.openStream());
+      props.load(new FileInputStream(jndiFile));
       return new InitialContext(props);
    }
 
@@ -131,16 +134,6 @@
          server.destroy();
       }
    }
-
-   private String[][] getServerNames(String[] args)
-   {
-      String[][] actArgs = new String[args.length][1];
-      for (int i = 0; i < args.length; i++)
-      {
-         actArgs[i][0] = args[i].trim();
-      }
-      return actArgs;
-   }
    
    private void reportResultAndExit()
    {

Added: trunk/examples/jms/dead-letter/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/dead-letter/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/dead-letter/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/dead-letter/src/org/jboss/jms/example/DeadLetterExample.java
===================================================================
--- trunk/examples/jms/dead-letter/src/org/jboss/jms/example/DeadLetterExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/dead-letter/src/org/jboss/jms/example/DeadLetterExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -51,7 +51,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Perfom a lookup on the queue
          Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/durable-subscription/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/durable-subscription/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/durable-subscription/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/durable-subscription/src/org/jboss/jms/example/DurableSubscriptionExample.java
===================================================================
--- trunk/examples/jms/durable-subscription/src/org/jboss/jms/example/DurableSubscriptionExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/durable-subscription/src/org/jboss/jms/example/DurableSubscriptionExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -49,7 +49,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Look-up the JMS topic
          Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");

Added: trunk/examples/jms/expiry/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/expiry/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/expiry/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/expiry/src/org/jboss/jms/example/ExpiryExample.java
===================================================================
--- trunk/examples/jms/expiry/src/org/jboss/jms/example/ExpiryExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/expiry/src/org/jboss/jms/example/ExpiryExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -50,7 +50,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Perfom a lookup on the queue
          Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/large-message/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/large-message/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/large-message/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/large-message/src/org/jboss/jms/example/LargeMessageExample.java
===================================================================
--- trunk/examples/jms/large-message/src/org/jboss/jms/example/LargeMessageExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/large-message/src/org/jboss/jms/example/LargeMessageExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -49,7 +49,7 @@
       try
       {
          //Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          //Step 2. Perfom a lookup on the queue
          Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/paging/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/paging/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/paging/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/paging/src/org/jboss/jms/example/PagingExample.java
===================================================================
--- trunk/examples/jms/paging/src/org/jboss/jms/example/PagingExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/paging/src/org/jboss/jms/example/PagingExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -51,7 +51,7 @@
       try
       {
          //Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          //Step 2. Perform a lookup on the Connection Factory
          ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");

Added: trunk/examples/jms/queue/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/queue/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/queue/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java
===================================================================
--- trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -49,7 +49,7 @@
       try
       {
          //Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          //Step 2. Perfom a lookup on the queue
          Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/queue-requestor/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/queue-requestor/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/queue-requestor/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/queue-requestor/src/org/jboss/jms/example/QueueRequestorExample.java
===================================================================
--- trunk/examples/jms/queue-requestor/src/org/jboss/jms/example/QueueRequestorExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/queue-requestor/src/org/jboss/jms/example/QueueRequestorExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -50,7 +50,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Perfom a lookup on the queue
          Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");

Added: trunk/examples/jms/request-reply/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/request-reply/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/request-reply/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/request-reply/src/org/jboss/jms/example/RequestReplyExample.java
===================================================================
--- trunk/examples/jms/request-reply/src/org/jboss/jms/example/RequestReplyExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/request-reply/src/org/jboss/jms/example/RequestReplyExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -21,9 +21,6 @@
    */
 package org.jboss.jms.example;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
@@ -37,6 +34,8 @@
 import javax.jms.TemporaryQueue;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * A simple JMS example that shows how to use Request/Replay style messaging.
@@ -64,7 +63,7 @@
          server.start();
 
          //Step 2. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          //Step 3. Lookup the queue for sending the request message
          Queue requestQueue = (Queue) initialContext.lookup("/queue/exampleQueue");         
@@ -154,7 +153,7 @@
       public void start() throws Exception
       {
          //Get an initial context to perform the JNDI lookup.
-         InitialContext initialContext = getContext();
+         InitialContext initialContext = getContext(0);
 
          //Lookup the queue to receive the request message
          Queue requestQueue = (Queue) initialContext.lookup("/queue/exampleQueue");         

Added: trunk/examples/jms/temp-queue/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/temp-queue/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/temp-queue/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/temp-queue/src/org/jboss/jms/example/TemporaryQueueExample.java
===================================================================
--- trunk/examples/jms/temp-queue/src/org/jboss/jms/example/TemporaryQueueExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/temp-queue/src/org/jboss/jms/example/TemporaryQueueExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -50,7 +50,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Look-up the JMS connection factory
          ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");

Added: trunk/examples/jms/topic/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/topic/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/topic/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/topic/src/org/jboss/jms/example/TopicExample.java
===================================================================
--- trunk/examples/jms/topic/src/org/jboss/jms/example/TopicExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/topic/src/org/jboss/jms/example/TopicExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -23,16 +23,12 @@
 
 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.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.naming.InitialContext;
-import java.util.concurrent.CountDownLatch;
 
 /**
  * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message.
@@ -53,7 +49,7 @@
       try
       {
          ///Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          //Step 2. perform a lookup on the topic
          Topic topic = (Topic) initialContext.lookup("/topic/exampleTopic");

Added: trunk/examples/jms/topic-selector/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/topic-selector/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/topic-selector/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/topic-selector/src/org/jboss/jms/example/TopicSelectorExample.java
===================================================================
--- trunk/examples/jms/topic-selector/src/org/jboss/jms/example/TopicSelectorExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/topic-selector/src/org/jboss/jms/example/TopicSelectorExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -51,7 +51,7 @@
       {
 
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Look-up the JMS topic
          Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");

Added: trunk/examples/jms/transactional/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/transactional/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/transactional/server0/client-jndi.properties	2009-04-07 11:29:18 UTC (rev 6336)
@@ -0,0 +1,3 @@
+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

Modified: trunk/examples/jms/transactional/src/org/jboss/jms/example/TransactionalExample.java
===================================================================
--- trunk/examples/jms/transactional/src/org/jboss/jms/example/TransactionalExample.java	2009-04-07 11:10:00 UTC (rev 6335)
+++ trunk/examples/jms/transactional/src/org/jboss/jms/example/TransactionalExample.java	2009-04-07 11:29:18 UTC (rev 6336)
@@ -49,7 +49,7 @@
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext();
+         initialContext = getContext(0);
 
          // Step 2. Look-up the JMS topic
          Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");




More information about the jboss-cvs-commits mailing list