Hi,
I am trying to create a comprehensive servicemix clustering example with a
jaxws-end point between two hosts in network.
Step 1:
I changed activemq-broker.xml adding a unique borker name to each hosts:
Host 1 :
Broker name : Pritam
Host Name : pajero
Host 2 :
Broker Name : Aditya
Host name : dolphin
Also removed multicast from transport connector and network connector and
changed each host to hit second host only.
I could see this in the logs they get connected to each other sucessfully:
Host 1 Log:
11:36:06,335 | INFO | er=vm://pritam#0 | DemandForwardingBridge |
rk.DemandForwardingBridgeSupport 303 | Network connection between
vm://pritam#0 and tcp://dolphin/192.168.2.96:61616(aditya) has been
established.
Host 2 Log:
11:36:06,967 | INFO | er=vm://aditya#2 | DemandForwardingBridge |
rk.DemandForwardingBridgeSupport 303 | Network connection between
vm://aditya#2 and tcp://pajero/192.168.2.76:61616(pritam) has been
established.
Step 2 :
Registering endpoint to the OsgiSimpleClusterRegistration :
I did add the following config to my xbean.xml :
<bean
class="org.apache.servicemix.jbi.cluster.engine.OsgiSimpleClusterRegistration">
<property name="endpoint" ref="helloWorld" />
<property name="name">
<value>HelloWorld</value>
</property>
<property name="serviceName">
<ref bean="serviceName" />
</property>
</bean>
<bean name="serviceName" class="javax.xml.namespace.QName">
<constructor-arg index="0">
<value>http://cxfcamel.examples.servicemix.apache.org/
</value>
</constructor-arg>
<constructor-arg index="1">
<value>HelloWorldImplService</value>
</constructor-arg>
</bean>
and did deploy the service successfully on host 2.
Step 3 :
Deploying the client in host 1.
I am using the client from the nmr example bundled with servicemix 4.2 and
trying to hit HelloWorld endpoint.
Reference ref =
nmr.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME,
"HelloWorld"));
Not sure is this the right way to call the endpoint over the cluster.
I get an error here as :
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.nmr.examples.nmr.client.Client.run(Client.java:82)
at java.lang.Thread.run(Thread.java:619)
Please let me know am I missing something here? I am in desperate need to
get this working.
Any help would be much appreciated.
Thanks,
Aditya
--
View this message in context:
http://old.nabble.com/Servicemix-4.2-clustering-issues.-tp28729394p28729394.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.