|
From: Leif M. <le...@ta...> - 2003-08-20 17:31:49
|
Justin,
It is probably best not to modify the WrapperSimpleApp class as it
will cause
you problems when you upgrade the Wrapper. My thinking was to simply
include
the code to configure the WrapperActionServer within your user code.
You can
see an example of its usage in the org.tanukisoftware.wrapper.test.Main
class:
int port = 9999;
WrapperActionServer server = new WrapperActionServer( port );
server.enableShutdownAction( true );
server.enableHaltExpectedAction( true );
server.enableRestartAction( true );
server.enableThreadDumpAction( true );
server.enableHaltUnexpectedAction( true );
server.enableAccessViolationAction( true );
server.start();
...
server.stop();
The class also supports the registration of custom actions using the
registerAction method.
The class is an obvious security hole. So it should only be used in
a controlled situation.
Specifying a bind address helps some. Further, the things that you want
to allow will be
different for each application, so I felt it would be best to leave it
up to user code to actually
make use of the class.
As far as I know, you are the first user of the class, so let me
know what is good and bad
about it.
Cheers,
Leif
Justin wrote:
>I'm interested in using the WrapperActionServer with WrapperSimpleApp. From
>what I understand, this would mean simply altering the code to give
>WrapperSimpleApp a WrapperActionServer member, and instantiating the
>WrapperActionServer in WrapperSimpleApps constructor.
>
>Am I missing anything?
>
>I have a configuration application which will change some of the properties
>in wrapper.conf, telnet to the WrapperActionServers port, and tell it to
>restart.
>
>Thank you,
>
>
>
|