Ich habe eine Frage über das korrekte Format und die Verwendung der Bean.xml-Datei. In meinen Projekten habe ich normalerweise diesen Inhalt für meine bean.xml Dateien (keine Explizit Bohne Deklaration):CDI - Was ist das korrekte Format von bean.xml?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
Das funktioniert gut in Wildfly 8 und 9 Aber ich habe Bereitstellungsprobleme in Glassfish 4. In der Frage : Glassfish 4, simple example in CDI fails with WELD-001408 Unsatisfied dependencies ich schrieb über ein alternatives Format:
<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"
bean-discovery-mode="all">
</beans>
es eine andere Namespace verwendet. Und GlassFish4 scheint sich darum zu kümmern.
Welches Format hat eine leere bean.xml Datei, die für JEE7 verwendet wird?