[jboss-user] [JBoss Microcontainer] - Adding a CDI extension programatically to a deployed application

Jozef Hartinger do-not-reply at jboss.com
Mon Mar 29 06:40:45 EDT 2010

Jozef Hartinger [http://community.jboss.org/people/jharting] created the discussion

"Adding a CDI extension programatically to a deployed application"

To view the discussion, visit: http://community.jboss.org/message/534412#534412


I have a CDI extension (.jar file) which does some integration with resteasy. I am wondering what is needed to have this extension placed in the AS so that it does not have to be placed in a deployed application. Obviously, I can put the .jar in a lib folder in the AS to have classes on the application's classpath, but that is not enough since the container won't call extension's bootstrap listeners (it will only do it for extensions packaged in WEB-INF/lib, etc..) Therefore, I need to add my extension to the deployed application at runtime somehow.

Is it somehow possible to manipulate the deployment for the container to consider my .jar as deployed within WEB-INF/lib of the application? I guess that a custom deployer is the right place to do this, but I am not sure how to do it (perhaps a classloader or VFS manipulation?) Could you advise which API to use? Thanks in advance for responses.


Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100329/78c27274/attachment.html 

More information about the jboss-user mailing list