Author: janstey
Date: Tue Oct 21 17:25:37 2008
New Revision: 706818
URL: http://svn.apache.org/viewvc?rev=706818&view=rev
Log:
CAMEL-1012 - Change RedeliveryPolicyType to use attributes instead of
sub-elements - its much cleaner
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/deadLetterChannelHandledExampleTest.xml
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java?rev=706818&r1=706817&r2=706818&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
Tue Oct 21 17:25:37 2008
@@ -18,6 +18,7 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.camel.processor.RedeliveryPolicy;
@@ -30,12 +31,19 @@
@XmlRootElement(name = "redeliveryPolicy")
@XmlAccessorType(XmlAccessType.FIELD)
public class RedeliveryPolicyType {
+ @XmlAttribute
private Integer maximumRedeliveries;
+ @XmlAttribute
private Long initialRedeliveryDelay;
+ @XmlAttribute
private Double backOffMultiplier;
+ @XmlAttribute
private Boolean useExponentialBackOff;
+ @XmlAttribute
private Double collisionAvoidanceFactor;
+ @XmlAttribute
private Boolean useCollisionAvoidance;
+ @XmlAttribute
private Long maximumRedeliveryDelay;
public RedeliveryPolicy createRedeliveryPolicy(RedeliveryPolicy
parentPolicy) {
Modified:
activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/deadLetterChannelHandledExampleTest.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/deadLetterChannelHandledExampleTest.xml?rev=706818&r1=706817&r2=706818&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/deadLetterChannelHandledExampleTest.xml
(original)
+++
activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/deadLetterChannelHandledExampleTest.xml
Tue Oct 21 17:25:37 2008
@@ -40,9 +40,7 @@
<!-- there can be more just add a 2nd, 3rd exception element
(unbounded) -->
<exception>org.apache.camel.spring.processor.onexception.OrderFailedException</exception>
<!-- we can set the redelivery policy here as well -->
- <redeliveryPolicy>
- <maximumRedeliveries>1</maximumRedeliveries>
- </redeliveryPolicy>
+ <redeliveryPolicy maximumRedeliveries="1"/>
<!-- mark this as handled -->
<handled>
<constant>true</constant>