Bugs item #703183, was opened at 2003-03-13 15:02
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=703183&group_id=22866
Category: JBossMQ
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: john hutchinson (jamoville)
Assigned to: Nobody/Anonymous (nobody)
Summary: oil2 memory problem
Initial Comment:
The oil2SocketHandler class is allocating hashmap$entry
objects without cleaning them up. Specifically the
registerResponseSlot method and pumpMessages are
cloning a hashmap object then adding or removing an
object as seen here:
HashMap newMap = (HashMap) responseSlots.clone();
newMap.put(request.requestId, responseSlot);
responseSlots = newMap;
This results in an exponetial increase in HashMap$Entry
objects that can easily be view through something such
as Optimizit. You can also see this on the task
manager. As you send and receive messages you will see
the memory just continue to grow. I changed the above
code in the registerResponseSlot method to:
responseSlots.put(request.requestId, responseSlot);
and changed the pumpMessages method to:
responseSlots.remove(response.correlationRequestId);
This change requires a synch block to be placed around
the iterator in the pumpMessages method like so:
synchronized(responseSlotsMutex)
{
HashMap snapShot = responseSlots;
if
{
while
{
}
}
}
This will eliminate the concurrentAccess exception
from occuring because of the removal of the clone.
These changes completely removed the memory issue.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=703183&group_id=22866
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development