You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by boris <bs...@eunet.yu> on 2008/03/12 17:56:40 UTC
cxf-bc-provider concurrency problem
Hi,
The “CxfBcProvider” has a serious concurrency problem. Just take a look at
these two lines of code from the CxfBcProvider.java:
CxfBcProviderMessageObserver obs = new
CxfBcProviderMessageObserver(exchange, this);
conduit.setMessageObserver(obs);
The instance variable „conduit“ set’s every time a new MessageObserver and
therefore overwrites the old one that hasn’t yet done his job. I can provide
a unit test if necessary. A redesign of this component should be definitely
reconsidered.
Best regards,
Boris
--
View this message in context: http://www.nabble.com/cxf-bc-provider-concurrency-problem-tp16008402s12049p16008402.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: cxf-bc-provider concurrency problem
Posted by Freeman Fang <fr...@gmail.com>.
Hi Guillaume,
Yes, your suggestion works.
create jira [1] to track it.
[1]https://issues.apache.org/activemq/browse/SM-1272
Thanks
Freeman
Guillaume Nodet wrote:
> And use a local variable instead of a field of course.
> Freeman, any idea ?
>
> On Wed, Mar 12, 2008 at 6:19 PM, Guillaume Nodet <gn...@gmail.com> wrote:
>
>> What is we just move the
>> conduit = conduitInit.getConduit(ei);
>> line in validate() to the process() method ?
>>
>>
>>
>> On Wed, Mar 12, 2008 at 5:56 PM, boris <bs...@eunet.yu> wrote:
>> >
>> > Hi,
>> >
>> > The "CxfBcProvider" has a serious concurrency problem. Just take a look at
>> > these two lines of code from the CxfBcProvider.java:
>> >
>> > CxfBcProviderMessageObserver obs = new
>> > CxfBcProviderMessageObserver(exchange, this);
>> > conduit.setMessageObserver(obs);
>> >
>> > The instance variable „conduit" set's every time a new MessageObserver and
>> > therefore overwrites the old one that hasn't yet done his job. I can provide
>> > a unit test if necessary. A redesign of this component should be definitely
>> > reconsidered.
>> >
>> > Best regards,
>> >
>> > Boris
>> >
>> > --
>> > View this message in context: http://www.nabble.com/cxf-bc-provider-concurrency-problem-tp16008402s12049p16008402.html
>> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >
>> >
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
>
>
>
Re: cxf-bc-provider concurrency problem
Posted by Guillaume Nodet <gn...@gmail.com>.
And use a local variable instead of a field of course.
Freeman, any idea ?
On Wed, Mar 12, 2008 at 6:19 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> What is we just move the
> conduit = conduitInit.getConduit(ei);
> line in validate() to the process() method ?
>
>
>
> On Wed, Mar 12, 2008 at 5:56 PM, boris <bs...@eunet.yu> wrote:
> >
> > Hi,
> >
> > The "CxfBcProvider" has a serious concurrency problem. Just take a look at
> > these two lines of code from the CxfBcProvider.java:
> >
> > CxfBcProviderMessageObserver obs = new
> > CxfBcProviderMessageObserver(exchange, this);
> > conduit.setMessageObserver(obs);
> >
> > The instance variable „conduit" set's every time a new MessageObserver and
> > therefore overwrites the old one that hasn't yet done his job. I can provide
> > a unit test if necessary. A redesign of this component should be definitely
> > reconsidered.
> >
> > Best regards,
> >
> > Boris
> >
> > --
> > View this message in context: http://www.nabble.com/cxf-bc-provider-concurrency-problem-tp16008402s12049p16008402.html
> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: cxf-bc-provider concurrency problem
Posted by Guillaume Nodet <gn...@gmail.com>.
What is we just move the
conduit = conduitInit.getConduit(ei);
line in validate() to the process() method ?
On Wed, Mar 12, 2008 at 5:56 PM, boris <bs...@eunet.yu> wrote:
>
> Hi,
>
> The "CxfBcProvider" has a serious concurrency problem. Just take a look at
> these two lines of code from the CxfBcProvider.java:
>
> CxfBcProviderMessageObserver obs = new
> CxfBcProviderMessageObserver(exchange, this);
> conduit.setMessageObserver(obs);
>
> The instance variable „conduit" set's every time a new MessageObserver and
> therefore overwrites the old one that hasn't yet done his job. I can provide
> a unit test if necessary. A redesign of this component should be definitely
> reconsidered.
>
> Best regards,
>
> Boris
>
> --
> View this message in context: http://www.nabble.com/cxf-bc-provider-concurrency-problem-tp16008402s12049p16008402.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/