"adrian(a)jboss.org" wrote : There's no notion of holding onto a broken bean
| (except for error reporting - see above).
|
Maybe we could add a notion of errorCallback?
i.e. if a bean errors during the startup process then we would invoke this callback,
something like:
| public class Container
| {
| @Install
| public void addContained(Contained contained} { // trivial }
| @Uninstall
| public void removeContained(Contained contained} { // trivial }
| @Error
| public void addError(Contained container) {}
| @Removed
| public void removeError(Contained container) {}
| }
|
The @Removed is because the only time it will go out of the error state
is when it is removed altogether from the controller during the redeploy.
But this seems a bit hacky to me? It's looking less like a POJO
and more like what the class says it is a "Container" ;-)
Perhaps a better approach would be for you to register for events
on your "contained" contexts, so you would actually receive:
Pseudo code
| // Your api
| removeContained(contained);
| // Out-of-band notifications from the MC
| errorOccurred(contained, throwable);
| uninstalled(contained);
| // Re-installed
| addContained(contained);
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130766#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...