Hello Folks,
I'm trying to test servicemix clustering by using a camel route with
concurrency.
I have (2) servicemix instances setup on the same host in a cluster. The log
entries on instance#2 show that the cluster seems to be handshaking OK, so I
believe that the configuration is good.
I'm using the cxf-camel-nmr example in an attempt to force the clustering
behavior with a Camel route. What I want to do is deploy the same HelloWorld
service on both instances, and observe that when HelloWord is busy on
instance#1, that the HelloWorld on instance#2 is then executed.
I deployed the example bundle on instance#2 with a disabled camel route with
the HelloWorld service defined as an endpoint. On instance#1, I put a 5
second Thread.sleep() in HelloWorldImpl.
On instance#1, a camel route is started when the bundle deploys:
from("timer:myTimerEvent?fixedRate=true&period=1000")
.beanRef("myTransform", "transform").multicast().parallelProcessing()
.to(ExchangePattern.InOut,"nmr:HelloWorld", "nmr:HelloWorld")
.beanRef("myTransform", "display");
I'm expecting the service on instance#2 to execute, but it does not and I
get a ServiceUnavailableException. What am I doing wrong, or is there a
another (better) way to do this?
Thanks,
Bret
This is the exception ....
Failed delivery for exchangeId: 3ae5c8e0-6fd4-4ea1-a385-c25007b0c500.
Exhausted after delivery attempt: 1 caught:
org.osgi.service.blueprint.container.ServiceUnavailableException: Service is
unavailable
org.osgi.service.blueprint.container.ServiceUnavailableException: Service is
unavailable
at
org.apache.geronimo.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:204)
at
org.apache.geronimo.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:578)
at
org.apache.servicemix.jbi.cluster.engine.ClusterRegistration$$EnhancerByCGLIB$$7376a6fa.match(<generated>)
at
org.apache.servicemix.jbi.cluster.engine.ClusterEngine.exchangeSent(ClusterEngine.java:413)
at
org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:282)
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)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
at
org.apache.camel.processor.MulticastProcessor.doProcess(MulticastProcessor.java:268)
at
org.apache.camel.processor.MulticastProcessor.access$000(MulticastProcessor.java:60)
at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:195)
at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:189)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
--
View this message in context:
http://old.nabble.com/Service-Unavailable-Exception-tp28722096p28722096.html
Sent from the Camel - Users mailing list archive at Nabble.com.