-
Feature Request
-
Resolution: Obsolete
-
Minor
-
JBossAS-5.0.0.GA
-
None
Currently, HASingletonController can only control and mbean, and relies on awkward reflection-based mbean method invocation to start/stop the target singleton.
IMO, a better approach, using microcontainer configuration, would involve simple injection the target bean. The target bean would implement org.jboss.ha.framework.interfaces.HASingletonLifecycle. The HASingletonController simply delegates its own startSingleton()/stopSingleton() methods to the same methods on the target bean. An alternate implementation might use annotations marking the start/stop methods, rather than requiring the target bean to implement an interface.