users@glassfish.java.net

Deployer control over CDI

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 Jun 2010 20:25:48 PDT

I have a Java EE 6 web app that contains a jar that contains some web services annotated classes as well as some other classes annotated with JSR330 and 250 annotations. When the app is deployed to GFv3 the web services are automatically deployed even though the web app and jar do not contain a beans.xml file and the web services are not referenced in the web.xml

Coming from a Spring background which allows the deployer to explicitly define instances and injection relations from what I experienced with CDI it is like a big melting pot where beans are jumbled together and hopefully the injections turn out correctly. Qualifiers and Alternatives seem useful but inadequate.

As a deployer given a static library containing beans how can I tell the CDI container to ignore certain beans during auto discovery or create multiple instances of a given type and associate (i.e. wire) them together as desired? Is there a CDI extension that can accomplish this?
[Message sent by forum member 'aaronanderson']

http://forums.java.net/jive/thread.jspa?messageID=475445