|
From: Leif M. <le...@ta...> - 2003-06-07 05:25:27
|
At this moment, there is no way to do this from outside the JVM. I do
provide
an API to do this from within the JVM however. Simply call
WrapperManager.requestThreadDump();
This also got me thinking. Others have asked for something like this in the
past so I went ahead and added a new class to the Wrapper which, if
instantiated, will allow you to control the Wrapper via the JVM using
telnet.
This will be in the next release, but if you want to use it before then,
add the
attached class to your project. Be sure to remove it later when you upgrade
to the latest version of the Wrapper.
Simply add code like the following to get things working. Only activate the
actions that you want to use as some of them obviously pose fairly severe
security risks. You can also bind the server to only listen to
connections to
localhost by using the alternate Constructor. See the javadoc comments
for usage.
int port = 9999;
WrapperActionServer server = new WrapperActionServer( port );
server.enableShutdownAction( true );
server.enableRestartAction( true );
server.enableThreadDumpAction( true );
server.enableHaltUnexpectedAction( true );
server.enableAccessViolationAction( true );
server.start();
Cheers,
Leif
One way for you do do this is to implement the folowing code someplace
in your application.
na...@le... wrote:
>Is there a way to cause a thread dump when running as an NT Service? I
>could implement it in my java application, but I would rather not rely on
>java just in case my app is totally hosed.
>
>Thanks,
>Nathan Klemperer
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Etnus, makers of TotalView, The best
>thread debugger on the planet. Designed with thread debugging features
>you've never dreamed of, try TotalView 6 free at www.etnus.com.
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|