Overview
Other MyFaces Extensions
- ExtVal
- Ext-Script
- [Orchestra]
- [Portlet Bridge]
Community
Development
Sponsorship
Your browser does not support iframes
Java-EE5 application servers don't provide a CDI implementation out-of-the-box. So it's possible to use an implementation of your choice. However, the problem is that there is no given order for the bootstrapping process. Therefore, it's required to ensure that the CDI container gets bootstrapped before the JSF container. The Java-EE5 support modules ensure that and this page shows how to use them.
Hint
This modules are available since v1.0.3
Add Apache OpenWebBeans to the project (see the documentation of the project).
<dependency> <groupId>org.apache.myfaces.extensions.cdi.modules.jee5-support</groupId> <artifactId>myfaces-extcdi-jee5-openwebbeans-support</artifactId> <version>${myfaces.codi.version}</version> <scope>runtime</scope> </dependency>
Furthermore, you have to replace the WebBeans listener in the web.xml with the listener provided by MyFaces CODI.
<listener> <listener-class>org.apache.myfaces.extensions.cdi.openwebbeans.startup.WebBeansAwareConfigurationListener</listener-class> </listener>
Add Weld to the project (see the documentation of the project).
<dependency> <groupId>org.apache.myfaces.extensions.cdi.modules.jee5-support</groupId> <artifactId>myfaces-extcdi-jee5-weld-support</artifactId> <version>${myfaces.codi.version}</version> <scope>runtime</scope> </dependency>
Furthermore, you have to replace the Weld listener in the web.xml with the listener provided by MyFaces CODI.
<listener> <listener-class>org.apache.myfaces.extensions.cdi.weld.startup.WeldAwareConfigurationListener</listener-class> </listener>