"adrian(a)jboss.org" wrote :
| PROPOSAL
|
| I've had a seperate thought which is probably more acceptable to both
| you and to me, ;-)
|
| What you really want to do is manage the state of the failed beans.
| i.e. you want to takeover the management of the context in error from the MC
| and fix it manually.
|
| So my solution would be to allow something like:
|
| xml pseudo code as always ;-)
|
| | <bean ... error-handling="manual"/>
| |
|
| If for example the bean threw an error in start() then we no longer just discard
| this bean. Instead we would effectively change its controller mode to
"manual"
| (if it isn't already) and just then revert it to the previous state. i.e. Created
in this case
| or back to Instantiated if the property configuration failed.
|
| You can then pick up the management of the bean from there.
| When you decide to move the bean, we would just clear the error in the
| controller context and try again (reverting back to automatic if the bean
| was previously in that mode).
|
| We would never try to move a context in such a state without an
| explicit request on the controller to do so.
|
| I don't think this would require a major change in the Controller,
| most of the work would be in the IncompleteDeploymentException
| where we would now have to check all contexts at all states
| to see whether it has an error set (previously we just retrieved those
| in the **ERROR** state).
|
| We may want to only allow this for checked exceptions. i.e. if start throws
| a RuntimeException or Error, we would still discard the bean
| or perhaps make it configurable?
|
| This semantic would deal with my objections above and give you the
| ability to manage the failing beans/contexts without having to re-install them.
Are there any other hooks (api changes), apart ErrorHandlingMode enum, you've had in
mind?
Picking up bean in the Controller can be done with Controller::change.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139322#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...