PlanetJava
Custom Search

java-servicemix-user
[Top] [All Lists]

Re: Servicemix 4.2 clustering issues.

Subject: Re: Servicemix 4.2 clustering issues.
Date: Mon, 31 May 2010 23:15:41 -0700 (PDT)
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.
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
  • Re: Servicemix 4.2 clustering issues.
    • Re: Servicemix 4.2 clustering issues.,
    • Re: Servicemix 4.2 clustering issues.
    • Re: Servicemix 4.2 clustering issues.
      • Re: Servicemix 4.2 clustering issues.
        • Re: Servicemix 4.2 clustering issues.
        • Re: Servicemix 4.2 clustering issues.
        • Re: Servicemix 4.2 clustering issues.
        • Re: Servicemix 4.2 clustering issues.
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy