Lo schema OpenWebBeans del file beans.xml non รจ supportato nell'implementazione di Liberty CDI 1.2. La funzione Liberty CDI 1.2 si basa sull'implementazione di Weld, che soddisfa la specifica CDI (Contexts and Dependency Injection) per Java EE (Java Platform, Enterprise Edition) per beans.xml.
Il seguente esempio mostra un file beans.xml che viene contrassegnato da questa regola.
<WebBeans xmlns="urn:java:ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:java:ee http://java.sun.com/jee/beans-1.0.xsd">
...
</WebBeans>
|
Il seguente esempio mostra un file beans.xml definito correttamente in base alla specifica CDI 1.2.
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"> </beans> |
Se si prevede di utilizzare il CDI 1.2 fornito con Java EE 7, consultare Contexts and Dependency Injection 1.2 behavior changes.