"kabir.khan(a)jboss.com" wrote :
| I will see if I can make
'vfs://top-level.ear/BootstrapBeanInstaller=SimpleBean' uninstall itself, but it
feels a bit strange to do that from its start() method.
It leaves the context in an inconsistent state
| public void start() throws Exception
| {
| BeanDeploymentArchive archive =
deployment.getBeanDeploymentArchives().iterator().next();
|
| if (deployment.getBeanDeploymentArchives().size() > 1)
| log.warn("More than one bean deployment archives, using the first "
+ archive);
|
| BeanManager manager = bootstrapBean.getBootstrap().getManager(archive);
| if (manager == null)
| throw new IllegalStateException("Could not find a manager for archive
" + null);
|
| WeldKernelControllerContext ctx = new WeldKernelControllerContext(null,
beanMetaDataHolder.getBeanMetaData(), null, manager);
|
| try
| {
| context.getController().install(ctx);
| }
| catch(Exception e)
| {
| throw e;
| }
| catch(Throwable t)
| {
| throw new Exception(t);
| }
| finally
| {
| ControllerContext me = context;
| context.getController().uninstall(context.getName());
| System.out.println(me);
| }
| }
|
context is the context of the bean. The call to uninstall completes successfully,
unconfiguring the target and setting it to null. However, when StartStopLifecycleAction
completes and ends up back in incrementState() the context is picked up and moved through
the remainder of the states.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263813#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...