Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-459

cycle in Wizzard class producer

XMLWordPrintable

      org.jboss.cdi.tck.tests.implementation.enterprise.newBean.Wizard has a cycle which is very similar to the constellation of CDITCK-427.

      @RequestScoped
      public class Wizard {
          @Inject
          @Tame
          private Dragon dragon;
      
          @Produces
          @Tame
          public Dragon summon(@New Dragon dragon) {
              return dragon;
          }
      }
      

      For calling the producer method we would need to create the bean upfront, which we cannot as @Tame Dragon is not yet produced. This is essentially a dependency cycle which is illegal.

              tremes1@redhat.com Tomas Remes
              struberg Mark Struberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: