Commit 47063da3 authored by afreyssin's avatar afreyssin

Removes a workaround due to a bug in JMSContext (JORAM-238).

parent 6a3baa2c
package jms2;
import java.util.Enumeration;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.jms.JMSContext;
import javax.jms.CompletionListener;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSConsumer;
import javax.jms.JMSException;
import javax.jms.JMSProducer;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
......@@ -32,8 +28,6 @@ public class Consumer implements MessageListener {
System.in.read();
context.close();
System.out.println("Consumer closed.");
System.exit(0);
}
@Override
......
......@@ -6,11 +6,9 @@ import javax.jms.JMSContext;
import javax.jms.CompletionListener;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSConsumer;
import javax.jms.JMSException;
import javax.jms.JMSProducer;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
public class Producer implements CompletionListener{
......@@ -35,9 +33,7 @@ public class Producer implements CompletionListener{
}
Thread.sleep(1000L);
context.close();
System.exit(0);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment