|
From: Leif M. <le...@ta...> - 2003-10-28 07:38:34
|
Ole, > When I read the docs this looked promising, but I have another > requirement that I did not mention. I need to the restart action to > work as well and I assume by using signalStopping I would not get the > fresh server started until the previous stop action has completed > satisfactory? True. The Wrapper does not allow a second JVM process to be launched until the first JVM process has been terminated one way or another. This is critical for most applications to prevent conflicts with memory, ports and other resources. It would also be quite a bit more difficult for the Wrapper to manage multiple JVMs at once. >> long periods of time after the JVM has been requested to exit is not >> the norm. The >> Wrapper supports it, but there are not many examples out there. > > Let me know if you have any questions. Allowing the JVM to run for > relatively > > I understand, and I would not have implemented the server the way it > is if I had a say, but it is a legacy app and hard to fix. The basic > problem is that the server initializes it self with a lot of metadata > from a database. It is not possible to reinitialize, one needs to > restart the server. Since we use rmiregistry and stateful connections > it is very easy to signal the running server to deregister and then > register the new server. The previous server will then make sure to > exit when all clients are logged off. Works smoothly. > > I'm not giving up just yet, so how will the wrapper like it if I > change the script to do the following on the stop action: > > 1. Execute my own command: > java SignalDeRegister server-name > 2. Delete the pid file > > Will the subsequent start continue ok since the pid file is gone or > will it contact ports to find an existing wrapper process? When the > server decides it is time to close how can I signal the wrapper that > the close is fine and there is no need to restart? System.exit(0)? This will not work because the pid file is for the Wrapper process and not the JVM. Deleting the PID will allow you to launch a separate copy of the Wrapper which would in turn in launch its own JVM. You will most likely run into problems here as both would be trying to access some of the same resources because they use the same wrapper.conf file. What is preventing you from shutting down JVM instance 1 cleanly and then restarting the second JVM instance normally? Are you concerned about the period of time where the JVM is down? If you managed to get two JVMs running at the same time, you are going to have lots of timing issues trying to get them to switch over control. Sorry if I am missing what you are trying to do. Explain enough and I will catch on eventually. :-). Cheers, Leif |