|
In my project, I have a class EntityManagerProducer. I have another class InitializerConfig that injects an EntityManager, which comes from a producer method in EntityManagerProducer.
EntityManagerProducer has no injections. And yet, if InitializerConfig is dependent-scoped, I get this warning:
If InitializerConfig is application-scoped instead, this warning does not appear. InitializerConfig has no other injections.
I also have another application-scoped class ClusterSupportConfigurator that injects InitializerConfig (and nothing else). It produces a JChannel, and a different class injects @Any Instance<JChannel> and iterates over all produced JChannels. The iteration occurs twice: once during startup to connect all the JChannels, and again during shutdown (in a @PreDestroy method) to close all the JChannels. Again, I get a bogus circular injection warning, but curiously, this only happens during shutdown:
In all cases, Weld doesn't provide any information to indicate what beans it thinks are part of this phantom cycle.
|