|
From: Leif M. <le...@ta...> - 2004-02-02 15:10:36
|
The NT service manager will prevent you from launching more than one copy of the Wrapper as a service. But it is still possible to launch one or more instances of the application as Console applications. There is currently not a way to prevent this with the Wrapper as it is without implementing something in your application. I like this idea however and just logged a feature request so I will be sure to get it implemented. The list has been growing lately so it may be a version or two before I am able to get it in. http://sourceforge.net/tracker/index.php?func=detail&aid=889123&group_id=39428&atid=425190 Body of request. --- Add a property that will tell the Wrapper to check whether or not another instance of the same application is already running. It is important that more than one copy of the Wrapper be allowed to run as long as the java application is different. Use the ntservice name as a key when checking for other instances on startup. --- On the UNIX side, this should already be working as long as you are using the scripts provided with the Wrapper to launch your application. They make use of a PID file to detect whether or not the application is currently running. If you attempt to launch a second instance you will get an error. Cheers, Leif whack er wrote: > Warm Greetings > > How could I ensure that only one instance of my application runs at > any given time when using the Wrapper service, i have figured out > methods using native Java application but not with the wrapper. > > I need to do this on Windows and Linux. > > TIA > |