The following comment has been added to this issue:
Author: Howard M. Lewis Ship
Created: Mon, 21 Jun 2004 2:54 PM
Body:
Just to be safe, I increased the size of the loop that adds listeners:
public void testOutOfMemoryError()
{
Trigger ta = buildTriggers(1)[0];
EventListenerList l = new EventListenerList();
List iterators = new ArrayList();
try
{
for (int i = 0; i < 500000; i++)
{
l.addListener(ta);
iterators.add(l.getListeners());
l.removeListener(ta);
}
}
catch (OutOfMemoryError e)
{
fail("Ran out of memory!");
}
catch (Throwable e)
{
fail(e.getMessage());
}
}
That's a lot of listeners and it works. If there was still an out-of-control
doubling of size of the list (as in the original code) we'd run out of memory
very quickly.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/HIVEMIND-8?page=comments#action_36274
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/HIVEMIND-8
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HIVEMIND-8
Summary: "OutOfMemoryException" after multiple application reloads
Type: Bug
Status: Open
Priority: Major
Project: HiveMind
Components:
framework
Versions:
1.0
Assignee: Howard M. Lewis Ship
Reporter: Jamis Buck
Created: Mon, 21 Jun 2004 1:36 PM
Updated: Mon, 21 Jun 2004 2:54 PM
Environment: Tomcat 4.x and 5.x. JDK 1.4.1. Gentoo Linux, 2.6.5 kernel.
Hivemind 1.0-beta-1.
Description:
I have a Tapestry application that uses the HiveMindFilter servlet filter to
initialize and teardown the registry. After reloading the application a few
times, I get an "OutOfMemoryException" from Tomcat, and only a hard restart of
Tomcat can fix it.
A coworker tracked the problem down and gave me a patch (for
org.apache.hivemind.util.EventListenerList, in copyOnWrite(int)), which I will
attach to this issue if I can (I'm not too familiar with this issue tracker).
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]