SourceForge.net
2004-04-19 20:41:11 UTC
Bugs item #938163, was opened at 2004-04-19 14:41
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=938163&group_id=54559
Category: message engine
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Preston McFarland (mcfarlandp)
Assigned to: Jim Alateras (jalateras)
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
isnt getting called this vector continues to grow
indefinitely.
The patch is simply to change isClosed() as follows
public synchronized boolean isClosed() {
return (_session == null);
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=938163&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=938163&group_id=54559
Category: message engine
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Preston McFarland (mcfarlandp)
Assigned to: Jim Alateras (jalateras)
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
isnt getting called this vector continues to grow
indefinitely.
The patch is simply to change isClosed() as follows
public synchronized boolean isClosed() {
return (_session == null);
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=938163&group_id=54559