|
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 |