diff options
| author | Jonathan Robie <jonathan@apache.org> | 2010-04-16 18:39:33 +0000 |
|---|---|---|
| committer | Jonathan Robie <jonathan@apache.org> | 2010-04-16 18:39:33 +0000 |
| commit | 85fef8dfebbcad88869de2180c354bac42b8efdb (patch) | |
| tree | b9f3a58b45b4fe2f0c5948367aa03623f8659ed2 /qpid/java/client/example | |
| parent | 4b34c85b575b304301f13648882a074c65ecc448 (diff) | |
| download | qpid-python-85fef8dfebbcad88869de2180c354bac42b8efdb.tar.gz | |
Removed two superfluous comments, added parameters to createSession()
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@935037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/example')
| -rw-r--r-- | qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java b/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java index 4eac17f380..1cc46a8cef 100644 --- a/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/hello/Hello.java +++ b/qpid/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); |
