Fabric load balancing - what should the serviceClass be set to?
jrawlings1980 May 30, 2012 2:59 AMHi, I'm following the Fabric load balancing client configuration. I cannot deploy the load balance client because it cannot resolve the serviceClass.
<!-- Create a client proxy, with load balancing enabled --> <jaxws:client id="ClientProxyBeanID" address="http://dummyaddress" serviceClass="SEI"> <jaxws:features> <ref bean="fabricLoadBalancerFeature"></ref> </jaxws:features> </jaxws:client>
I have two child remote containers on different machines clustering my inbox service. The load balancing client is deployed in a separate container again so doesn't know about the inbox service.
What should serviceClass be set to? My CXF implementation on the WS server side is com.mycompany.InboxImpl. I would have assumed serviceClass="com.mycompany.Inbox" but I get a class not found exception.
Edited by: rawlingsj on May 28, 2012 10:48 PM
I managed to get a bit further but I'm not happy it's correct. I've had to deploy my inbox api along with the load balancing client so that the serviceClass can be resolved. Is this correct?
Also please can someone look over my configuration below. I'm not sure I'm linking my client proxy to the load balancer correctly, I don't think the soap message is passed.
<!-- Create a client proxy, with load balancing enabled --> <jaxws:client id="ClientProxyBeanID" address="http://dummyaddress" serviceClass="com.mycompany.Inbox"> <jaxws:features> <ref component-id="fabricLoadBalancerFeature"></ref> </jaxws:features> </jaxws:client> <reference id="org.linkedin.zookeeper.client.IZKClient" interface="org.linkedin.zookeeper.client.IZKClient"></reference> <!-- Create the Fabric load balancer feature --> <bean id="fabricLoadBalancerFeature" class="org.fusesource.fabric.cxf.FabricLoadBalancerFeature"> <property name="zkClient" ref="org.linkedin.zookeeper.client.IZKClient"></property> <property name="fabricPath" value="inbox/lb"></property> </bean> <camelContext xmlns="http://camel.apache.org/schema/blueprint"> <route> <description>Inbox load balancer</description> <from uri="jetty:http://0.0.0.0:8185/inbox-lb" id="inbox-lb"> <description></description> </from> <log message="** Hit the load balancer **"></log> <bean ref="ClientProxyBeanID"></bean> </route> </camelContext>
Any advice would be great.