Kbase P19612: javax.jms.IllegalStateException: The session is closed
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/7/2005 |
|
Status: Unverified
FACT(s) (Environment):
Solaris SPARC 8
SonicMQ 4.x
SYMPTOM(s):
javax.jms.IllegalStateException: The session is closed
Exception listener implemented and setPingInteval set but onException was not called
CAUSE:
There may exists some cases where the last
ping was successfully but while sending a message the connection was not
available and the session closed.
There was also a problem if you are using SonicMQ version 3.5 clients
with security enabled and QoP set to privacy for the specific queue.
That problem is fixed since SonicMQ 4.0
If using SonicMQ version 4.02 clients than the only known reason for
a javax.jms.IllegalStateException: The session is closed errors are
network problems. The exception listener cannot in every case be faster than the Queue or TopicSender even if you set the ping interval very short.
FIX:
Add code for catching the javax.jms.IllegalStateException .
Set an appropriate flag and depending on the flag set recreate the connection (if lost) and the session.