Hi,

I don't remember how 1.4.x works exactly in this code but for 1.5 we
improved it by creating an interface
org.apache.wicket.util.file.IFileCleaner which is configured in
org.apache.wicket.settings.IResourceSettings#setFileCleaner().

By default it uses Apache-Commons FileCleaningTracker which uses a
Thread to do its work. But now Google AppEngine users can provide
their own impl if needed too.

org.apache.wicket.protocol.http.WebApplication#internalDestroy() calls
IFileCleaner#destroy() so it should clean when the app is going down.

Put a breakpoint in
org.apache.wicket.util.file.FileCleaningTracker.Reaper#run() and see
what happens.

On Wed, Jun 13, 2012 at 2:56 PM, brazz <[email protected]> wrote:
> Hi,
>
> I'm using the FileUpload Component. The component creates temporary files
> "upload....tmp".
> I set some breakpoints to see what happens.
>
> In DiskFileItem i can see that the File is added to the FileCleaner:
>
> FileCleaner.track(tempFile, this);
>
> but the File never gets removed from Disk.
> I also added the apache commons FileCleanerCleanup -Listener to my web.xml.
>
> <listener-class>
>                org.apache.commons.fileupload.servlet.FileCleanerCleanup
> </listener-class>
>
> Is this a bug or am i missing something?
> If it's a bug, is there a workaround?
>
> Thanks for any suggestions.
>
>
> I'm using wicket 1.4.17
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/FileUpload-temp-files-never-get-removed-also-they-get-tracked-tp4649926.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to