"alesj" wrote : It should be then the job of WeldKCC to cleanup this
intermediate bean (IB).
|
| e.g.
| BMDD + WeldKCCC --> IB
| IB::start --> WeldKCC and add DepItem on WeldKCC for IB to be Installed
| * WeldKCC depends on Installed IB in X
| * WeldKCC uninstalls IB in X+1
|
| It looks a bit hackish, but that's the cost of tying WeldKCC with BootstrapBean.
| And if I'm not yet too sleepy, this should properly cleanup.
|
I am doing this via an install now. IB's create() and uninstall methods:
| public void create() throws Exception
| {
| BeanMetaDataBuilder builder =
BeanMetaDataBuilder.createBuilder(beanMetaDataHolder.getBeanMetaData());
| builder.addInstallWithThis("installCreatedBean",
(String)context.getName(), ControllerState.INSTALLED);
|
| WeldKernelControllerContext ctx = new WeldKernelControllerContext(null,
beanMetaDataHolder.getBeanMetaData(), null, manager);
|
| try
| {
| context.getController().install(ctx);
| }
| catch(Throwable t)
| {
| throw new Exception(t);
| }
| }
|
| /**
| * Called when the created bean reaches INSTALLED state.
| * Uninstalls the context of this temp bean
| */
| public void installCreatedBean(Object createdBean)
| {
| context.getController().uninstall(context.getName());
| }
|
I will make the tests more complete with regard to injection between MC and Weld and then
look at the other cleanup issue you mention.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264076#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...