notifications not reaching all registered listeners

Hi,

using rmiconnector..

made the listener unique by adding a unique handbackobject.

and add a listener in each server.

but when I invoke the bean method (which creates the notification), only 1 listener is getting notified?

when i do getnotificationInfo I do see only 1 listener.

this I tried using jsr-160 api in weblogic too. but to no avail.

only 1 listener gets called.

this seems like a bug/issue in.not sure how to get over it.

mbenaserverdelegate is supposed to send it to all listeners, bu it can send only registered/unregistered notifications?

how do i send a acn to all remote listeners in mulitiple servers?

rgds.

[707 byte] By [aphulamba] at [2007-11-27 0:56:49]
# 1

Hi,

The only listener that you see in your MBean is the listener registered by the

RMI Connector server.

The RMI Connector Server acts as a proxy and dispatches the notifications to its

remote clients.

See this thread for more explanations:

http://forum.java.sun.com/thread.jspa?threadID=783711&tstart=120

Hope this helps,

-- daniel

JMX, SNMP, Java, etc...

http://blogs.sun.com/jmxetc

dfuchsa at 2007-7-11 23:30:04 > top of Java-index,Core,Monitoring & Management...
# 2

thanks danielle,

but then the RMI Connector Server sh'd/does the dispatching to

'remote' listeners"..and it doesnot seem to be doing it.

nor is the RMI connector/client doing fetch notification and receiving the notifications.

I see only mbeandelegate which can do that, but is restricted to REGISTERED/UNREGISTERED events broadcasting.

I got over this by using multiple rmi-servers on difft ports( 1 in each jvm/client start ) to registering my mbean and listener. and invoke mbean in each server.

Actually, I would like to

-have 1 mbean and raise a AttributeChangeNotification(acn) in method say doX()

-Start 1st jvm ( port =7001) and start the JMXConnectorServer(url:rmi server at 1099 and register my mbean and listener

- Start 2, 3, 4 server/jvm( port= 7003, 7005, 7007) , connect to rmiserver:1099 using JMXConnector, get mbeanserverconnection, register the listeners( with unique handback object)

-call some action on any port which will do mbean.invoke(mbean, "doX", params, signature);

this sh'd raise a acn and all listeners sh;d get it(the acn) somehow,

this is not happening.

only 1 of the listener/the last listener registered gets it.

Please suggest if there is any way to get the above to work?

Is the steps i used ok ?

Thanks and Regards,

atul

aphulamba at 2007-7-11 23:30:04 > top of Java-index,Core,Monitoring & Management...
# 3

Hi Danielle,

1 more thing:

I end up doing the following in startup servlet

-connect to jmxConnectionServer(rmi port:1099)

-registermbean(mbeanxx)

** I don't get InstanceAlreadyExistsException

-addNotificationListener

in each jvm

-then I call an action where we

use JMXConnector to invoke mbean method that creates a acn(attrib. change notification) and sendNotification()

-it ends up calling the last registered listener...

-When i call multiple invokes, it calls the same listener multiple times.

it does call a listener across jvm

so, probably the mbean registration is overwriting the earlier mbean and only the last listener is register against it.

Regards,

atul

aphulamba at 2007-7-11 23:30:04 > top of Java-index,Core,Monitoring & Management...
# 4

sorry, the mbean query is not returnin the mbean and i end up registering in all jvms. so the listener is probably registered to the local jvm mbean onthe jmxconnectorServer.

so don't know why the last listener on server3 gets called,

when i invoke action on server1 ?

regards,

atul

aphulamba at 2007-7-11 23:30:04 > top of Java-index,Core,Monitoring & Management...