On JBoss Fuse 6.2.1 Apache Camel 2.15.1, when I have...
<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" />
It works but when I try and use a parameter for maximumFailoverAttempts e.g.
<failover maximumFailoverAttempts="{{senderservice.maximumFailoverAttempts}}">
I get the error:
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '{{roamware.senderservice.maximumFailoverAttempts}}' is not a valid value for 'integer'.
If I try and use "Using property placeholders for any kind of attribute in the XML DSL" from http://camel.apache.org/using-propertyplaceholder.html as described in Validation error with integer property (camel) e.g.
<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}}">
I then get the error:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'prop:maximumFailoverAttempts' is not allowed to appear in element 'failover'.
We are using other Camel properties and the property is set in our configuration file. How can I use a parameter for the maximumFailoverAttempts attribute?