And if it's not thread safe, then the actual converter can add
additional synchronization.

On Fri, May 30, 2008 at 12:33 AM, Hadrian Zbarcea <[EMAIL PROTECTED]> wrote:
> 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.
>
> Thanks
> Hadrian
>
> 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
>
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://open.iona.com

Reply via email to