[ 
https://issues.apache.org/jira/browse/TOMEE-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366736#comment-16366736
 ] 

Vincent Zurczak commented on TOMEE-2150:
----------------------------------------

Hi Romain,

I have checked the *ClassUnwrapper* that is passed to CXF (and which is defined 
OpenEJB's *CxfUtil*).
It is correctly invoked and its implementation returns the original class, not 
the proxy one. I have tried to understand how it could influence things and I 
failed. I also noticed in CXF that some classes, including ClassHelper, have 
checks for proxies (see getRealObjectInternal as an example). But the way it is 
implemented cannot work for proxies generated with OpenWebBeans.

What I would like to understand, in fact, is how things SHOULD work internally.
I read CDI specifications, but some things are still not clear.
 # Do we agree injection should only be done on the proxy? Meaning the wrapped 
object should not be modified by CXF.
 # Where the wrapped object (which is passed to the interceptor) should be 
updated? On deployment time? On invocation time?
 # Or should the proxy be passed to the interceptor? Because right now, it is 
the enclosed object (which somehow seems normal - he problem is that this 
object is never updated).

When and where injection in the real object should be done?
That would really help me if you had any hint. :)

> Tomee 7.0.4 issue with CDI interceptor and WebServiceContext resource 
> injection 
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-2150
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2150
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 7.0.4
>            Reporter: François Courtault
>            Priority: Critical
>         Attachments: reproduction_problem.zip
>
>
> I have defined an annotation like below:
> @Inherited
> @InterceptorBinding
> @Target({ElementType.METHOD, ElementType.TYPE})
> @Retention(RetentionPolicy.RUNTIME)
> public @interface MyInterceptor {
> @NonBinding
> String level() default "INFO";
> }
> Then, I have written a class like this:
> @MyInterceptor
> @Interceptor
> public class MyInterceptor {
> private Class<?> intercepted;
>  @AroundInvoke
>  public Object myMethod(final InvocationContext ctx) throws Exception {
>   .....
>  }
> }
> In my POJO, webservice endpoint, I have:
> @WebService(name = "MyManager", targetNamespace ="http://com.test/wsdl";,
> serviceName = "MyManagerService")
> @MyInterceptor
> public class MyManager implements IMyManager {
> @resource
> private WebServiceContext wsc; //=>=> ALWAYS null on TomEE 7.0.4!!!
> ....
> }
> }
> That's the test case I built which doesn't work on TomEE 7.0.4 but works on 
> Glassfish 4.1.2/5.0, Weblogic Server 12.2.1.3 and Wildfly 10.0.1/11.0.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to