STARTED Notification delayed until redeploy?
daniel.gaiottino Mar 20, 2009 1:42 PMHi,
I'm running JBoss 4.2.3 and I'm trying to listen to JMX Notifications and have the NotificationListenerMBean example working so that I can actually see notifications being logged.
My problem is that I only receive the end notification i.e. STARTED or FAILED when I redeploy the app!?! Anyone seen this happen before?
Here's a dump from my server log.
17:33:23,939 ERROR [bieg.NotificationListener] $$$START_DEPLOYER: file:/home/daniel/messaging-platform/JBoss423a/server/custom1/deploy/webs/100.test.ear 17:33:23,945 INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/home/daniel/messaging-platform/JBoss423a/server/custom1/deploy/webs/100.test.ear
You can clearly see that I get the START_DEPLOYER Notification but not the STARTED Notification which I would expect since the INFO line says "17:27:30,375 INFO [org.jboss.deployment.EARDeployer] Started J2EE..."
If I now redeploy the ear.
17:34:34,032 INFO [org.jboss.web.tomcat.service.TomcatDeployer] undeploy, ctxPath=/mpee, warUrl=.../tmp/deploy/tmp17927100.test.ear-contents/test.war/ 17:34:34,035 INFO [com.telrock.platform.context.listener.ServiceManager] Removing the hibernate stuff from JNDI 17:34:34,257 ERROR [bieg.NotificationListener] $$$STARTED: file:/home/daniel/messaging-platform/JBoss423a/server/custom1/deploy/webs/100.test.ear 17:34:34,305 ERROR [bieg.NotificationListener] $$$STOPPED: file:/home/daniel/messaging-platform/JBoss423a/server/custom1/deploy/webs/100.test.ear
And then I start getting the INIT_DEPLOYER Notifications. I've tried this for all the different Deployers (ServiceDeployer, JARDeployer, EARDeployer, EJBDeployer, RARDeployer, WebServer). I never receive the STARTED notification when it has actually started.
Again, I'm running the sample code and the handleNotification2 is
public void handleNotification2(Notification notification, Object handback) { //log.error("Got notification: " + notification + ", handback: " + handback); DeploymentInfo deploymentInfo = (DeploymentInfo) notification.getUserData(); log.error("$$$" + deploymentInfo.state + ":\t\t " + deploymentInfo.watch); }
Hoping someone has the answer to this.
Thanks,
- Daniel