MBeans deregistered before stop service lifecycle method called.

54 views
Skip to first unread message

Shawn White

unread,
Apr 5, 2024, 3:42:52 PMApr 5
to WildFly
Working on a JBoss 5 to Wildfly 26.1.3 migration and seeing some difference in MBean behavior during shutdown.

With JBoss 5, MBean stop methods are called first then deregistered.

With Wildfly 26.1.3, MBeans are being deregistered, then stop methods called.

This causes InstanceNotFoundExceptions if there are dependencies between MBeans as they are no longer available to make calls to.

Is this behavior standard or is this a bug in Wildfly?

I don't see any documentation of this change. The only thing documented is the service pattern and the create, start, stop, and destroy methods.






Brian Stansberry

unread,
Apr 9, 2024, 7:00:37 PMApr 9
to WildFly
I believe this has been the behavior going back at least to JBoss AS 7. I'm not sure about AS 6.

Can you provide more information about how this causes problems? If an mbean depends upon another I wouldn't expect it be possible to call it once the process of stopping it begins.

Is it a case of A depends on B, and then B wants to stop, but A must stop first (due to the dependency) and then when stop is called on A it fails because B is already unregistered?

Best regards,
Brian

Reply all
Reply to author
Forward
0 new messages