Discussion:
[openjms-developer] [ openjms-Bugs-938163 ] Session not removing producers
SourceForge.net
2004-05-01 04:59:38 UTC
Permalink
Bugs item #938163, was opened at 2004-04-20 06:41
Message generated for change (Comment added) made by tanderson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=938163&group_id=54559
Category: client
Group: v0.7.6
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Preston McFarland (mcfarlandp)
Assigned to: Tim Anderson (tanderson)
Summary: Session not removing producers

Initial Comment:
he JMSMessageProducer has a isClossed method.

public synchronized boolean isClosed() {
return (_session != null);
}


This method is called by the close methods of
JMSQueueSender and
JMSTopicPublisher.

public synchronized void close() throws JMSException
{
if (!isClosed()) {
// unregister this producer from the session
before closing.
// and then call the base class method.
JmsQueueSession session = (JmsQueueSession)
getSession();
session.removeSender(this);
super.close();
}
}

The problem is that isClosed is returning true when the
JMSMessageProducer is
not null. The close method then skips the
session.RemoveSender() because it
thinks the session is null.

All of the producers are stored in a vector in the
Session. Since removeSender
isn’t getting called this vector continues to grow
indefinitely.


The patch is simply to change isClosed() as follows

public synchronized boolean isClosed() {
return (_session == null);
}


----------------------------------------------------------------------
Comment By: Tim Anderson (tanderson)
Date: 2004-05-01 14:59

Message:
Logged In: YES
user_id=557161

Fixed in CVS. Fix will be available in the 0.7.6.1 release.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=938163&group_id=54559
Loading...