Liberty CDI 1.2 구현에서는 beans.xml 파일의 OpenWebBeans 스키마가 지원되지 않습니다. Liberty CDI 1.2 기능은 Weld 구현을 기반으로 하며, 이 구현은 beans.xml에 대해 Java EE(Java Platform, Enterprise Edition)용 CDI(Contexts and Dependency Injection) 스펙을 준수합니다.
다음 예는 이 규칙으로 플래그 지정되는 beans.xml 파일을 보여줍니다.
<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>
|
다음 예는 CDI 1.2 스펙에 따라 올바르게 정의된 beans.xml 파일을 보여줍니다.
<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>
|
Java EE 7과 함께 제공되는 CDI 1.2의 사용을 고려 중인 경우 Contexts and Dependency Injection 1.2 동작 변경사항을 참조하십시오.