Well, I'm still attempting to recieve notifications on EJB Deployment. 
After looking into this for a long time, I felt the best way was to use 
the MEJB event notification as specified in the JSR-77.

Here's the story.

- I wrote the NotificationListner, which implements 
javax.management.NotificationListner.
- I wrote the NotificationFilter, which implements 
javax.management.NotificationFilter (currently this just returns true, 
which is equivalent to passing a null filter)
- I wrote an agent who is responsible for creating the MEJB interface 
and registering the listener.  Currently this is invoked manually 
(eventually I would like this to be a managed utility that gets invoked 
as system startup, but that is not important at this time).  I register 
the listener to listen to notification events being broadcasted from the 
service=MainDeployer.
-------
Up to this point everything works as expected.
-------
So what happens when a Deployment notification occurs.  I manually 
remove/add an EAR to the deployment directory and get the following 
error: server.log ......

2002-07-24 15:35:24,324 INFO  [org.jboss.deployment.MainDeployer] 
Undeployed file:/C:/java/jboss-3.0.0/server/all/deploy/MII.ear
2002-07-24 15:35:24,324 INFO  [STDOUT] 
RMINotificationListener.handleNotification() , notification: 
javax.management.Notification[source=jboss.system:service=MainDeployer], 
handback: null, client listener: 
org.jboss.management.mejb.RMIClientNotificationListener_Stub[RemoteStub 
[ref: [endpoint:[129.83.68.35:2911](local),objID:[7]]]]
2002-07-24 15:35:24,334 ERROR 
[org.jboss.deployment.scanner.URLDeploymentScanner] Failed to undeploy: 
org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@c092ba50{ 
url=file:/C:/java/jboss-3.0.0/server/all/deploy/MII.ear, 
deployedLastModified=1027537520945 }
java.lang.RuntimeException: Error unmarshaling return header; nested 
exception is:
        java.net.SocketException: Connection aborted by peer: JVM_recv in socket 
input stream read
        at 
org.jboss.management.mejb.RMINotificationListener.handleNotification(RMINotificationListener.java:76)
        at 
org.jboss.mx.server.NotificationListenerProxy.handleNotification(NotificationListenerProxy.java:71)
        at 
javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:84)
        at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:354)
        at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:317)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
        at $Proxy4.undeploy(Unknown Source)
        at 
org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:427)
        at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:508)
        at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
        at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

------------------------------------

The above error message occurs during an undeployment.  During 
deployment error is very similar.  I've been scratching my head at this 
for a while.  If anyone has any advice I would greatly appreciate it. 
I'm sure I'm missing something but I can't think of it.

Question:  Should the NotificationListner and NoficationFilter be remote 
interfaces?

-- 
<Mike/>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to