|
From: Leif M. <le...@ta...> - 2004-09-04 16:21:23
|
Andrew Dickson wrote: >I never use WrapperSimpleApp because of its lack of a controlled shutdown, and >WrapperStartStopApp does not fit my usual pattern. Therefore, I always find >myself implementing WrapperListener (3rd integration option). The use of this >interface seems restricted to that of a helper class to launch the service, >however I often find myself wanting to implement this directly in the service >class itself. > > What exactly are you having problems with on Shutdown. You can do a controlled shutdown with the WrapperSimpleApp class by registering a shutdown hook. This is a good option as your application will shutdown cleanly even when not using the Wrapper. The WrapperStartStopApp can be used to execute a second class's main method when the Wrapper shuts down. You can easily make use of this by creating a new Shutdown class which has a main method. I used the 3rd method when I first created the Wrapper. But once the other two methods were created, I have not even once found it necessary to use method #3 again. I am interested the exact problems you are encountering that make you feel you need to use method #3. It may be that I need to add additional functionality to the first 2 methods or create a new helper class. If you, Eric, and Venkatesh are finding it necessary to write your own helper classes then it would make more sense for me to include such a class with the Wrapper. Cheers, Leif |