You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Freeman Fang <fr...@gmail.com> on 2010/06/01 03:45:28 UTC

Re: Servicemix 4.2 clustering issues.

On 2010-6-1, at 上午2:31, allisonsdad wrote:

>
> Freeman thanks, that fixed the missing constraint in the bundle. Now  
> the
> service is getting registered on instance#2.  However getting this
> exeception on instance#1 when the camel route calls the remote  
> HelloWorld2:
>
> org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
> exchange. No matching endpoints.
> at
> org 
> .apache 
> .servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java: 
> 110)
> 	at
> org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java: 
> 286)
> 	at
> org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java: 
> 141)
> 	at
> org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java: 
> 127)
> 	at
> org 
> .apache 
> .servicemix 
> .camel.nmr.ServiceMixProducer.process(ServiceMixProducer.java:59)
>
> /////// Camel route //////
>
>            from("timer:myTimerEvent?fixedRate=true&period=100000")
>                .beanRef("myTransform", "transform")
>                    .to(ExchangePattern.InOut,"nmr:HelloWorld2")
Shouldn't it be nmr:HelloWorld?

Freeman
>                            .beanRef("myTransform", "display");
>
> Thanks,
> - Bret
>
> -- 
> View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28733725.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Servicemix 4.2 clustering issues.

Posted by Aditya Laddha <ad...@gmail.com>.
Hi Freeman, 

Sorry can I roll back this thread to the initial question? I was able to
deploy start and register cxf-nmr service on its own instance.

What I wasn't able to do was calling the HelloWorld from a Client.java
deployed on another instance of servicemix over the network.

here's what my client does :


Reference ref =
nmr.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME,
"HelloWorld"));
			SourceTransformer transformer = new SourceTransformer();
            while (run) {
                try {
                    // Create an exchange and send it
                    Exchange e = client.createExchange(Pattern.InOut);
                    e.setTarget(ref);
                    e.getIn().setBody(getMessageBody());
                    client.sendSync(e);
                    e.setStatus(Status.Done);
                    client.send(e);
                } catch (Exception e) {
                    e.printStackTrace();
                    System.out.println(e.getMessage());
                }


public StringSource getMessageBody() {
		return new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
				"<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
					"<soap:Body>" +
						"<ns2:sayHi
xmlns:ns2=\"http://cxf1.examples.servicemix.apache.org/\">" +
							"<arg0>" + data + "</arg0>" +
						"</ns2:sayHi>" +
					"</soap:Body>" +
				"</soap:Envelope>");
	}

Gives me an error when the client is on remote Instance 

org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
exchange. No matching endpoints.

But this runs successfully when Client is in same instance where service is
running.

If everything seems perfect in this one could you please see the Steps that
I mentioned in the beginning of thread.

Thanks,
Aditya 



Freeman Fang wrote:
> 
> 
> On 2010-6-1, at 上午2:31, allisonsdad wrote:
> 
>>
>> Freeman thanks, that fixed the missing constraint in the bundle. Now  
>> the
>> service is getting registered on instance#2.  However getting this
>> exeception on instance#1 when the camel route calls the remote  
>> HelloWorld2:
>>
>> org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
>> exchange. No matching endpoints.
>> at
>> org 
>> .apache 
>> .servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java: 
>> 110)
>> 	at
>> org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java: 
>> 286)
>> 	at
>> org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java: 
>> 141)
>> 	at
>> org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java: 
>> 127)
>> 	at
>> org 
>> .apache 
>> .servicemix 
>> .camel.nmr.ServiceMixProducer.process(ServiceMixProducer.java:59)
>>
>> /////// Camel route //////
>>
>>            from("timer:myTimerEvent?fixedRate=true&period=100000")
>>                .beanRef("myTransform", "transform")
>>                    .to(ExchangePattern.InOut,"nmr:HelloWorld2")
> Shouldn't it be nmr:HelloWorld?
> 
> Freeman
>>                            .beanRef("myTransform", "display");
>>
>> Thanks,
>> - Bret
>>
>> -- 
>> View this message in context:
>> http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28733725.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28738022.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix 4.2 clustering issues.

Posted by Freeman Fang <fr...@gmail.com>.
Hi Ron, Aditya, Bret,

Sorry I make a mistake here.
The Cluster Engine is JBI level concept, so we can only target another  
JBI endpoint in another SMX instance.
The nmr endpoint isn't applicable for Cluster Engine, we can't target  
nmr endpoint across SMX instances.
Sorry again for any misleading.

Freeman
On 2010-6-3, at 下午12:50, Ron Gavlin wrote:

> Am I correct that SMX 4.2 clustering only works for JBI endpoints.  
> If that is the case, then the cxf-camel-nmr example is not really  
> clusterable since jbi is not used between the camel route and the  
> nmr:HelloWorld endpoint.
>
> /Ron
>
>
>
>
> ----- Original Message ----
> From: Freeman Fang <fr...@gmail.com>
> To: users@servicemix.apache.org
> Sent: Wed, June 2, 2010 11:28:52 PM
> Subject: Re: Servicemix 4.2 clustering issues.
>
> Hi,
>
> On 2010-6-2, at 下午9:06, allisonsdad wrote:
>
>>
>>
>>
>> Freeman Fang wrote:
>>>
>>>
>>>>          from("timer:myTimerEvent?fixedRate=true&period=100000")
>>>>              .beanRef("myTransform", "transform")
>>>>                  .to(ExchangePattern.InOut,"nmr:HelloWorld2")
>>> Shouldn't it be nmr:HelloWorld?
>>>
>>>
>>
>> Freeman,
>>
>> I've installed HelloWorld2 on instance#2. It is registering OK and  
>> I'm
>> simply trying to route to it.
>>
>> Is this possible ...to access different endpoints deployed on  
>> separate
>> instances ?
> Yeah, I think so, that's what cluster means.
> May I ask do you exactly follow the cluster example shipped with kit
> to configure your different instance?
>
> Freeman
>>
>> Similarly, is it possible to do the same thing with beans (like the
>> MyTransform bean), i.e., install and access a bean on a separate
>> instance?
>>
>> - Bret
>> -- 
>> View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28754238.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
>
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Servicemix 4.2 clustering issues.

Posted by Ron Gavlin <rg...@yahoo.com>.
Am I correct that SMX 4.2 clustering only works for JBI endpoints. If that is the case, then the cxf-camel-nmr example is not really clusterable since jbi is not used between the camel route and the nmr:HelloWorld endpoint.

/Ron




----- Original Message ----
From: Freeman Fang <fr...@gmail.com>
To: users@servicemix.apache.org
Sent: Wed, June 2, 2010 11:28:52 PM
Subject: Re: Servicemix 4.2 clustering issues.

Hi,

On 2010-6-2, at 下午9:06, allisonsdad wrote:

>
>
>
> Freeman Fang wrote:
>>
>>
>>>           from("timer:myTimerEvent?fixedRate=true&period=100000")
>>>               .beanRef("myTransform", "transform")
>>>                   .to(ExchangePattern.InOut,"nmr:HelloWorld2")
>> Shouldn't it be nmr:HelloWorld?
>>
>>
>
> Freeman,
>
> I've installed HelloWorld2 on instance#2. It is registering OK and I'm
> simply trying to route to it.
>
> Is this possible ...to access different endpoints deployed on separate
> instances ?
Yeah, I think so, that's what cluster means.
May I ask do you exactly follow the cluster example shipped with kit  
to configure your different instance?

Freeman
>
> Similarly, is it possible to do the same thing with beans (like the
> MyTransform bean), i.e., install and access a bean on a separate  
> instance?
>
> - Bret
> -- 
> View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28754238.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Re: Servicemix 4.2 clustering issues.

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

On 2010-6-2, at 下午9:06, allisonsdad wrote:

>
>
>
> Freeman Fang wrote:
>>
>>
>>>           from("timer:myTimerEvent?fixedRate=true&period=100000")
>>>               .beanRef("myTransform", "transform")
>>>                   .to(ExchangePattern.InOut,"nmr:HelloWorld2")
>> Shouldn't it be nmr:HelloWorld?
>>
>>
>
> Freeman,
>
> I've installed HelloWorld2 on instance#2. It is registering OK and I'm
> simply trying to route to it.
>
> Is this possible ...to access different endpoints deployed on separate
> instances ?
Yeah, I think so, that's what cluster means.
May I ask do you exactly follow the cluster example shipped with kit  
to configure your different instance?

Freeman
>
> Similarly, is it possible to do the same thing with beans (like the
> MyTransform bean), i.e., install and access a bean on a separate  
> instance?
>
> - Bret
> -- 
> View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28754238.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Servicemix 4.2 clustering issues.

Posted by allisonsdad <bm...@myactv.net>.


Freeman Fang wrote:
> 
> 
>>            from("timer:myTimerEvent?fixedRate=true&period=100000")
>>                .beanRef("myTransform", "transform")
>>                    .to(ExchangePattern.InOut,"nmr:HelloWorld2")
> Shouldn't it be nmr:HelloWorld?
> 
> 

Freeman,

I've installed HelloWorld2 on instance#2. It is registering OK and I'm
simply trying to route to it. 

Is this possible ...to access different endpoints deployed on separate
instances ?

Similarly, is it possible to do the same thing with beans (like the
MyTransform bean), i.e., install and access a bean on a separate instance?  

- Bret
-- 
View this message in context: http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28754238.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.