This content has been marked as final.
Show 1 reply
-
1. Re: LifeCycle events
dimitris Jun 17, 2005 4:10 PM (in response to george80)You only write a SubDeployer if you need to plugin a new package type to jboss (e.g. .myear).
SubDeployers, however, produce notifications whenever something gets deployed/undeployed. For example, to see those notification from the .war deployer, using the NotificationListener mbean, use:<mbean code="org.jboss.monitor.services.NotificationListener" name="jboss.monitor:service=NotificationListener"> <attribute name="SubscriptionList"> <subscription-list> <mbean name="jboss.web:service=WebServer"> <filter factory="NotificationFilterSupportFactory"> <enable type="org.jboss.deployment.SubDeployer.start"/> <enable type="org.jboss.deployment.SubDeployer.stop"/> </filter> </mbean> </subscription-list> </attribute> </mbean>
If you want a different package type (e.g. .sar) configure the corresponding subdeployer objectname.
So either implement a listener mbean and re-act to those notifications using:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ListenerServiceMBeanSupport
or a normal mbean that will be started/stopped in tandem with the deployment/undeployment by using the new barrier controller service:
http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController