Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1207

should CDI be autodetected when javax.annotation.* is present? or detect CDI based on presence of beans.xml?

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2017.4.0
    • Component/s: None
    • Labels:
      None

      Description

      When playing with the websocket-endpoint EAP quickstart, I found a class which is a WebSocket @ServerEndpoint utilizing a @PostConstruct annotation (see BidWebSocketEndpoint).

      I'm not exactly sure which container is responsible for processing those annotations in Java EE in general, but in that specific quickstart, it's apparently meant to be the CDI container, because the class is not an EJB, and there's a beans.xml file specifying bean-discovery-mode="all".

      (I guess the EJB container is supposed to process them as well, but if a class is an EJB, the ejb fraction is autodetected by other means.)

      So I believe that either the javax.annotation.* annotations should trigger adding some fractions (but which ones?), or that the presence of beans.xml file should trigger adding the CDI fraction.

      Thoughts?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                lthon Ladislav Thon
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: