Goes for Glassfish as well as JBoss it seems.
This sort of defies one purpose of dependency injection. You
want to be able to code alternative implementations in a library,
but have the application using that library decide deploy-time
which implementation to use.
Strangely enough this works in Tomcat 7 with Weld included in the jar.
I believe following ticket is about this issue:
https://issues.jboss.org/browse/CDI-18
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+ <alternatives>
+ <class>com.indexdata.pz2utils4jsf.config.Pz2ConfigureByWebXml</class>
+ <!-- -->
+ </alternatives>
+
+
</beans>
\ No newline at end of file