|
From: Leif M. <le...@ta...> - 2004-10-20 04:04:39
|
francesco triti wrote: >hi, >i'm trying to integrate java service wrapper with my >java application. > >Since it supports both win and linux it seems too >great for my. > >By the way, i'd like to know if "net pause <<service >name>>" is enable. > > Currently the Wrapper does not not support the pause function as there is not a practical way to pause a JVM. >I'd like to use for doing a full thread dump of my >java application. > >If not, is there a way to call a full thread dump when >the application runs as NT service? >Have i to open c code, adding support and recompile >the wrapper code? > > There are a couple ways to invoke a thread dump in your application. If your app uses JMX, the Wrapper provides an interface that can be used to invoke the dump. You can invoke a thread dump from the console by pressing CTRL-BREAK. But that is not useful when run as a service unless you have configured the wrapper to show its console. The Wrapper comes with a simple little class which lets you connect via telnet and do things link thread dumps or JVM restarts. See the javadocs for the WrapperActionServer for more details. It requires some Java code be added to your application, but it is quite easy to do. http://wrapper.tanukisoftware.org/doc/english/javadocs.html Another method is to call WrapperManager.requestThreadDump directly from within your application. This method opens up a lot of options for you. On UNIX platforms, it is easy. You simply launch the shell script with the "dump" command. Cheers, Leif |