beans.xml in Java EE 7

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

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.

Please remember the terms for blog comments.