I have a question about the correct format and usage of the bean.xml file. In my projects I typically used this content for my bean.xml files (no explizit bean declaration used):
<?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>
This works well in WildFly 8 and 9. But I have deployment issues in GlassFish 4. In the question: Glassfish 4, simple example in CDI fails with WELD-001408 Unsatisfied dependencies I wrote about an alternative 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>
There a different namespaces used. And GlassFish4 seems to care about that.
What is the correct format of an empty bean.xml File used for JEE7 ?