Kbase 20845: SonicMQ: Can Session run in a multiple threads ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/04/2001 |
|
SUMMARY:
This solution applies to Progress SonicMQ Versions 2000.x and 3.x.
If a Session is using multiple threads, you might see the following exceptions :
javax.jms.JMSException:
void Progress.message.jclient.QueueSender.internalSend(javax.jms.Queue, javax.jms.Message, int, int, long)
void progress.message.jclient.QueueSender.send(javax.jms.Message, int, int, long)
int eor.Adapter.Adapter.writeOnDBManager(eor.Utility.EORObject, java.lang.String, boolean)
void eor.Adapter.Adapter.onMessage(javax.jms.Message)
void eor.Adapter.Adapter$2.run()
void java.lang.Thread.run()
EXPLANATION :
The above exceptions occurs especially If a session is created and shared among more than one thread. Each session can only be run in its own thread, producing or consuming one message at a time. If you create multiple sessions, the client can process multiple messages in parallel.
JMS 1.0.2 specifically states that session objects are not thread safe and cannot be shared, therefore "Session cannot run in a multiple-threads"
SOLUTION:
Check you code and make sure you are not using the same session in multiple threads.
JMR (13/04/2001)