Richard Opalka commented on JBWS-3441:
The EE experts yet didn't decide what's the expected behaviour, see:
copy/paste of relevant part of the above URL:
There is also an alignment issue within the Java EE component types
themselves (EJBs, Servlets, JAX-RS resource classes, web service
endpoints). For example, only EJBs currently and ManagedBeans support
Java EE interceptors. JAX-RS endpoints support interceptors if their
implementation class is an EJB or a ManagedBean. Web service endpoints
support interceptors if their implementation class is an EJB.
We think the current state of affairs needs clarification, and would
like to find a way to better align the notions of CDI managed bean,
Java EE Managed Bean, and Component class supporting injection.
Support CDI interceptors for POJO JAX-WS services
Project: JBoss Web Services
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Paul Robinson
Assignee: Richard Opalka
Fix For: jbossws-cxf-4.1
CDI provides a way of doing method interception. This works for POJOs and EJBs. For more
information, see the CDI 1.0 specification from here: http://jcp.org/en/jsr/detail?id=299
Page 74 of the PDF (printed page number 67) specifies the interceptor features.
Here's an example of how I would have expected this to work with a JAX-WS service
implemented as a POJO rather than an EJB: https://github.com/weld/core/pull/154/files
This does not work in JBossWS. See Richard Opalka's comment:
I reviewed the test case and I confirm it won't work.
CDI interceptors won't work on JAXWS POJOs because of current design.
The reason is JAXWS POJO invocation is not using AS7 interceptor chains at all.
It just reuses AS7 component instances (to see injections).
CDI @Inject does work. I'm not sure about other CDI features.
I am creating a framework that provides annotation support for transactional Web
services. I am using CDI to implement this. My motivation for this feature is that I want
to fully support JAX-WS. Currently my users must implement their Web services as EJBs for
my annotations to work. With CDI and JEE6, the movement seems to be away from EJB and
towards POJOs. Therefore, I would expect more JBossWS users to take the POJO approach,
rather than the EJB approach. I'm sure you guys would have a better idea than I have,
so please let me know what you think.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira