diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2015-01-20 16:50:09 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2015-01-20 16:50:09 +0000 |
| commit | b5df74c2a2b4b62783f05b8801a5d0233dda5791 (patch) | |
| tree | 8b3dbb483d1b6932c3a7c65478dbf7c0e7d0fcae /qpid/java/client | |
| parent | 9dfc81a98121ac26304790dd474a9bb4e3962496 (diff) | |
| download | qpid-python-b5df74c2a2b4b62783f05b8801a5d0233dda5791.tar.gz | |
QPID-6294 : revert unintended hanges to example file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -rw-r--r-- | qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java index aab08ebf0f..109a72bcbf 100644 --- a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java +++ b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java @@ -34,9 +34,6 @@ import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; -import org.apache.qpid.client.AMQConnection; -import org.apache.qpid.configuration.ClientProperties; - public class Hello { @@ -45,38 +42,10 @@ public class Hello { } - public static void main(String[] args) throws Exception + public static void main(String[] args) { - System.setProperty(ClientProperties.AMQP_VERSION, "0-91"); - System.setProperty(ClientProperties.MAX_PREFETCH_PROP_NAME, "0"); - System.setProperty(ClientProperties.DEST_SYNTAX, "BURL"); - - Connection conn = new AMQConnection("127.0.0.1", 5672, "admin","admin", "client", "/"); - - conn.start(); - - Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - Destination destination = session.createQueue("queue"); - - MessageConsumer consumer = session.createConsumer(destination); - MessageProducer producer = session.createProducer(destination); - - for(int i = 0 ; i < 2 ; i ++) - { - TextMessage message = (TextMessage) consumer.receive(1000l); - System.out.println(message == null ? "null" : message.getText()); - } - for(int i = 0 ; i < 2 ; i ++) - { - TextMessage message = session.createTextMessage("Hello " + i); - producer.send(message); - } - - for(int i = 0 ; i < 2 ; i ++) - { - TextMessage message = (TextMessage) consumer.receive(1000l); - System.out.println(message == null ? "null" : message.getText()); - } + Hello hello = new Hello(); + hello.runTest(); } private void runTest() |
