This content has been marked as final.
Show 3 replies
-
1. Re: EAR postStart and preStop activities
darranl Aug 19, 2005 7:10 AM (in response to jcoffee)You could have a look at the following for notifications from the deployers: -
http://wiki.jboss.org/wiki/Wiki.jsp?page=ReceiveJMXDeploymentNotifications -
2. Re: EAR postStart and preStop activities
jcoffee Aug 19, 2005 7:24 AM (in response to jcoffee)Thanks for your quick reply. It at least points the direction. But it's still hard for me to figure out what actually to write and where to put it. (Documentation has never been a strength of JBoss. Hope the books I've ordered will mend this...)
Klaus -
3. Re: EAR postStart and preStop activities
jcoffee Aug 19, 2005 11:21 AM (in response to jcoffee)Now I managed to get a start notification of the EARDeployer. But no chance to get a notification before undeploy. My jboss-service.xml is like:
<server> <mbean code="com.jcoffee.test.jboss.NotificationListener" name="jcoffee.ear:name=NotificationListener"> <attribute name="SubscriptionList"> <subscription-list> <mbean name="jboss.j2ee:service=EARDeployer"/> </subscription-list> </attribute> </mbean> </server>
My listener class extends ListenerServiceMBeanSupport, subscribes in startService() with subscribe(true) and implements handleNotification2(). All this put in an SAR , added to my EAR and declared in jboss-app.xml deploys nicely, but all I can get is a notification after (re)deploy but none before undeploy. Anyone any comments on this?