|
From: Leif M. <le...@ta...> - 2004-09-24 04:05:13
|
Balaji,
I was unclear about what you mean by the "D" command. The
WrapperListener does
not provide such a function. The Wrapper does include a
WrapperActionServer class
which lets you connect the the JVM using Telnet and do things like
request thread dumps
or restarts. This class is not enabled by default, you have to write a
few lines of code to
enable it. See the javadocs.
Not that the action server will also not work if the JVM is truly hung.
How the Wrapper handles freezes, depends on what you mean my an
"application freeze".
If it is the entire JVM which freezes then the Wrapper will
automatically restart the JVM. If
this happens, it is not possible to get a thread dump because the JVM is
usually too far gone
at that point.
If your application is frozen, but the JVM is still functioning
correctly then the Wrapper
will not usually be able to detect this. This is because the Wrapper's
core threads are still
functioning correctly.
To get a thread dump in the second case, a system administrator will
need to request it
manually and then restart the JVM. You can do this manually for any
JVM by pressing
CTRL-BREAK on windows or passing the 'dump' command to the wrapper shell
script
on UNIX. It is also possible to use the above WrapperActionServer.
If it is possible for your application to detect that it is no
longer functioning correctly,
then you can add the following code. It will request a thread dump and
then restart
the JVM.
WrapperManager.requestThreadDump();
WrapperManager.restart();
Cheers,
Leif
Balaji KM wrote:
>Dear All,
>
> I'm using java service wrapper 3.1.0 in my application which runs on
>IBM JRE 1.3.0. When the application freezes, we are tring to get
>thread dump using wrapperlistener's "D" command. We couldn't succeed
>in getting a thread dump;no response from the wrapper service. We
>observed that service was in hung state. Even in case of a freeze
>incident, how should I configure the wrapper service to get a thread
>dump.
>
>I have listed my app configurations as follows:
>
>wrapper.java.command=C:/IBM/Java13/jre/bin/java
>wrapper.java.mainclass=com.elind.service.fixgateway.common.FixMarketDataMainProcess
>wrapper.max_failed_invocations=1
>wrapper.ping.timeout=0
>wrapper.java.classpath.1=C:/Test/lib/wrapper.jar
>wrapper.java.classpath.2=C:/Test/lib/FixGateway.jar
>wrapper.java.classpath.3=C:/Test/lib/jgl3.1.0.jar
>wrapper.java.classpath.4=C:/Test/lib/xerces.jar
>wrapper.java.classpath.5=C:/Test/lib/xmlparserv2.jar
>wrapper.java.library.path.1=C:/Test/lib
>wrapper.console.format=PM
>wrapper.console.loglevel=INFO
>wrapper.logfile=../logs/wrapper.log
>wrapper.logfile.format=LPTM
>wrapper.logfile.loglevel=INFO
>wrapper.logfile.maxsize=0
>wrapper.logfile.maxfiles=0
>wrapper.syslog.loglevel=NONE
>wrapper.ntservice.name=FixTradingPartner
>wrapper.ntservice.displayname=FixTradingPartner
>wrapper.ntservice.description=FixTradingPartner
>wrapper.ntservice.dependency.1=
>wrapper.ntservice.starttype=AUTO_START
>wrapper.ntservice.interactive=false
>wrapper.ntservice.console=false
>wrapper.working.dir=C:/Test/batch
>
>Awaiting for you valuable suggestions.
>
>Thanks in advance,
>
>Warm Regards,
>Balaji K M.
>
>
|