You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sharon Yin <eu...@hotmail.com> on 2006/07/27 09:26:15 UTC

why NMR chose the remote BC when clustering

Hi, 
I've met such a situation: 

A httpBC and a saajBC1 in one servicemix instance running on computerA,
A saajBC2 in another servicemix instance running on computerB,
the component names,endpoint names of this three BC are different from each 
other,
the two jbi container names are different in two servicemix.xml,
the two amq broker names are diffrent, I changed the activemq.xml under 
$servicemix/conf,

only the two service name of two saajBC is same and being the 
destinationservice of the HttpBC.

When a request came from a client on computerA, I found that the NMR only 
chose the saajBC on computerB and sent back the response( I repeated 100 
times).
But the service name is also existed in computerA, 
I'm confused why the NMR dosen't choose the saajBC inside its own 
servicemix instance?
Is there any body have any idea?

Thanks.
Sharon.

_________________________________________________________________
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  


Re: why NMR chose the remote BC when clustering

Posted by Sharon Yin <eu...@hotmail.com>.
I got your point.
What's so weird is that no matter I start up which servicemix first, 
it only chose the remote service , as you mean, 
so It looks like the remote service is always considered as the first one.
but when I stop the remote servicemix instance , the request is blocked ,
no return, no exception, seems like it's not able to find the 
destinationservice, 
although the local saajBC is in the same servicemix instance, it can't find 
it.
even I start up remote servicemix again, nothing happpen, still blocked.

During the test, this exception occured oftentimes:

WARN  - DemandForwardingBridge         - Unexpected local command: 
ConnectionErr
or {commandId = 2, responseRequired = false, connectionId = null, exception 
= ja
vax.jms.InvalidClientIDException: Broker: peer-D1-1573-1153967679625-0-0 - 
Clien
t: NC_peer-D1-1568-1153967663656-0-0_inboundpeer-D1-1573-1153967679625-0-0 
alrea
dy connected}



>From: "Guillaume Nodet" <gn...@gmail.com>
>Reply-To: servicemix-users@geronimo.apache.org
>To: servicemix-users@geronimo.apache.org
>Subject: Re: why NMR chose the remote BC when clustering
>Date: Thu, 27 Jul 2006 09:51:09 +0200
>
>Clustering is done on a per JBI endpoint basis.
>It means that if your two SAAJ component do not have
>the same endpoint name, they will act as two different targets.
>Currently, when using implicit endpoint selection on clustered
>ServiceMix, the endpoint selection is done by the local NMR.
>It will select both SAAJ endpoints (as they do not act as a single
>JBI endpoint) and choose one of them.  The default policy is to
>choose the first one and the order is unspecified.
>I guess that the first one in your case is the remote one.
>You may want to change the default policy to RandomChoicePolicy
>and configure it on the NMR Broker, or change your SAAJ bindings
>so that they have the same endpoint name.
>
>Cheers,
>Guillaume Nodet
>
>On 7/27/06, Sharon Yin <eu...@hotmail.com> wrote:
>>
>>Hi,
>>I've met such a situation:
>>
>>A httpBC and a saajBC1 in one servicemix instance running on 
>>computerA,
>>A saajBC2 in another servicemix instance running on computerB,
>>the component names,endpoint names of this three BC are different 
>>from
>>each
>>other,
>>the two jbi container names are different in two servicemix.xml,
>>the two amq broker names are diffrent, I changed the activemq.xml 
>>under
>>$servicemix/conf,
>>
>>only the two service name of two saajBC is same and being the
>>destinationservice of the HttpBC.
>>
>>When a request came from a client on computerA, I found that the 
>>NMR only
>>chose the saajBC on computerB and sent back the response( I 
>>repeated 100
>>times).
>>But the service name is also existed in computerA,
>>I'm confused why the NMR dosen't choose the saajBC inside its own
>>servicemix instance?
>>Is there any body have any idea?
>>
>>Thanks.
>>Sharon.
>>
>>_________________________________________________________________
>>免费下载 MSN Explorer:   http://explorer.msn.com/lccn/
>>
>>
>
>
>--
>Cheers,
>Guillaume Nodet

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


Re: why NMR chose the remote BC when clustering

Posted by Guillaume Nodet <gn...@gmail.com>.
Clustering is done on a per JBI endpoint basis.
It means that if your two SAAJ component do not have
the same endpoint name, they will act as two different targets.
Currently, when using implicit endpoint selection on clustered
ServiceMix, the endpoint selection is done by the local NMR.
It will select both SAAJ endpoints (as they do not act as a single
JBI endpoint) and choose one of them.  The default policy is to
choose the first one and the order is unspecified.
I guess that the first one in your case is the remote one.
You may want to change the default policy to RandomChoicePolicy
and configure it on the NMR Broker, or change your SAAJ bindings
so that they have the same endpoint name.

Cheers,
Guillaume Nodet

On 7/27/06, Sharon Yin <eu...@hotmail.com> wrote:
>
> Hi,
> I've met such a situation:
>
> A httpBC and a saajBC1 in one servicemix instance running on computerA,
> A saajBC2 in another servicemix instance running on computerB,
> the component names,endpoint names of this three BC are different from
> each
> other,
> the two jbi container names are different in two servicemix.xml,
> the two amq broker names are diffrent, I changed the activemq.xml under
> $servicemix/conf,
>
> only the two service name of two saajBC is same and being the
> destinationservice of the HttpBC.
>
> When a request came from a client on computerA, I found that the NMR only
> chose the saajBC on computerB and sent back the response( I repeated 100
> times).
> But the service name is also existed in computerA,
> I'm confused why the NMR dosen't choose the saajBC inside its own
> servicemix instance?
> Is there any body have any idea?
>
> Thanks.
> Sharon.
>
> _________________________________________________________________
> 免费下载 MSN Explorer:   http://explorer.msn.com/lccn/
>
>


-- 
Cheers,
Guillaume Nodet