[ http://issues.apache.org/jira/browse/IO-99?page=comments#action_12450929 ] Martin Cooper commented on IO-99: ---------------------------------
It would make sense to me for FileCleaner to provide a method to cleanly stop the reaper thread, and possiby another method to (re-)start it. This way, an application using Commons IO could gain control over this thread. Today, no control is provided - the thread is started automatically, and cannot be (cleanly) stopped. In the context of Commons FileUpload, this would allow a web application to start the reaper thread at startup time (e.g. servlet or filter init) and shut it down when the web app is being stopped (e.g. servlet or filter destroy). The question then arises of what to do by default. If we decide not to start the reaper automatically, we would be breaking backwards compatibility with the current version of IO, although I do think this would be the more sensible option. > FileCleaner thread never ends and cause memory leak in AS > --------------------------------------------------------- > > Key: IO-99 > URL: http://issues.apache.org/jira/browse/IO-99 > Project: Commons IO > Issue Type: Bug > Affects Versions: 1.2 > Environment: JBOssPortal with commons.fileupload > Reporter: Vera Mickaƫl > Priority: Critical > > FileCleaner opens a thread and no solution is given to the user to end it. So > when an application is undeployed > in an Application Server, a thread is still alive. The WebApp can't be > undeployed and this results in a classloader > leak that will cause an OutOfMemoryError. > I think the API should be extended so that a user can end the thread. A > better way would be to provide a class that > cleans everything for commons IO. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
