[ openjms-Bugs-1892094 ] MessageConsumer.receive() get stuck in a server shutdown
"SourceForge.net" <[email protected]> Tue, 11 Mar 2008 06:56:02 -0700
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1892094, was opened at 2008-02-12 14:24
Message generated for change (Settings changed) made by arieluba
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1892094&group_id=54559
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: client
Group: v0.7.7-beta-1
Status: Open
Resolution: None
>Priority: 7
Private: No
Submitted By: arielUBA (arieluba)
Assigned to: Jim Alateras (jalateras)
Summary: MessageConsumer.receive() get stuck in a server shutdown
Initial Comment:
If you are receiving messages synchronously (using a consumer) and the server is shutdown, the client still waiting for a message and does not throw any exception (neither returns null)
MessageConsumer receiver = session.createConsumer(destination);
connection.start();
TextMessage message = (TextMessage) receiver.receive();
If you register an ExceptionListener you realize that an exception is thrown from org.exolab.jms.client.net.JmsServerStubImpl.disconnected(Caller) but it does not have any error code. So, the JmsConnection won't be closed (because it expects JmsErrorCodes.CONNECTION_TO_SERVER_DROPPED as error code).
IMHO, JmsServerStubImpl.disconnected(Caller) should be:
public void disconnected(Caller caller) {
if (_listener != null) {
_listener.onException(new JMSException("Lost connection", JmsErrorCodes.CONNECTION_TO_SERVER_DROPPED));
}
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1892094&group_id=54559
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/