Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3845

Injection not working in JAX-WS handlers from predefined configurations

    XMLWordPrintable

    Details

      Description

      Reproduce:
      1- deliver the linked jaxws webapp on EAP6.3
      2- add the CDIHandler using the the CLI (eg.) or running the given standalone.xml
      $ cd /subsystem=webservices/endpoint-config=Standard-Endpoint-Config/
      $ /pre-handler-chain=C1:add
      $ /pre-handler-chain=C1/handler=H1:add(class="org.jboss.as.quickstarts.wshelloworld.CDIHandler")
      $ :reload
      3- Invoke

      • HelloWorldService.sayHello()

      I expect:
      A- the CDIBean to be injected
      B- the server replying correctly

      Instead
      B- the injection doesn't happen and the handler raises an exception

      Running the Handler via the @HandlerChain annotation (using the provided HandlerServiceImpl) and removing the handlerchain from jboss everything works fine.

      Debugging I found that those handlers are created via ConfigHelper.setupConfigHandlers which does a clazz.newInstance(). Probably this doesn't go through the CDI chain...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asoldano Alessio Soldano
              Reporter:
              roberto.polli Roberto Polli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: