Issue Type: Bug Bug
Affects Versions: 2.1.2.Final
Assignee: Jozef Hartinger
Created: 13/Feb/14 3:39 PM
Description:

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:

15:16:47,079 WARN  [org.jboss.weld.Bean] (main) WELD-000018: Executing producer field or method [BackedAnnotatedMethod] @Produces com.sgi.song.gp.database.EntityManagerProducer.produceEntityManager() on incomplete declaring bean Managed Bean [class com.sgi.song.gp.database.EntityManagerProducer] with qualifiers [@Any @Default] due to circular injection

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:

15:27:13,239 WARN  [org.jboss.weld.Bean] (Thread-2) WELD-000018: Executing producer field or method [BackedAnnotatedField] @Produces @ClusterMessaging private com.sgi.song.gp.protocol.SONGv1.cluster.ClusterSupportConfigurator.channel on incomplete declaring bean Managed Bean [class com.sgi.song.gp.protocol.SONGv1.cluster.ClusterSupportConfigurator] with qualifiers [@Any @Default] due to circular injection

In all cases, Weld doesn't provide any information to indicate what beans it thinks are part of this phantom cycle.

Project: Weld
Priority: Major Major
Reporter: Rich DiCroce
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to