commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédrik LIME (JIRA) <>
Subject [jira] Created: (FILEUPLOAD-125) new FileCleanerCleanup may lead to problems [PATCH]
Date Thu, 22 Feb 2007 15:19:05 GMT
new FileCleanerCleanup may lead to problems [PATCH]

                 Key: FILEUPLOAD-125
             Project: Commons FileUpload
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: Cédrik LIME

This is a follow-up on FILEUPLOAD-120.

As described in using.html#resourceCleanup, stopping the IO's reaper thread when commons-io
is in the container's classpath will impact other running applications. The solution to this
is to test if the FileCleaner class was loaded by the application's ClassLoader (i.e. commons-io.jar
is in WEB-INF/lib/):

    public void contextDestroyed(ServletContextEvent sce) {
        if (FileCleaner.class.getClassLoader() == Thread.currentThread().getContextClassLoader())

This is, if users don't forget to put FileCleanerCleanup as a servlet listener, of course...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message