[jboss-user] [Microcontainer] - Re: Programmatically deploying an object

alesj do-not-reply at jboss.com
Thu May 7 02:51:24 EDT 2009


"mwringe" wrote : so I can't just add it to the beans.xml file and it doesn't have a direct reference to the mircocontainer kernel.
  | 
Sure you do. ;-)

Check the glue code that I wrote for Seam/webBeans:
 - http://anonsvn.jboss.org/repos/jbossas/projects/mc-int/trunk/servlet/

"mwringe" wrote : 
  | Is there some sort of preferred method to programmatically deploy an object into a microcontainer in this situation?
  | 
You can either get the MainDeployer / DeployerClient from
* the Controller via "MainDeployer" name (which is too impl specific)
* DeploymentUnit::getMainDeployer

Then simply create pre-determined deployment (StructureContext + metadata attachments),
and deploy it as any other deployment via DeployerClient.

But if you just wanna deploy some bean, install it directly against KernelController.
Just make sure you remove/undeploy it at some listener's undeploy.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229268#4229268

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229268



More information about the jboss-user mailing list