|
From: Leif M. <le...@ta...> - 2006-10-29 00:45:56
|
Tito, In the future, please post to the wrapper-user mailing list rather than contacting me directly. Same result, but it makes these comments available to other users. All the Wrapepr does is to manage the specific JVM instance that it itself launches. If that JVM crashes or hangs, the Wrapper will restart it. Shutdowns are the same. In your case, you are launching child JVMs, this is possible, but you need to make your main Java application more intelligent about handling the shutdown of the child JVMs on shutdown as well as recovering after a restart if any old child JVMs are still left around. I would do the later by writing a file for each JVM in a known directory. On startup, you can iterate over those files to clean up the old JVMs. Another, simpler, option is to write a unique anchor file into a known directory then pass that anchor file name to the child JVM. The child will then monitor that file. If it is ever deleted, it knows that it must shutdown as soon as possible. The parent JVM will then delete all anchor files on shutdown and startup. The later is to clean up after a restart. Simple. If you want to have each of your child JVMs running under their own wrapper instance this is also possible. You can reuse the same wrapper.exe, but you will want to create new wrapper.conf files for each instance. Make sure that they are each given a unique service name as well. Your main program can then use the wrapper binary to install and start those services on startup, then stop and remove them on shutdown. Your exact problem was not clear, so I hope this helped. Cheers, Leif Encrypti! wrote: > Message body follows: > > I tried using JSW for one of my project. it is a client > server RMI application. in that for every clients server > will create seperate process ie. seperate JVM. The creation > is working fine(I am creating using a .bat file which is > called form inside the jar file). and for killing i am using > another bat file(using MS Kill.exe). That part is not > working. its because while using JSW there is no referance > for that client. Is there another way to do this.. > > Tito George > |