From b6d073ef81e8fef3dd1319136ec3bb12c4da73fc Mon Sep 17 00:00:00 2001 From: Jonathan Robie Date: Fri, 16 Apr 2010 18:39:33 +0000 Subject: Removed two superfluous comments, added parameters to createSession() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@935037 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/example/jmsexample/hello/Hello.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'java/client/example') diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java index 4eac17f380..1cc46a8cef 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java @@ -25,9 +25,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import java.util.Properties; -/** - * Message producer example, sends message to a queue. - */ + public class Hello { private static final String CLASS = "Hello"; @@ -42,7 +40,6 @@ public class Hello { private void runTest() { try { - // Create JNDI context Properties properties = new Properties(); properties.load(this.getClass().getResourceAsStream("hello.properties")); Context context = new InitialContext(properties); @@ -55,7 +52,7 @@ public class Hello { } }); - Session session = connection.createSession(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = (Destination) context.lookup("topicExchange"); MessageProducer messageProducer = session.createProducer(destination); -- cgit v1.2.1