|
From: Luis G. <lui...@sk...> - 2003-11-05 22:39:57
|
Sal, Yes I am aware of the windows option as in stated in my original message. I just needed confirmation that when the wrapper shutdown that it isn't a clean service shutdown and will invoke the recovery on the services. How I see it is that the wrapper current features and functionality aren't just aiming at running java as a service. It has evolved to be a very strong tool for service availability with the ping timeouts, cpu timeout, and filter action. Those are all monitoring ability of the wrapper. =20 Now the question about sending email can be rephrased. Instead of an email, the ability to execute something on shutdown would leave the door open for everyone to create their own custom tools around the event. Again, my reason for asking is mainly because on some machines we are running 5 different services. Now multiply that 60 machines, that's 300 services that I would need to modify. And our dynamics could change 3 of those services to different configuration for different databases. So, I hope you can understand where I'm heading with these figures. Regards, Luis -----Original Message----- From: Sal Ingrilli [mailto:sal...@sy...]=20 Sent: Wednesday, November 05, 2003 5:03 PM To: wra...@li... Subject: RE: [Wrapper-user] Wrapper notification... i think your request is useful. however i am against it because your adding non-wrapper functionality to the wrapper. additionally you're adding complexity to the development of the wrapper. here are same alternatives 1. use log4j notifications (email and windows event log are supported) 2. use windows service recovery options to run a script if a service fails... windows service recovery: go to administrative tools | services | right-click on your service | recovery -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Luis Guzman Sent: Wednesday, November 05, 2003 10:41 AM To: wra...@li... Subject: [Wrapper-user] Wrapper notification... 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 _______________________________________________________ This message is for the named recipient's use only. It may contain sensitive and private proprietary information. No confidentiality is waived or lost by any incorrect transmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Sakonnet Technology, LLC and its subsidiaries reserve the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: Luis G. <lui...@sk...> - 2003-11-06 04:50:26
|
Leif, Yes tell me about it. What we run is a backend / app / client environment, and our app does a lot of number crunching which requires a lot of system for just one client environment. One of our client has 2 environment, one prod and the second is their test env which they test our new releases. This totals about 30 machines. Plus our own environments for testing and for our other clients givings us the grand total of about 80 machines. =20 We use JBoss as our platform env. Well to put it simple terms. With the exception of the app servers, the computing jobs are sent to servers running several instances of the wrapper launching separate JVMs. Our app isn't multi threaded to handle multiple jobs due to memory constraints with the data that is handled. When that happens, which won't be in the near future, there would only be 1 instance. So we need to have separate JVMs. As you can see, I how truly happy I was to find the wrapper and made every effort to support the software. This has made my job easier to script stopping and starting services and monitoring. =20 We already use log4j to manage our systems logging, etc.. but the issue arises with getting notification when a jvm dies due to out of memory errors, where log4j dies with that jvm. As I read from the previous email, I'm guessing my option of the wrapper on filter.action=3Dshutdown, would not invoke the NT service recovery. = Is this correct or did I misread? So back to the discussion, I can see the issue of supporting multiple events. But since the focus of the wrapper is running jvm as service and providing reliability, this should be limited to events that are not controllable within a JVM which usually turns out to be a JVM shutdown. This should be supported by allowing executing a system call, keeping the changes to the wrapper to a minimal. Thanks for your help. Luis -----Original Message----- From: Leif Mortenson [mailto:le...@ta...]=20 Sent: Wednesday, November 05, 2003 9:58 PM To: wra...@li... Subject: Re: [Wrapper-user] Wrapper notification... Luis, >Now the question about sending email can be rephrased. Instead of an >email, the ability to execute something on shutdown would leave the door >open for everyone to create their own custom tools around the event. > >Again, my reason for asking is mainly because on some machines we are >running 5 different services. Now multiply that 60 machines, that's 300 >services that I would need to modify. And our dynamics could change 3 >of those services to different configuration for different databases. >So, I hope you can understand where I'm heading with these figures. > =20 > If you have 300 copies of the Wrapper running, A) I am impressed, what=20 are you running? But I do see the maintenance problem you are trying to avoid. Once I=20 add the ability to register additional WrapperListeners, this will be easier. But for now, I would suggest making a copy of the WrapperSimpleApp or WrapperStartStopApp class and then=20 modifying the start, stop, and controlEvent methods to do what you need. You will=20 then be able to reuse that new helper class on all of your services without having to modify=20 any other code. You will have problems when you need to upgrade the from the original code=20 on the next release. But hopefully I will be able to modify the classes so that=20 they can be "extended" without the need to modify them in the future. Cheers, Leif ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user _______________________________________________________ This message is for the named recipient's use only. It may contain = sensitive and private proprietary information. No confidentiality is = waived or lost by any incorrect transmission. If you are not the = intended recipient, please immediately delete it and all copies of it = from your system, destroy any hard copies of it and notify the sender. = You must not, directly or indirectly, use, disclose, distribute, print, = or copy any part of this message if you are not the intended recipient. = Sakonnet Technology, LLC and its subsidiaries reserve the right to = monitor all e-mail communications through their networks. Any views = expressed in this message are those of the individual sender, except = where the message states otherwise and the sender is authorized to state = them to be the views of any such entity. Unless otherwise stated, any = pricing information given in this message is indicative only, is subject = to change and does not constitute an offer to deal at any price quoted. = Any reference to the terms of executed transactions should be treated as = preliminary only and subject to our formal written confirmation.=20 |
|
From: Leif M. <le...@ta...> - 2003-11-06 07:29:36
|
Luis,
I'll try to think of a clean way to add the support you are asking
for. I am worried about
whether or not it will be possible in a reasonable cross platform way
without adding too
much complexity to the wrapper's config file. I'll try a few things out
though.
In the mean time, would it be possible to create a method that is
called whenever your
application is first launched. This method would first call
WrapperManager.getJVMId to
find out if the JVM has been restarted. If so, it would load in say the
last 100 lines of the
wrapper.log file. Then send the contents to a system administrator
using java mail. That
should reliably let your sysadmin know whenever a JVM is restarted.
Doing this kind of thing from within Java is pretty easy. Doing it
from within the
Wrapper, in C, doesn't sound like too much fun. I could probably get it
working by
linking in a third party library but that would have the effect of
increasing the size of
the Wrapper binary, most likely by quite a bit
If I set something to simply execute an external command, it would
give the most
flexibility. But then it would be entirely up to the user to implement
things like
mail notifications.
>Yes tell me about it. What we run is a backend / app / client
>environment, and our app does a lot of number crunching which requires a
>lot of system for just one client environment. One of our client has 2
>environment, one prod and the second is their test env which they test
>our new releases. This totals about 30 machines. Plus our own
>environments for testing and for our other clients givings us the grand
>total of about 80 machines.
>We use JBoss as our platform env. Well to put it simple terms. With
>the exception of the app servers, the computing jobs are sent to servers
>running several instances of the wrapper launching separate JVMs. Our
>app isn't multi threaded to handle multiple jobs due to memory
>constraints with the data that is handled. When that happens, which
>won't be in the near future, there would only be 1 instance. So we need
>to have separate JVMs. As you can see, I how truly happy I was to find
>the wrapper and made every effort to support the software. This has
>made my job easier to script stopping and starting services and
>monitoring.
>
Glad to be able to help out. That is a large system. I have one
customer running an
application that is distributed across about 20 systems. A combination
of Windows,
and Solaris. Each of these systems uses less than 128MB so it is a
different scale.
Some of the same issues with keeping them all up and monitored however.
So far the
JVMs have all been quite stable though. I have not heard of even one of
them being
restarted over the last year. It would be nice to have a system set up
to get notification
if and when one of them ever does restart however.
>We already use log4j to manage our systems logging, etc.. but the issue
>arises with getting notification when a jvm dies due to out of memory
>errors, where log4j dies with that jvm.
>
>
True, the out of memory errors are displayed at a much lower level so I
don't think that
log4j would be able to catch them. (?) Not sure about the case where
the stdout/err
PrintStreams have been replaced with user classes.
>As I read from the previous email, I'm guessing my option of the wrapper
>on filter.action=shutdown, would not invoke the NT service recovery. Is
>this correct or did I misread?
>
>
True, I have not used the NT service recovery feature personally, but I
doubt it would
work. I imagine that it is only monitoring the service process. When
that exits, it takes
some action. In this case the Wrapper is the service process. The JVM
is just a child
process of the Wrapper, so I doubt the monitor is even aware it exists.
>So back to the discussion, I can see the issue of supporting multiple
>events. But since the focus of the wrapper is running jvm as service
>and providing reliability, this should be limited to events that are not
>controllable within a JVM which usually turns out to be a JVM shutdown.
>This should be supported by allowing executing a system call, keeping
>the changes to the wrapper to a minimal.
>
>
Lets hear any more ideas and I'll give it some more thought as well.
Cheers,
Leif
|
|
From: Leif M. <le...@ta...> - 2003-11-06 07:45:48
|
Luis,
I logged a feature request for this if you want to add any comments
or suggestions
or just want to monitor the request so you will know about any progress.
http://sourceforge.net/tracker/index.php?func=detail&aid=837037&group_id=39428&atid=425190
We can keep general discussion going here.
Cheers,
Leif
|
|
From: Luis G. <lui...@sk...> - 2003-11-06 15:04:20
|
Leif,
Ahh yes.. Cross platform unity is the issue at hand. And as you said,
the ability to execute is exactly what I'm thinking of.
We already have notifications when there are additions to the
environment, but we actually don't allow the JVM to restart on all but
the JMS server. We prefer at the moment, to analize the situation and
find the cause of jvm to fail. So we set the max_failed_invocations =
=3D1.
So then the service terminates. I should have included this in my
initial email. It probably would have made more sense of my message
when I ask whether or not the wrapper service termination would be a
considered a service failure.
Thanks.
Luis
-----Original Message-----
From: Leif Mortenson [mailto:le...@ta...]=20
Sent: Thursday, November 06, 2003 2:29 AM
To: wra...@li...
Subject: Re: [Wrapper-user] Wrapper notification...
Luis,
I'll try to think of a clean way to add the support you are asking=20
for. I am worried about
whether or not it will be possible in a reasonable cross platform way=20
without adding too
much complexity to the wrapper's config file. I'll try a few things out
though.
In the mean time, would it be possible to create a method that is=20
called whenever your
application is first launched. This method would first call=20
WrapperManager.getJVMId to
find out if the JVM has been restarted. If so, it would load in say the
last 100 lines of the
wrapper.log file. Then send the contents to a system administrator=20
using java mail. That
should reliably let your sysadmin know whenever a JVM is restarted.
Doing this kind of thing from within Java is pretty easy. Doing it=20
from within the
Wrapper, in C, doesn't sound like too much fun. I could probably get it
working by
linking in a third party library but that would have the effect of=20
increasing the size of
the Wrapper binary, most likely by quite a bit
If I set something to simply execute an external command, it would=20
give the most
flexibility. But then it would be entirely up to the user to implement
things like
mail notifications.
>Yes tell me about it. What we run is a backend / app / client=20
>environment, and our app does a lot of number crunching which requires=20
>a lot of system for just one client environment. One of our client has
>2 environment, one prod and the second is their test env which they
test
>our new releases. This totals about 30 machines. Plus our own
>environments for testing and for our other clients givings us the grand
>total of about 80 machines.
>We use JBoss as our platform env. Well to put it simple terms. With
>the exception of the app servers, the computing jobs are sent to
servers
>running several instances of the wrapper launching separate JVMs. Our
>app isn't multi threaded to handle multiple jobs due to memory
>constraints with the data that is handled. When that happens, which
>won't be in the near future, there would only be 1 instance. So we
need
>to have separate JVMs. As you can see, I how truly happy I was to find
>the wrapper and made every effort to support the software. This has
>made my job easier to script stopping and starting services and
>monitoring.
>
Glad to be able to help out. That is a large system. I have one=20
customer running an
application that is distributed across about 20 systems. A combination=20
of Windows,
and Solaris. Each of these systems uses less than 128MB so it is a=20
different scale.
Some of the same issues with keeping them all up and monitored however.
So far the
JVMs have all been quite stable though. I have not heard of even one of
them being
restarted over the last year. It would be nice to have a system set up
to get notification
if and when one of them ever does restart however.
>We already use log4j to manage our systems logging, etc.. but the issue
>arises with getting notification when a jvm dies due to out of memory=20
>errors, where log4j dies with that jvm.
> =20
>
True, the out of memory errors are displayed at a much lower level so I=20
don't think that
log4j would be able to catch them. (?) Not sure about the case where=20
the stdout/err
PrintStreams have been replaced with user classes.
>As I read from the previous email, I'm guessing my option of the=20
>wrapper on filter.action=3Dshutdown, would not invoke the NT service=20
>recovery. Is this correct or did I misread?
> =20
>
True, I have not used the NT service recovery feature personally, but I=20
doubt it would
work. I imagine that it is only monitoring the service process. When=20
that exits, it takes
some action. In this case the Wrapper is the service process. The JVM=20
is just a child
process of the Wrapper, so I doubt the monitor is even aware it exists.
>So back to the discussion, I can see the issue of supporting multiple=20
>events. But since the focus of the wrapper is running jvm as service=20
>and providing reliability, this should be limited to events that are=20
>not controllable within a JVM which usually turns out to be a JVM=20
>shutdown. This should be supported by allowing executing a system call,
>keeping the changes to the wrapper to a minimal.
> =20
>
Lets hear any more ideas and I'll give it some more thought as well.
Cheers,
Leif
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does
SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
_______________________________________________________
This message is for the named recipient's use only. It may contain =
sensitive and private proprietary information. No confidentiality is =
waived or lost by any incorrect transmission. If you are not the =
intended recipient, please immediately delete it and all copies of it =
from your system, destroy any hard copies of it and notify the sender. =
You must not, directly or indirectly, use, disclose, distribute, print, =
or copy any part of this message if you are not the intended recipient. =
Sakonnet Technology, LLC and its subsidiaries reserve the right to =
monitor all e-mail communications through their networks. Any views =
expressed in this message are those of the individual sender, except =
where the message states otherwise and the sender is authorized to state =
them to be the views of any such entity. Unless otherwise stated, any =
pricing information given in this message is indicative only, is subject =
to change and does not constitute an offer to deal at any price quoted. =
Any reference to the terms of executed transactions should be treated as =
preliminary only and subject to our formal written confirmation.=20
|
|
From: Leif M. <le...@ta...> - 2003-11-06 16:19:30
|
Luis, >Ahh yes.. Cross platform unity is the issue at hand. And as you said, >the ability to execute is exactly what I'm thinking of. > > It is not always possible to make everything 100% cross platform. The NT properties and related features are a good example. But I always try where it makes sense. It just makes it than much easier for user who are trying to support multiple platforms. >We already have notifications when there are additions to the >environment, but we actually don't allow the JVM to restart on all but >the JMS server. We prefer at the moment, to analize the situation and >find the cause of jvm to fail. So we set the max_failed_invocations =1. >So then the service terminates. I should have included this in my >initial email. It probably would have made more sense of my message >when I ask whether or not the wrapper service termination would be a >considered a service failure. > > In that case, it might actually work for you. I have never used the NT recovery features, so this may not help. But the Wrapper will always exit with an exit code of 1 if there were any problems. It exits with code 0 if the shutdown was normal. Problem is that I just looked at the code and the Wrapper is not exiting with an error exit code in this case. Let me know what you will need on exit to make it useful for you. It looks like I will have to go through and make sure that cases like this always result in an error exit code. Currently, the exit codes appear to be correct if there are any problems while starting up. Cheers, Leif |
|
From: Sal I. <sal...@sy...> - 2003-11-06 02:04:01
|
thanks for the clarification.
i believe leif already pushes all the service hooks through wrapper
org.tanukisoftware.wrapper.WrapperListener, meaning you can do this without
waiting for the wrapper to support it.
however i can totally see a future version of the wrapper that would execute
java code/scripts in function of events.
so now i'd like to reverse my initial position!
i think it would be great for the wrapper to be able to execute something in
function of a the service events.
for example:
wrapper.on-event.start.execute.1=com.mycompany.NotifyStart
wrapper.on-event.start.execute.2=notifyStart.pl
wrapper.on-event.restart.execute.1=com.mycompany.NotifyReStart
wrapper.on-event.restart.execute.2=notifyReStart.pl
wrapper.on-event.stop.execute.1=com.mycompany.NotifyStop
wrapper.on-event.stop.execute.2=notifyStop.pl
in the first case, the wrapper would execute the given class inline with the
same classpath setup in wrapper.conf.
in the second case, it would execute "start notifyStart.pl"
and similarly for all other events.
there is an additional problem with this:
wrapper.on-event.start.execute.1=com.mycompany.NotifyStart
once you start developing, you'll end up with one class for each event
because the wrapper would just invoke main () on these classes.
it would be preferable to support only 1 class that implements a
WrapperListener type interface which the wrapper could then call for all
events.
then to avoid jvm/jdk incompatibilities, the wrapper would have to use
reflection to invoke the methods.
this would make it a little tougher on the wrapper, but a lot easier on java
programmers using the wrapper.
so the above now becomes
wrapper.on-event.*.execute.1=com.mycompany.WrapperListener
wrapper.on-event.start.execute.2=notifyStart.pl
wrapper.on-event.restart.execute.1=notifyReStart.pl
wrapper.on-event.stop.execute.2=notifyStop.pl
which is the same as what the wrapper already supports through
org.tanukisoftware.wrapper.WrapperListener.
so all it needs to some on-event way of executing specific shellable
programs.
i'll shut up now & see what others have to say...
btw, can the pl programs be fully executed with the Win32 ShellExecute () as
in ShellExecute ("notifyStart.pl") or do you also need to pass the perl
interpreter's path?
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...]On Behalf Of Luis
Guzman
Sent: Wednesday, November 05, 2003 2:40 PM
To: wra...@li...
Subject: RE: [Wrapper-user] Wrapper notification...
Sal,
Yes I am aware of the windows option as in stated in my original
message. I just needed confirmation that when the wrapper shutdown that
it isn't a clean service shutdown and will invoke the recovery on the
services.
How I see it is that the wrapper current features and functionality
aren't just aiming at running java as a service. It has evolved to be a
very strong tool for service availability with the ping timeouts, cpu
timeout, and filter action. Those are all monitoring ability of the
wrapper.
Now the question about sending email can be rephrased. Instead of an
email, the ability to execute something on shutdown would leave the door
open for everyone to create their own custom tools around the event.
Again, my reason for asking is mainly because on some machines we are
running 5 different services. Now multiply that 60 machines, that's 300
services that I would need to modify. And our dynamics could change 3
of those services to different configuration for different databases.
So, I hope you can understand where I'm heading with these figures.
Regards,
Luis
-----Original Message-----
From: Sal Ingrilli [mailto:sal...@sy...]
Sent: Wednesday, November 05, 2003 5:03 PM
To: wra...@li...
Subject: RE: [Wrapper-user] Wrapper notification...
i think your request is useful.
however i am against it because your adding non-wrapper functionality to
the wrapper. additionally you're adding complexity to the development of
the wrapper.
here are same alternatives
1. use log4j notifications (email and windows event log are supported)
2. use windows service recovery options to run a script if a service
fails...
windows service recovery: go to administrative tools | services |
right-click on your service | recovery
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...]On Behalf Of Luis
Guzman
Sent: Wednesday, November 05, 2003 10:41 AM
To: wra...@li...
Subject: [Wrapper-user] Wrapper notification...
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
_______________________________________________________
This message is for the named recipient's use only. It may contain
sensitive and private proprietary information. No confidentiality is
waived or lost by any incorrect transmission. If you are not the
intended recipient, please immediately delete it and all copies of it
from your system, destroy any hard copies of it and notify the sender.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
Sakonnet Technology, LLC and its subsidiaries reserve the right to
monitor all e-mail communications through their networks. Any views
expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorized to state
them to be the views of any such entity. Unless otherwise stated, any
pricing information given in this message is indicative only, is subject
to change and does not constitute an offer to deal at any price quoted.
Any reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does
SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does
SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|
|
From: Leif M. <le...@ta...> - 2003-11-06 03:01:23
|
Sal,
From your examples, I think you may be able to see how complicated a
task this could
quickly become. For now, I would like you think about how this kind of
thing can be
done from within the JVM within user code. If problems that can not be
solved from
within the JVM are encountered, it may be necessary for something to be
implemented
in the Wrapper. But so far, I don't see any such problems.
Cheers,
Leif
Sal Ingrilli wrote:
>thanks for the clarification.
>
>i believe leif already pushes all the service hooks through wrapper
>org.tanukisoftware.wrapper.WrapperListener, meaning you can do this without
>waiting for the wrapper to support it.
>
>
>however i can totally see a future version of the wrapper that would execute
>java code/scripts in function of events.
>so now i'd like to reverse my initial position!
>
>i think it would be great for the wrapper to be able to execute something in
>function of a the service events.
>for example:
>wrapper.on-event.start.execute.1=com.mycompany.NotifyStart
>wrapper.on-event.start.execute.2=notifyStart.pl
>wrapper.on-event.restart.execute.1=com.mycompany.NotifyReStart
>wrapper.on-event.restart.execute.2=notifyReStart.pl
>wrapper.on-event.stop.execute.1=com.mycompany.NotifyStop
>wrapper.on-event.stop.execute.2=notifyStop.pl
>
>in the first case, the wrapper would execute the given class inline with the
>same classpath setup in wrapper.conf.
>in the second case, it would execute "start notifyStart.pl"
>and similarly for all other events.
>
>there is an additional problem with this:
>wrapper.on-event.start.execute.1=com.mycompany.NotifyStart
>
>once you start developing, you'll end up with one class for each event
>because the wrapper would just invoke main () on these classes.
>it would be preferable to support only 1 class that implements a
>WrapperListener type interface which the wrapper could then call for all
>events.
>then to avoid jvm/jdk incompatibilities, the wrapper would have to use
>reflection to invoke the methods.
>this would make it a little tougher on the wrapper, but a lot easier on java
>programmers using the wrapper.
>
>so the above now becomes
>wrapper.on-event.*.execute.1=com.mycompany.WrapperListener
>wrapper.on-event.start.execute.2=notifyStart.pl
>wrapper.on-event.restart.execute.1=notifyReStart.pl
>wrapper.on-event.stop.execute.2=notifyStop.pl
>
>which is the same as what the wrapper already supports through
>org.tanukisoftware.wrapper.WrapperListener.
>so all it needs to some on-event way of executing specific shellable
>programs.
>
>i'll shut up now & see what others have to say...
>
>btw, can the pl programs be fully executed with the Win32 ShellExecute () as
>in ShellExecute ("notifyStart.pl") or do you also need to pass the perl
>interpreter's path?
>
>-----Original Message-----
>From: wra...@li...
>[mailto:wra...@li...]On Behalf Of Luis
>Guzman
>Sent: Wednesday, November 05, 2003 2:40 PM
>To: wra...@li...
>Subject: RE: [Wrapper-user] Wrapper notification...
>
>
>Sal,
>
>Yes I am aware of the windows option as in stated in my original
>message. I just needed confirmation that when the wrapper shutdown that
>it isn't a clean service shutdown and will invoke the recovery on the
>services.
>
>How I see it is that the wrapper current features and functionality
>aren't just aiming at running java as a service. It has evolved to be a
>very strong tool for service availability with the ping timeouts, cpu
>timeout, and filter action. Those are all monitoring ability of the
>wrapper.
>
>Now the question about sending email can be rephrased. Instead of an
>email, the ability to execute something on shutdown would leave the door
>open for everyone to create their own custom tools around the event.
>
>Again, my reason for asking is mainly because on some machines we are
>running 5 different services. Now multiply that 60 machines, that's 300
>services that I would need to modify. And our dynamics could change 3
>of those services to different configuration for different databases.
>So, I hope you can understand where I'm heading with these figures.
>
>Regards,
>Luis
>
>
>-----Original Message-----
>From: Sal Ingrilli [mailto:sal...@sy...]
>Sent: Wednesday, November 05, 2003 5:03 PM
>To: wra...@li...
>Subject: RE: [Wrapper-user] Wrapper notification...
>
>
>i think your request is useful.
>however i am against it because your adding non-wrapper functionality to
>the wrapper. additionally you're adding complexity to the development of
>the wrapper.
>
>here are same alternatives
>1. use log4j notifications (email and windows event log are supported)
>2. use windows service recovery options to run a script if a service
>fails...
>
>windows service recovery: go to administrative tools | services |
>right-click on your service | recovery
>
>-----Original Message-----
>From: wra...@li...
>[mailto:wra...@li...]On Behalf Of Luis
>Guzman
>Sent: Wednesday, November 05, 2003 10:41 AM
>To: wra...@li...
>Subject: [Wrapper-user] Wrapper notification...
>
>
>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
>
>_______________________________________________________
>This message is for the named recipient's use only. It may contain
>sensitive and private proprietary information. No confidentiality is
>waived or lost by any incorrect transmission. If you are not the
>intended recipient, please immediately delete it and all copies of it
>from your system, destroy any hard copies of it and notify the sender.
>You must not, directly or indirectly, use, disclose, distribute, print,
>or copy any part of this message if you are not the intended recipient.
>Sakonnet Technology, LLC and its subsidiaries reserve the right to
>monitor all e-mail communications through their networks. Any views
>expressed in this message are those of the individual sender, except
>where the message states otherwise and the sender is authorized to state
>them to be the views of any such entity. Unless otherwise stated, any
>pricing information given in this message is indicative only, is subject
>to change and does not constitute an offer to deal at any price quoted.
>Any reference to the terms of executed transactions should be treated as
>preliminary only and subject to our formal written confirmation.
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program. Does
>SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program. Does
>SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|
|
From: Leif M. <le...@ta...> - 2003-11-06 02:57:46
|
Luis, >Now the question about sending email can be rephrased. Instead of an >email, the ability to execute something on shutdown would leave the door >open for everyone to create their own custom tools around the event. > >Again, my reason for asking is mainly because on some machines we are >running 5 different services. Now multiply that 60 machines, that's 300 >services that I would need to modify. And our dynamics could change 3 >of those services to different configuration for different databases. >So, I hope you can understand where I'm heading with these figures. > > If you have 300 copies of the Wrapper running, A) I am impressed, what are you running? But I do see the maintenance problem you are trying to avoid. Once I add the ability to register additional WrapperListeners, this will be easier. But for now, I would suggest making a copy of the WrapperSimpleApp or WrapperStartStopApp class and then modifying the start, stop, and controlEvent methods to do what you need. You will then be able to reuse that new helper class on all of your services without having to modify any other code. You will have problems when you need to upgrade the from the original code on the next release. But hopefully I will be able to modify the classes so that they can be "extended" without the need to modify them in the future. Cheers, Leif |