I don't really understand what you are trying to do?
Guessing...
INSTALL - MC wiring
The add/removeContained looks like either the install or installCallback stuff.
However, if a bean goes to the error state then it will have its uninstall or
uninstallCallback invoked. There's no notion of holding onto a broken bean
(except for error reporting - see above).
CONTROLLER - a bit more control for yourself
If you want to control the states manually then consider writing your own
facade over the MC controller, e.g. take a look at what the ServiceController
(in the jbossas system-jmx project) does to support the legacy JMX api.
i.e.
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/system-jmx/src/m...
* stopping and starting mbeans from the mbean's own jmx operations
mbeanserver.invoke() -> mbean.stop() -> servicecontroller.stop() -> MC
* emulating the old SAR deployer or programmatic use of the ServiceController
to manually change the mbean states
* maintaining the legacy ServiceContext and listing them by state
[
url]http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/system-jmx/s...]
e.g. List listIncompletelyDeployed() {...}
etc.
For your usecase, it doesn't sound like it needs to be as complicated
as the JMX stuff, but the "invokeStart() delegates to" sounds like a
facade/wrapper
to me?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130761#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...