[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Handling contexts in error
adrian@jboss.org
do-not-reply at jboss.com
Wed Feb 20 08:10:55 EST 2008
"alesj" wrote :
| We could enable the push from Error or just add some more info that this is not what the user should do.
You can't push from error for at least three reasons:
1) In a manual process, you'll have people doing:
change(state1); // This errors
change(state2); // This will error again (pointlessly)
Even worse, it will do the wrong thing at undeploy
deploy:
change(state1); // ok
change(state2); // error -> undeployed
undeploy: (reversing the state machine)
change(state1); // so it has now deployed to state1 during an undeploy????
2) The above can happen transitively where changing the state of one context will
try to push other contexts that depend on it and are now satisfied by
the changed state (again leading to lots of errors)
3) If you change the metadata like you say, then you are supposed to re-install.
Like I've being saying on other threads, we should be cloning that metadata
so your change in the above example would have no affect anyway.
If the deployment has errored then it has gone. The context is only retained
for error summary purposes.
If there was no need for the IncompleteDeploymentException then an
error would have been defined to uninstall.
It's also potentially problematic if somebody changes the BeanMetaData
in a incompatible way midway through the deployment process
which is another reason why we should avoid "out-of-band" changes,
we should require a re-install.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130735#4130735
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130735
More information about the jboss-dev-forums
mailing list