cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Cxf 2.2.9 client thread safety and MTOM
Date Mon, 30 Apr 2012 14:07:15 GMT

I don't think there are any concurrency issues with MTOM with 2.2.9.   I'd 
be more concerned with just the general "bugs" in the attachment handling.   
There have a been several bugs related to the mime parsing that have been 
fixed since then.  (CXF-3068, CXF-3383, CXF-3505, CXF-3504, CXF-3582, 
etc...)


Dan



On Monday, April 30, 2012 02:51:59 AM sfont wrote:
> Hi,
> I took a look at source code (always in the old 2.2.9 release) starting
> from a debug session. Cxf code is always a good read :)
> 
> I think there is no difference on thread safety of clients in the case
> MTOM enabled from the case "disabled" because the references to
> attachments are included in the original request object (the request
> object which is JAXB annotated) as DataHandlers and not stored in the
> shared RequestContext. Is this correct?
> 
> So, referring to
> http://cxf.apache.org/faq.html#FAQ-AreJAXWSclientproxiesthreadsafe%3F I
> think I can continue to use a single istance of proxy in multi threading
> environment also if MTOM is enabled.
> 
> I can also evaluate a change in my code to set the
> "thread.local.request.context" to "true" in RequestContext but I think it
> is not necessary.
> 
> Addictional elements found in source code:
> 
> The only shared element in RequestContext which may suffer of concurrency
> is the variable:
> 
> java.lang.reflect.Method
> 
> whose value is set in method
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(Object, Method, Object[])
> from the instruction:
> 
> client.getRequestContext().put(Method.class.getName(), method);
> 
> However as I can see the current method instance to be invoked (I have
> different method to invoke on the same client at runtime) is also passed
> as parameter in following invocations (perhaps the runtime is not using
> the method in the  context element at all) so perhaps there is not
> concurrency problem.
> 
> Thank you.
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Cxf-2-2-9-client-thread-safety-and-MTOM-t
> p5673119p5675504.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message