persistTempDirectory is for the webapp temp directory.
That is checked on webapp stop (such as server shutdown, or manual webapp
stop, or even webapp redeployment)

As for the File.deleteOnExit(), that's a classlib / jvm feature, if it
isn't working for you, then you have bigger concerns.  Namely that java
itself cant do what its designed to do.

Taking a look on my Fedora 20 and Ubuntu 12.04 machines with thousands of
jetty starts I have 0 ${java.io.tmpdir}/start*.properties files at the
moment.

I even have java.io.tmpdir setup in different ways depending on the
configuration I'm working with at the moment.
Some as start scripts, some as upstart, some as sysvinit, some as systemd,
some from command line, some from start.ini, even some from start.d.
A full scan of the filesystems for start*.properties also shows no relevant
hits.

Can I ask what specific JVM you are using?  I'll see if I have a copy of it
laying around, just to see if I can replicate.


--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/> - intalio.com/jetty
Expert advice, services and support from from the Jetty & CometD experts
eclipse.org/jetty - cometd.org


On Fri, Feb 21, 2014 at 2:29 AM, Andrea Cappelli <[email protected]>wrote:

>  Il 20/02/2014 15:19, Joakim Erdfelt ha scritto:
>
> 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
>
>
> Uhm, so there is something in my setup that broke this behaviour, because
> after stopping jetty I have
>
> ls -la jetty_tmp/start*.properties | wc -l
> 21
>
> I set java.io.tmpdir and I use an upstart script to start jetty
>
>
>
>   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 ...
>
>
> Ok, I use java.io.tmpdir to move my temp directory to a certain path
>
> Only for one app (started thorugh xml context) I set tempDir explicit
>
>
>  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>
>
>
> But this is related to webapp start/stop or is checked also when jetty
> stops? I didn't set persistTempDirectory, but If I remove the symlink in
> webapps folder the temp directory is removed; my problem is that if I stop
> jetty all temp directory remain on disk (as start$random.properties)
>
> --
> Andrea Cappelli
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to