Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Cleaning temp directory

The start$random file is deleted automatically when the JVM is exited.

https://github.com/eclipse/jetty.project/blob/master/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java#L466-L479

As for the webapp specific temp directory, that has many configurables and knobs available both from jetty and the servlet spec for you to manipulate.

First: how to specify the location of the temp directory ...
See: http://stackoverflow.com/questions/19232182/jetty-starts-in-c-temp/19232771#19232771

Next: the cleanup.
In your Jetty IoC Context Deployable XML you can configure the following (available in Jetty 9.1+)
<Set name="persistTempDirectory">false</Set>

Good luck

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Thu, Feb 20, 2014 at 6:50 AM, Andrea Cappelli <a.cappelli@xxxxxxxxx> wrote:
Hi all,
I have a new question for which I can not find the answer

I set the base temp directory in which jetty
1) extract the wars
2) create a filestart$randomnumber.properties for each start

If I deactivate a webapp (removing a symlink in monitoredDir) jetty correctly removed the temp directory, but if I stop jetty instance

1) file .properties is not removed
2) temp directory remains

How can I instruct jetty to clean all on his shutdown?

--
Andrea Cappelli

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top