SourceForge.net
2008-02-12 17:24:18 UTC
Bugs item #1892094, was opened at 2008-02-12 14:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: 5
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
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: 5
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