tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kabron Kline (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TOMEE-1105) JAX-WS Endpoint CDI Support
Date Fri, 10 Jan 2014 18:42:50 GMT

     [ https://issues.apache.org/jira/browse/TOMEE-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kabron Kline updated TOMEE-1105:
--------------------------------

    Description: 
JAX-WS endpoint implementation classes do not seem to support injection via CDI annotations.


To test this create the following artifacts:

1. Create a simple "HelloWorldBean" class with "@Named" annotation.
2. Ensure CDI is enabled in TomEE by creating WEB-INF\beans.xml per specification (also tried
with file in META-INF).
3. Create a simple "HelloWorldServlet" servlet with the "@WebServlet" annotation. This class
contains an instance variable of type "HelloWorldBean" with corresponding public setter method
with a "@Inject" CDI annotation (also tried on instance variable).
4. Create a simple "HelloWorldService" JAX-WS endpoint class annotated with the "@WebService"
annotation. This class contains an instance variable with corresponding public setter method
of type "HelloWorldBean" with a "@Inject" CDI annotation.

With the artifacts created a simple test can be done by invoking the servlet creating in #3.
By debugging it is apparent that the HelloWorldBean was properly injected into the servlet.
When the JAX-WS service is invoked (via SOAP UI or any other means) it is apparent that the
HelloWorldBean was NOT injected.

If I deploy this exact same application to a Glassfish 4.0 Full Profile application server,
both the servlet and the JAX-WS server are injected with the HelloWorldBean.

  was:
JAX-WS endpoint implementation classes do not seem to support injection via CDI annotations.


To test this create the following artifacts:

1. Create a simple "HelloWorldBean" class with "@Named" annotation.
2. Ensure CDI is enabled in TomEE by creating WEB-INF\beans.xml per specification (also tried
with file in META-INF).
3. Create a simple "HelloWorldServlet" servlet with the "@WebServlet" annotation. This class
contains an instance variable of type "HelloWorldBean" with corresponding public setter method
with a "@Inject" CDI annotation (also tried on instance variable).
4. Create a simple "HelloWorldService" JAX-WS endpoint class annotated with the "@WebService"
annotation. This class contains an instance variable with corresponding public setter method
of type "HelloWorldBean" with a "@Inject" CDI annotation.

With the artifacts created a simple test can be done by invoking the servlet creating in #3.
By debugging it is apparent that the HelloWorldBean was properly injected into the servlet.
When the JAX-WS server is invoked (via SOAP UI or any other means) it is apparent that the
HelloWorldBean was NOT injected.

If I deploy this exact same application to a Glassfish 4.0 Full Profile application server,
both the servlet and the JAX-WS server are injected with the HelloWorldBean.


> JAX-WS Endpoint CDI Support
> ---------------------------
>
>                 Key: TOMEE-1105
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1105
>             Project: TomEE
>          Issue Type: Improvement
>    Affects Versions: 1.6.0
>         Environment: TomEE+ 1.6.0
>            Reporter: Kabron Kline
>
> JAX-WS endpoint implementation classes do not seem to support injection via CDI annotations.

> To test this create the following artifacts:
> 1. Create a simple "HelloWorldBean" class with "@Named" annotation.
> 2. Ensure CDI is enabled in TomEE by creating WEB-INF\beans.xml per specification (also
tried with file in META-INF).
> 3. Create a simple "HelloWorldServlet" servlet with the "@WebServlet" annotation. This
class contains an instance variable of type "HelloWorldBean" with corresponding public setter
method with a "@Inject" CDI annotation (also tried on instance variable).
> 4. Create a simple "HelloWorldService" JAX-WS endpoint class annotated with the "@WebService"
annotation. This class contains an instance variable with corresponding public setter method
of type "HelloWorldBean" with a "@Inject" CDI annotation.
> With the artifacts created a simple test can be done by invoking the servlet creating
in #3. By debugging it is apparent that the HelloWorldBean was properly injected into the
servlet. When the JAX-WS service is invoked (via SOAP UI or any other means) it is apparent
that the HelloWorldBean was NOT injected.
> If I deploy this exact same application to a Glassfish 4.0 Full Profile application server,
both the servlet and the JAX-WS server are injected with the HelloWorldBean.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message