|
From: Ori A. <oa...@me...> - 2004-10-20 07:56:37
|
I found a very cool tool that does this for NT services. www.latenighthacking.com/projects/2003/sendSignal/ However I can not get into this link recently (you can see it on google cache, I personally think it's a very smart piece of coding, respect to the author). It will send a Ctrl+Break to ANY process by PID. If you can't get a copy and need it I have one, I'm not sure if I can post it here - how about it Leif? Ori -----Original Message----- From: wra...@li... [mailto:wra...@li...] On Behalf Of Leif Mortenson Sent: Wednesday, October 20, 2004 6:04 AM To: wra...@li... Subject: Re: [Wrapper-user] Service question 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 ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |