qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r605609 - in /incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample: common/BaseExample.java direct/Producer.java pubsub/Listener.java pubsub/Publisher.java
Date Wed, 19 Dec 2007 16:37:53 GMT
Author: arnaudsimon
Date: Wed Dec 19 08:37:52 2007
New Revision: 605609

URL: http://svn.apache.org/viewvc?rev=605609&view=rev
Log:
fixed speling issues and pubsub ones

Modified:
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/common/BaseExample.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/Producer.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Publisher.java

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/common/BaseExample.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/common/BaseExample.java?rev=605609&r1=605608&r2=605609&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/common/BaseExample.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/common/BaseExample.java
Wed Dec 19 08:37:52 2007
@@ -49,7 +49,7 @@
     private static final String DEFAULT_CONNECTION_FACTORY_NAME = "ConnectionFactory";
 
     /* Default number of messages to process. */
-    private static final int DEFAULT_NUMBER_MESSAGES = 10;
+    private static final int DEFAULT_NUMBER_MESSAGES = 1;
 
     /* JNDI provider URL. */
     private String _providerURL;
@@ -146,7 +146,7 @@
             Hashtable<String, String> jndiEnvironment = new Hashtable<String, String>();
             jndiEnvironment.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY_NAME);
             jndiEnvironment.put("connectionfactory.ConnectionFactory",
-                                "qpid:password=guest;username=guest;client_id=clientid;virtualhost=test@tcp:127.0.0.1:5672");
+                                "qpid:password=guest;username=guest;client_id=clientid;virtualhost=test@tcp:192.168.1.11:5672");
             if (getProviderURL() != null)
             {
                 jndiEnvironment.put(Context.PROVIDER_URL, getProviderURL());

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/Producer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/Producer.java?rev=605609&r1=605608&r2=605609&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/Producer.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/Producer.java
Wed Dec 19 08:37:52 2007
@@ -73,7 +73,7 @@
             Queue   destination = session.createQueue(_queueName);
 
             // Create a Message producer
-            System.out.println(CLASS + ": Creating a Message PRoducer");
+            System.out.println(CLASS + ": Creating a Message Producer");
             MessageProducer messageProducer = session.createProducer(destination);
 
             // Create a Message

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java?rev=605609&r1=605608&r2=605609&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
Wed Dec 19 08:37:52 2007
@@ -95,7 +95,7 @@
             // lookup the topics usa
             Topic topic = session.createTopic("usa.#");
             // Create a Message Subscriber
-            System.out.println(CLASS + ": Creating a Message Subscriber");
+            System.out.println(CLASS + ": Creating a Message Subscriber fpr topic usa.#");
             TopicSubscriber messageSubscriber = session.createSubscriber(topic);
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new MyMessageListener("usa"));
@@ -103,7 +103,7 @@
             // lookup the topics world.usa.news
             topic = session.createTopic("europe.#");
             // Create a Message Subscriber
-            System.out.println(CLASS + ": Creating a Message Subscriber");
+            System.out.println(CLASS + ": Creating a Message Subscriber for topic europe.#");
             messageSubscriber = session.createSubscriber(topic);
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new MyMessageListener("europe"));
@@ -111,7 +111,7 @@
             // lookup the topics world.europw
             topic = session.createTopic("#.news");
             // Create a Message Subscriber
-            System.out.println(CLASS + ": Creating a Message Subscriber");
+            System.out.println(CLASS + ": Creating a Message Subscriber for topic #.news");
             messageSubscriber = session.createSubscriber(topic);
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new MyMessageListener("news"));
@@ -119,7 +119,7 @@
             // lookup the topics world.europw
             topic = session.createTopic("#.weather");
             // Create a Message Subscriber
-            System.out.println(CLASS + ": Creating a Message Subscriber");
+            System.out.println(CLASS + ": Creating a Message Subscriber for topic #.weather");
             messageSubscriber = session.createSubscriber(topic);
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new MyMessageListener("weather"));
@@ -185,7 +185,7 @@
                 // Increment the number of messages that have been received
                 _messageCount = _messageCount + 1;
                 // Print out the details of the just received message
-                System.out.println(CLASS + ":  Received message:  " + ((TextMessage) message).getText());
+                System.out.println(CLASS + ":  Received message for topic:  " + _topicName
+ ": " + ((TextMessage) message).getText());
                 // If this is the total number of messages required
                 if (((TextMessage) message).getText().equals("That's all, folks!"))
                 {

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Publisher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Publisher.java?rev=605609&r1=605608&r2=605609&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Publisher.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Publisher.java
Wed Dec 19 08:37:52 2007
@@ -74,7 +74,7 @@
             Topic topic = session.createTopic("usa.weather");
             message.setStringProperty("topicName", "usa.weather");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
+            System.out.println(CLASS + ": Creating a Message Publisher for topic usa.weather");
             TopicPublisher messagePublisher = session.createPublisher(topic);
             publishMessages(message, messagePublisher);
 
@@ -82,7 +82,7 @@
             topic = session.createTopic("usa.news");
             message.setStringProperty("topicName", "usa.news");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisher");
+            System.out.println(CLASS + ": Creating a Message Publisher for topic usa.news");
             messagePublisher = session.createPublisher(topic);
             publishMessages(message, messagePublisher);
 
@@ -90,7 +90,7 @@
             topic = session.createTopic("europe.weather");
             message.setStringProperty("topicName", "europe.weather");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
+            System.out.println(CLASS + ": Creating a Message Publisher for topic europe.weather");
             messagePublisher = session.createPublisher(topic);
             publishMessages(message, messagePublisher);
 
@@ -98,16 +98,15 @@
             topic = session.createTopic("europe.news");
             message.setStringProperty("topicName", "europe.news");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
+            System.out.println(CLASS + ": Creating a Message Publisher for topic europe.news");
             messagePublisher = session.createPublisher(topic);
             publishMessages(message, messagePublisher);
 
             // send the final message
-            message.setText("That's all, folks!");
+            message = session.createTextMessage("That's all, folks!");
             topic = session.createTopic("#.news");
             message.setStringProperty("topicName", "news");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
             messagePublisher = session.createPublisher(topic);
             messagePublisher
                     .send(message, getDeliveryMode(), Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
@@ -115,7 +114,6 @@
             topic = session.createTopic("#.weather");
             message.setStringProperty("topicName", "weather");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
             messagePublisher = session.createPublisher(topic);
             messagePublisher
                     .send(message, getDeliveryMode(), Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
@@ -123,7 +121,6 @@
             topic = session.createTopic("europe.#");
             message.setStringProperty("topicName", "europe");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
             messagePublisher = session.createPublisher(topic);
             messagePublisher
                     .send(message, getDeliveryMode(), Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
@@ -131,7 +128,6 @@
             topic = session.createTopic("usa.#");
             message.setStringProperty("topicName", "usa");
             // Create a Message Publisher
-            System.out.println(CLASS + ": Creating a Message Publisherr");
             messagePublisher = session.createPublisher(topic);
             messagePublisher
                     .send(message, getDeliveryMode(), Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);



Mime
View raw message