[jboss-user] [JBoss Web Services] - Re: CDI @Inject in a JAX-WS service impl?

Martin Kouba do-not-reply at jboss.com
Tue Feb 21 07:04:30 EST 2012


Martin Kouba [https://community.jboss.org/people/mkouba] created the discussion

"Re: CDI @Inject in a JAX-WS service impl?"

To view the discussion, visit: https://community.jboss.org/message/718272#718272

--------------------------------------------------------------
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).
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/718272#718272]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120221/c683a9ab/attachment-0001.html 


More information about the jboss-user mailing list