1 2 Previous Next 18 Replies Latest reply on Feb 21, 2012 3:28 PM by asoldano Go to original post
      • 15. Re: CDI @Inject in a JAX-WS service impl?
        mkouba

        I'm not sure this (interceptor invocation) is required by the spec (EE 6, CDI 1.0 or JAX-WS 2.x). Although your endpoint is valid CDI bean JAX-WS probably does define its own lifecycle for SEI. JAX-WS spec does not say a word about CDI integration. EE 6 spec states: service endpoints and handlers support injection (this works right now). CDI spec states: built-in request/application contexts are active during web service invocation (this works too). On the other hand EJB spec allows SLSB and singletons to be JAX-WS endpoints.

         

        So I'd recommend either use EJB (SLSB, singleton) or inject separate managed bean with app logic and bind interceptor to this bean (like the source in the first comment).

        • 16. Re: CDI @Inject in a JAX-WS service impl?
          ropalka

          Thank you for your feedback Martin, highly appreciated.

          It's a feature request (not a bug) and we'll investigate,

          if it will be doable or not.

          • 17. Re: CDI @Inject in a JAX-WS service impl?
            paul.robinson

            Thanks Martin,

             

            I'm happy for my users to expose their Web services as SLSB, if that's what they want to do. My concern is that we are moving away from EJB to POJO and that my users will want to write POJOs annotated as WS. This then breaks the middleware I'm developing as it needs an interceptor to work.

             

            Without going into too many details. I want my users to annotate a WS with their transactional requirements. My intereptor reads the transactional requirements off the class and sets up the transactional environment. For example, bridging from a WS transaction to a JTA transaction. Therefore, I couldn't intercept an injected bean as you suggest.

             

            Paul.

            • 18. Re: CDI @Inject in a JAX-WS service impl?
              asoldano

              OK, so it seems the the feature request covered by the jira Paul created basically falls into a grey area of the specs (at the same time common sense suggest this feature request is valid). As Richard said, we'll evaluate what can be done to implement the feature request, it's likely to be quite complex. Hopefully as Martin said above, what the specs clearly require is properly working.

              This said, Paul, I believe we can find out a workaround / different solution for your integration work. Perhaps we can catch on IRC...

              1 2 Previous Next