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.
Unified diff patch for Connection.java
Logged In: YES
user_id=436370
See bug ID 736068.
Contact: Terry AT Amicas DOT com
Corrected patch (ignore previous)