Hi Jan,

> I've been testing hot deploying and undeploying Geronimo services and 
> something odd is going on. I've spent most of the weekend looking at 
> this and not getting any further, so any JMX/MX4J experts out 
> there feel free to respond :-)

I guess I qualify for this ;)

> Essentially, the situation is this:

Hmm, the example is quite complicated, and unfortunately my firewall blocks 
access to geronimo's CVS (and I don't tell you about the lack of time...): 
can't try it.

It seems too trivial to ask, but are you sure you're removing the listener from 
the right MBean (using the right ObjectName) ?

Have you tried to set the system property mx4j.log.priority=trace ? If not, 
please do so and post the output.

I think you choose the correct approach when registering listener(s) in 
preRegister and removing it in preDeregister().

[snip]

> The truly freaky thing is that once any service has been thru the 
> deploy/undeploy/redeploy cycle, any OTHER service that is 
> subsequently 
> deployed also receives duplicate notifications, even if it has never 
> previously been deployed!!!

That sounds really strange and smells of listeners not unregistered.
I would check if there are no long-lived objects that holds listeners around 
(like the MBeanServerDelegate), and be sure to unregister the same listener 
(same as in object identity using ==) that was registered.

Hope helps; ping on me if it does not, I'll try to figure this out with your 
help.

Cheers

Simon

Reply via email to