[jboss-user] [Microcontainer] - Re: To get Event when Jboss is called for shutdown
alesj
do-not-reply at jboss.com
Mon Feb 25 05:47:56 EST 2008
Or, there is already a nice hook provided for you.
In the form of Bootstrap interface - see AbstractServerImpl.
| // Do the bootstraps in reverse order
| for (Bootstrap bootstrap : startedBootstraps)
| {
| Thread.currentThread().setContextClassLoader(bootstrap.getClass().getClassLoader());
| try
| {
| bootstrap.shutdown(this);
| }
| catch (Throwable t)
| {
| log.warn("Error shutting down bootstrap: " + bootstrap, t);
| }
| }
|
Simply implement your behavior in some Bootstrap impl, and add this bean to bootstrap-beans.xml.
It will get automatically picked up by ServerImpl, and added to the list of all bootstraps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131784#4131784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131784
More information about the jboss-user
mailing list