|
From: Leif M. <le...@ta...> - 2003-11-06 02:48:28
|
Luis,
It has already been mentioned, but this is not an area that I am
planning to take the
Wrapper into in the near future. I always try to keep the Wrapper from
being bloated
too much. And these are both features that you can get working with the
current
version of the Wrapper.
The email notifications can easily be implemented using Log4j,
Avalon's LogKit or
directly using the Java Mail API. When your application starts up, you
can make a
call to WrapperManager.getJVMId(). If it returns 1, this is the first
time the JVM has
been launched. 2 or higher indicates a restart.
The idea of executing an external application in response to various
events is also
an interesting idea. But as was shown in the message from Sal, this
will very quickly
start to get complicated. It will also unleash a huge number of support
and feature
requests as people start trying to do various things with it. In this
thread, there has
already been requests to execute perl scripts and Java classes within
the same JVM.
I can also see requests for executing classes in an external JVM, or
various actions
involving the NT service manager or even rebooting the machine.
The thing is that this can all easily be accomplished from within
the JVM by placing
code in an implementation of the WrapperListener class. Currently this
means that
you need to integrate with the Wrapper using Method #3. But I will
look into
adding the ability to register and unregister additional WrapperListener
implementations
with the WrapperSimpleApp and WrapperStartStopApp classes. This should
make
this kind of thing fairly easy.
I am not putting my foot down on this, just telling you my current
thinking.
Cheers,
Leif
Luis Guzman wrote:
>Hi leif,
>
>I was looking into the wrapper.filter.action and was wondering how
>difficult it would be to implement an email notification option? My
>reason for asking, is that it would be easier to manage the set of
>wrapper configuration files than it is to manage each service properties
>to run a script.
>Which on a second note, does the wrapper.filter.action shutdown and
>restart options report to windows as a failure so then I could write a
>perl script that can send out this email notification using the service
>recovery option to run a file.
>
>Thanks.
>
>Luis
>
>
>
|