[jboss-dev-forums] [Design the new POJO MicroContainer] - Handling contexts in error
alesj
do-not-reply at jboss.com
Wed Feb 20 07:59:36 EST 2008
We should put more info out when users try to manage contexts that are in Error state.
Since currently the only way to do a re-try on that context is to do uninstall/re-install.
Users might try this
| KernelControllerContext context = getControllerContext("Name1", null);
| assertEquals(ControllerState.ERROR, context.getState());
| checkThrowable(ClassNotFoundException.class, context.getError());
|
| // a hacky fix, but the point is to get the error away :-)
| AbstractBeanMetaData bmd = (AbstractBeanMetaData)context.getBeanMetaData();
| bmd.setBean(Object.class.getName());
|
| // we suspect the error was resolved, let's try to install
| change(context, ControllerState.INSTALLED);
|
| assertEquals(ControllerState.INSTALLED, context.getState());
|
which looks legit, but the thing is that the context would not be even touched - the code only tries to push non-error contexts.
We could enable the push from Error or just add some more info that this is not what the user should do.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130730#4130730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130730
More information about the jboss-dev-forums
mailing list