Uploaded image for project: 'Red Hat CodeReady Studio (devstudio)'
  1. Red Hat CodeReady Studio (devstudio)
  2. JBDS-1420

CDI producer method incorrectly recognized as invalid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 4.0.0.CR1
    • 4.0.0.Beta1
    • None
    • None
    • Release Notes

    Description

      JBDS incorrectly interprets the section 3.3.2 of the CDI spec. The spec says:

      "If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the session
      bean, the container automatically detects the problem and treats it as a definition error."

      The violation of the spec is incorrectly recognized on the bean class local view session beans (those since ejb 3.1 that no longer need an explicit local interface)

      having the following bean:

      @Stateful
      public class TestBean {

      @Produces
      @Named("foo")
      public String foo()

      { return "foo"; }

      }

      JBDS considers the producer method as incorrect even though all the public methods of the bean class local view session bean are its business methods and thus the producer method is valid.

      Attachments

        Issue Links

          Activity

            People

              alexeykazakov Alexey Kazakov
              rhn-engineering-jharting Jozef Hartinger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: