Right now, this service is registered for any non-SE environment - see also org.jboss.weld.bootstrap.WeldStartup.isEEModulesAwareEnvironment(). However, the integrator (e.g. PAX CDI) could provide its own org.jboss.weld.bootstrap.api.Environment implementation. For Weld 3 we should probably change the SPI, ie. add org.jboss.weld.bootstrap.api.Environment#isEEModulesAware() method with default implementation returning false and use this method in WeldStartup. For Weld 2 we should probably change the logic of WeldStartup.isEEModulesAwareEnvironment() to return false for any env which is not EE_INJECT, EE, SERVLET. |