I have no idea, but my @Inject objects are not initialized with Weld inside of the ManagedService, my example is like this,
@ManagedService(path = "/chat") public class EntryPointWS {
private final Logger logger = LoggerFactory.getLogger(EntryPointWS.class);
@Inject private ServiceFactory factory;
}
The same project or code, If i use a normal Servlet to access Weld will initialize the objects for me. Also, I'm running on Tomcat 8, it works fine with the Servlet injection though. Also, ServiceFactory is annotated as @ApplicationScoped.
Just to be clear, to add some more points,
- org.atmosphere.cdi.CDIObjectFactory (from the cdi pom) is defined in
- The @Inject doesn't work in AtmosphereInterceptorServices as well.