|
From: Leif M. <le...@ta...> - 2007-03-25 00:34:01
|
Corey, This is a feature that is currently under development. Unfortunately, the way you are doing it is not reliable. It is the simple way to do it. But will only allow reports to be sent for successful restarts of the JVM. In order to make sure that mails are send for all failure modes, the events must be mailed from the wrapper.exe process (developed in C). If you want to do something in Java, you can tell after a restart has happened by looking at the JVM Id from the WrapperManager on startup. If it is greater than 1 then you know that a restart has just occurred. Cheers, Leif Corey Ellis wrote: > Hi, > > We have started to use the Java Service Wrapper (great app!!), and we > are required to send traps when upon graceful startup, graceful > shutdown, and when the wrapper detects a problem with the application > and restarts ( i.e. kill -9 of the process). > > We have integrated code into the WrapperSimpleApp class to send traps > in the start and stop methods. This is working for the first two > requirements graceful startup/shutdown, but I need to know where to > hook in, in order to be able to send a trap when the wrapper attempts > a restart for any reason ( i.e. Exception, process dies, etc.). I > thought that the controlEvent method would be the right place, but I > am not sure it is. > > If someone can point me to the right place (class, method) in order to > generate an SNMP trap upon application failure this will be great. > What we really want is as follows: > > 1. Once the wrapper has attempted to restart the application the > configured amount of times, then send an alarm. This way we will only > send an alarm if the wrapper fails to restart the application. > > Thanks > Corey |