Date: Fri, 29 Mar 2024 02:12:49 +0000 (UTC) Message-ID: <2117360745.488.1711678369253@cwiki-he-fi.apache.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_487_2019429613.1711678369253" ------=_Part_487_2019429613.1711678369253 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Java-EE5 application servers don't provide a CDI implementation out-of-t= he-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 thi= s 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).
<dependenc= y> <groupId>org.apache.myfaces.extensions.cdi.modules.jee5-support&l= t;/groupId> <artifactId>myfaces-extcdi-jee5-openwebbeans-support</artifact= Id> <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&= gt; <listener-class>org.apache.myfaces.extensions.cdi.openwebbeans.st= artup.WebBeansAwareConfigurationListener</listener-class> </listener>
Add Weld to the project (see the documentation of the project).<= /strong>
<dependenc= y> <groupId>org.apache.myfaces.extensions.cdi.modules.jee5-support&l= t;/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 t= he web.xml with the listener provided by MyFaces CODI.
<listener&= gt; <listener-class>org.apache.myfaces.extensions.cdi.weld.startup.We= ldAwareConfigurationListener</listener-class> </listener>