Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-545

Clarify that observers can't be remote business method

XMLWordPrintable

    • Icon: Clarification Clarification
    • Resolution: Done
    • Icon: Major Major
    • 2.0 .Final
    • 1.2.Final
    • Java EE integration
    • None

      In section 10.4 of 1.2 spec we have:

      If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class.

      in 10.4.2 we also have:

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

      This 2 assertions don't prevent an observer to be a business method of a remote client of an EJB. We should be more precise here and forbid this scenario.

              Unassigned Unassigned
              asabotdu@redhat.com Antoine Sabot-Durand (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: