Menu

#394 JBossMQ Connection.close() close ALL client Sessions

v3.2
closed-accepted
nobody
JBossMQ (39)
5
2003-05-12
2003-05-11
No

Multiple Sessions derived from single Connection
can fail to return from receive() when server goes
away.

Using OIL.

1 Connection
3 Sessions derived from the 1 Connection

Network connection to server goes away.

An exception handler installed on the connection
does a Connection.close()

An exception is thrown from OILServerIL.unsubscribe() when
waitAnswer() is called while Connection is closing the
first of 3 Sessions created on it. This exception
eventually propagates
back to Connection.close(). The exception causes the
session-closing loop to be exited before
all Sessions are closed. That results in
receivers for the other Sessions waiting in messages.wait()
forever (because their Session was never closed,
messages.notify() was never invoked).

The patch ensures that ALL Sessions are closed
and then throws the first exception encountered,
if any.

Discussion

  • Terry Rosenbaum

    Terry Rosenbaum - 2003-05-11

    Unified diff patch for Connection.java

     
  • Terry Rosenbaum

    Terry Rosenbaum - 2003-05-11
    • summary: JBossMQ Connection.close() close ALL Sessions --> JBossMQ Connection.close() close ALL client Sessions
     
  • Terry Rosenbaum

    Terry Rosenbaum - 2003-05-11

    Logged In: YES
    user_id=436370

    See bug ID 736068.
    Contact: Terry AT Amicas DOT com

     
  • Terry Rosenbaum

    Terry Rosenbaum - 2003-05-11

    Corrected patch (ignore previous)

     
  • Adrian Brock

    Adrian Brock - 2003-05-12
    • status: open --> closed-accepted
     

Log in to post a comment.