beans.xml in Java EE 7

If you are familiar with CDI (Contexts and Dependency Injection) you know that in Java EE 6 you need a beans.xml in META-INF or WEB-INF the module for getting the CDI magic to work. Basically it is needed for the beans discovery. Everyone has now and then maybe forgot the beans.xml. With Java EE 7 it has changed.

CDI is now enabled by default. This means that there’s no need to explicitly add a beans.xml to enable DI any more. Java EE 7 offers finer grained control in the beans discovery. Read more Default CDI enablement in Java EE 7.