|
From: Aiman Y. <wr...@co...> - 2004-01-26 18:21:53
|
One way, not sure if its the best, is to recompile your source including =
the wrappermanager source.
Looking through some test code I had, I just added:
-------------------------------------------------------------------------=
-
import org.tanukisoftware.wrapper.WrapperManager;
...
public class bla {
public static void main(String[] s) {
...
catch (SomeException se) {
System.out.println("Caught some exception, restarting");
WrapperManager.restart();
}
...
}
}
-------------------------------------------------------------------------=
-
And then I copied (from the source you can get from the site)
WrapperInfo.java
WrapperListener.java
WrapperManager.java
into directory org/tanukisoftware/wrapper/ and compiled.
This was just for testing. Most likely there is a better way (like using =
method 3 maybe? I never really looked into that method yet).
----- Original Message -----=20
From: St=E9phane Merle=20
To: wra...@li...=20
Sent: Monday, January 26, 2004 12:23 PM
Subject: [Wrapper-user] restart
Hi,
I managed to have my app to start as a service using the method 1 with =
the WrapperSimpleApp helper class=20
But now, I'd like to have the ability to stop/start the service from =
within my app.
How can I make the call to wrappermanager.restart() ??
St=E9phane
|