camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <>
Subject Re: Should message converters be thread safe?
Date Fri, 30 May 2008 04:33:47 GMT
Hi Roman,

I don't see any reason either for a synchronize there.  Converters  
should be thread safe, indeed.
I'll go ahead and remove the synchronize.


On May 29, 2008, at 3:16 PM, Roman Kalukiewicz wrote:

> Hello dear commiters,
> I've just found that our
> org.apache.camel.impl.converter.InstanceMethodTypeConverter has
> synchronized convertTo() method. I believe this synchronization is
> unnecessary as converters should be thread safe I believe. If it is
> the case, than we shouldn't need this synchronization.
> In fact I've just hit this synchronization, as XmlConverter could take
> a long time to do its job. In heavy traffic there could be a lot of
> congestion there. Some threads were waiting on this lock for 87
> seconds!
> I believe it is OK to remove it, but if someone knows of any important
> reasons to leave it - just shout! ;)
> Roman

View raw message