首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >骆驼loadBalance故障转移maximumFailoverAttempts不支持属性

骆驼loadBalance故障转移maximumFailoverAttempts不支持属性
EN

Stack Overflow用户
提问于 2016-05-31 00:29:14
回答 1查看 303关注 0票数 0

在JBoss Fuse 6.2.1 Apache 2.15.1上,当我.

代码语言:javascript
复制
<loadBalance inheritErrorHandler="false" id="load-balance">
<failover maximumFailoverAttempts="2">
    <exception>java.net.ConnectException</exception>
    <exception>org.apache.cxf.transport.http.HTTPException</exception>
</failover>
<to id="sender-service1" uri="cxf:bean:sender-service1-endpoint" />
<to id="sender-service2" uri="cxf:bean:sender-service2-endpoint" />

它可以工作,但是当我尝试为maximumFailoverAttempts使用一个参数时。

代码语言:javascript
复制
<failover maximumFailoverAttempts="{{senderservice.maximumFailoverAttempts}}">

我知道错误:

由:cvc: cvc-datatype-valid.1.2.1:'{{roamware.senderservice.maximumFailoverAttempts}}‘引起,它不是整数的有效值。

如果我尝试使用http://camel.apache.org/using-propertyplaceholder.html中的“对XML中的任何类型的属性使用属性占位符”,如Validation error with integer property (camel)中所描述的。

代码语言:javascript
复制
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring" xmlns:context="http://www.springframework.org/schema/context"
xmlns:prop="http://camel.apache.org/schema/placeholder"

    <failover prop:maximumFailoverAttempts="{{senderservice.maximumFailoverAttempts}}">

然后我得到错误:

由: org.xml.sax.SAXParseException: cvc-complex- to .3.2.2:属性'prop:maximumFailoverAttempts‘引起的,不允许出现在元素“故障转移”中。

我们正在使用其他骆驼属性,并在配置文件中设置该属性。如何为maximumFailoverAttempts属性使用参数?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-31 06:11:12

是的,这在负载平衡器上不支持。我已经登录了一张票,以便在将来的Camel发行版中得到支持:https://issues.apache.org/jira/browse/CAMEL-10001

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37535150

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档