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

NormalSelfConsumingDependentProducer is illegal

XMLWordPrintable

    • 0
    • 0% 0%

      NormalSelfConsumingDependentProducer is an illegal class.

      This class contains a producer method for a @Dependent scoped bean 'Violation' and also an injection point for this very bean.

      So for invoking the producer method on the bean we first need to inject all @Inject ct, fields, methods and then call any @PostConstruct method.
      And only AFTER that we are allowed to invoke the producer method. This is not perfectly clear from the CDI spec itself, but you can deduct this from JSR-250 @PostConstruct wording. (see 'must not be put into service').

      But we cannot @Inject Violation before we have the owner bean class created...

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

              Created:
              Updated:
              Resolved: