Hello...
The best result would be if I could get a stop/terminate hook where I could safety finish all the processing threads.
The only WOA I'm running with TC is using the TC environment as a "thin shell" to deploy on linux rather than as a shared container genre of deploy so my approach here may not be totally appropriate to what you are doing. My WOA, like your one, consists of a number of consumer threads which handle and distribute batch processes using JMS queues.
My shutdown procedure is a proprietary (it is not part of WO or TC, but of my own making) one involving various timers and events. Essentially the procedure ignores the servlet container and takes down the WOA inside the container and then takes down the container in a fairly forceful manner. The WOA has its "WOApplication.terminate ()" method invoked in this procedure -- I do this myself.
The consumers are gracefully taken down by the shutdown procedure. I achieved this by timing-out the listening of the consumers on the queues. At the appropriate time, the shutdown procedure will flag the consumer as needing to shutdown. Each consumer will "re-listen" every so often (timeout on JMS receive) and when it re-listens, it will check to see if it ought to be shutting-down. If so it simply stops listening and the thread stops.
cheers. ___ Andrew Lindesay www.lindesay.co.nz _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-deploy mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com This email sent to [email protected]
