Closed fiorenzino closed 6 years ago
Very good idea!
I tried to move the AppGlobalsProducer class in the redpipe-cdi module, but weld ignore this and i have this error in the class where inject vertx or eventbus.
Have you an idea to activate the AppGlobalsProducer?
The error: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type EventBus with qualifiers @Default at injection point [UnbackedAnnotatedField] @Inject net.redpipe.example.cdi.helloworld.HelloResource.eventBus at net.redpipe.example.cdi.helloworld.HelloResource.eventBus(HelloResource.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:362)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:137)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:158)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:501)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:61)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:59)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I'll try to reproduce.
Worked for me, added code very similar to yours, thanks a lot.
Should be usefull a cdi producer like:
public class AppGlobalsProducer {
}
To inject:
@Inject EventBus eventBus;