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

Daniel Kulp commented on CXF-3503:
----------------------------------

The MessageListener for the endpoints should likely set the TCCL to the 
Bus.getExtension(Classloader.class) before calling the interceptor chain.   
There are a lot of interceptors and other places that would need to have the 
TCCL set to the proper classloader.   For example, getting security properties 
and such and the Merlin files also would need this properly set.


> CXF should set the TCCL to the one of the service being invoked prior any 
> invocation
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-3503
>                 URL: https://issues.apache.org/jira/browse/CXF-3503
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> This is only a problem runing cxf endpoint with  http-jetty transport in OSGi 
> container.
> let's say a user has 2 bundles, each with a CXF webservice using http-jetty 
> transport directlyon the same port:
> bundle A - http://0.0.0.0:8080/A
> bundle B - http://0.0.0.0:8080/B
> Problem is that since they are using the same port, a single Jetty engine 
> will be shared and each Jetty thread's class loader will be set to the 
> classloader of whichever bundle started first. So, say bundle A started 
> first, now the classloaders would be assigned as follows:
> bundle A - BundleDelegatingClassLoader for [bundle A]
> bundle B - BundleDelegatingClassLoader for [bundle A]
> Any incoming requests to the service in bundle B will use the classloader 
> from bundle A
> We need ensure we set  TCCL for the classloader of serviceObject in 
> AbstractInvoker

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to