Commit 47063da3 authored by afreyssin's avatar afreyssin

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

parent 6a3baa2c
package jms2; package jms2;
import java.util.Enumeration;
import javax.naming.Context; import javax.naming.Context;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import javax.jms.JMSContext; import javax.jms.JMSContext;
import javax.jms.CompletionListener;
import javax.jms.ConnectionFactory; import javax.jms.ConnectionFactory;
import javax.jms.Destination; import javax.jms.Destination;
import javax.jms.JMSConsumer; import javax.jms.JMSConsumer;
import javax.jms.JMSException; import javax.jms.JMSException;
import javax.jms.JMSProducer;
import javax.jms.Message; import javax.jms.Message;
import javax.jms.MessageListener; import javax.jms.MessageListener;
import javax.jms.TextMessage; import javax.jms.TextMessage;
...@@ -32,8 +28,6 @@ public class Consumer implements MessageListener { ...@@ -32,8 +28,6 @@ public class Consumer implements MessageListener {
System.in.read(); System.in.read();
context.close(); context.close();
System.out.println("Consumer closed."); System.out.println("Consumer closed.");
System.exit(0);
} }
@Override @Override
......
...@@ -6,11 +6,9 @@ import javax.jms.JMSContext; ...@@ -6,11 +6,9 @@ import javax.jms.JMSContext;
import javax.jms.CompletionListener; import javax.jms.CompletionListener;
import javax.jms.ConnectionFactory; import javax.jms.ConnectionFactory;
import javax.jms.Destination; import javax.jms.Destination;
import javax.jms.JMSConsumer;
import javax.jms.JMSException; import javax.jms.JMSException;
import javax.jms.JMSProducer; import javax.jms.JMSProducer;
import javax.jms.Message; import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage; import javax.jms.TextMessage;
public class Producer implements CompletionListener{ public class Producer implements CompletionListener{
...@@ -35,9 +33,7 @@ public class Producer implements CompletionListener{ ...@@ -35,9 +33,7 @@ public class Producer implements CompletionListener{
} }
Thread.sleep(1000L); Thread.sleep(1000L);
context.close(); context.close();
System.exit(0);
} }
@Override @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