-
1. Re: Callbacks from MBean to another MBean?
moatas Dec 20, 2001 7:15 AM (in response to moatas)Would it work to bind my MBean to the registry and use JNDI to look it up? If I do, and I add an instance of the calling MBean as a listener, can I still get a handle to it?
Jim -
2. Re: Callbacks from MBean to another MBean?
davidjencks Dec 20, 2001 9:37 AM (in response to moatas)You could use the mbean notification mechanism or one bean could have a addListener type method in its mbean interface and the other could call it through jmx with itself as the parameter. I recommend that you simply communicate through the jmx server using object names to identify the components rather than pulling in jndi, which adds nothing (IMHO).
-
3. Re: Callbacks from MBean to another MBean?
marc.fleury Dec 20, 2001 9:53 AM (in response to moatas)I agree with David, the MBean notification is what you want that being said I disagree with the JNDI usage, I just think JNDI usage is overkill and actually in 3.0 I put a org.jboss.system.Registry that takes the OBjectnames and returns the reference.
The advantage, david? API coding and compile time checks... as you saw I commited stuff yesterday with "undeploy" not existing on the target ;)
marcf -
4. Re: Callbacks from MBean to another MBean?
iancole Dec 20, 2001 10:06 AM (in response to moatas)Is there a document / example that illustrates working with the JMX server? I don't have any code / docs off CVS - perhaps that's why I'm overlooking it - thanks!
Ian -
5. Re: Callbacks from MBean to another MBean?
moatas Dec 20, 2001 8:28 PM (in response to moatas)I used the addListener/removeListener without a problem. I get a handle to the Service by using MBeanProxy and it all works great! Thanks!
Jim -
6. Re: Callbacks from MBean to another MBean?
mishamf Dec 26, 2001 9:00 PM (in response to moatas)which version is MBeanProxy supported? I cannot find it on 2.4
thanx
_mike -
7. Re: Callbacks from MBean to another MBean?
mishamf Dec 26, 2001 9:02 PM (in response to moatas)never mind. found it.