|
From: Leif M. <le...@ta...> - 2006-12-15 03:07:55
|
Levi,
This kind of thing has been on my todo list for a while. Users
would like to
be able to run arbitrary applications in response to various events.
For now, it is not directly possible. But I do have an idea for how you
could get this working.
Add the following property to your wrapper.conf.
wrapper.java.statusfile=java.status
http://wrapper.tanukisoftware.org/doc/english/prop-java-statusfile.html
When your Java application is ready to do an upgrade, it will launch
a child JVM using Runtime.exec which does the following:
1) Wait until the contents of the java.status file are "DOWN" or the
file is gone.
2) If gone, something went wrong. Exit.
3) The status is DOWN so you can now safely make your changes.
4) Exit.
In any case, this simple java process should clean itself up so you
shouldn't
have to worry about it being left around.
I'm ccing this to the mailing list as that is the preferred place to
be asking
questions like this. This particular one may also be of use to others.
Cheers,
Leif
levi wrote:
> Message body follows:
>
> I have been working with the wrapper for almost a year now
> and have been quite pleased. I have found the need to
> execute a batch after the JVM exits. I wanted to get your
> input on how difficult this might be to include as a feature
> in the wrapper.
>
> Exact scenerio:
> The java application being run by the wrapper downloads an
> updated jar containing the main class executed by the
> wrapper. The downloaded file needs to be renamed but this
> cannot be done until after the JVM exits. I have a very
> simple batch file which will perform the needed operation
> but I do not have a way to execute it automatically after
> the JVM exits.
>
> Any suggestions? I am a Java developer and offer any
> assistance I can provide with this new development.
>
> Levi Pearce
>
|