jBoss CVS Development wrote:
> Modified: src/main/org/jboss/util ServiceControl.java
> Log:
> Added one method to run over all MBeans on a server. Start, Stop, Init and Destroy
>all use this method.
> Implemented stop and destroy, since the server wasn't shutting down at all.
Good thinking, but doesn't work as it should! Comments below.
> + public void invokeOnMBeans (String methodname, String aboutaction, String
>action, String pastaction)
> + {
> + log.log(aboutaction + " "+mbeans.size()+" MBeans");
> +
> + List mbeansCopy = new ArrayList(mbeans);
> + Iterator enum = mbeansCopy.iterator();
> + int serviceCounter = 0;
> + while (enum.hasNext())
First problem: "stop" and "destroy" should be applied in *reverse*
order. The current code always does stop and destroy in the same order
as startup.
> + // Register start/stop listener
> + try {
> + server.addNotificationListener(name,
> + this,
> + null,
> + name);
This should only be done on MBean registration!
These needs to be fixed ASAP.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]