camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Crivellaro (JIRA)" <>
Subject [jira] Created: (CAMEL-2360) recipientList retryUntil not working
Date Thu, 14 Jan 2010 10:14:43 GMT
recipientList retryUntil not working

                 Key: CAMEL-2360
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 2.2.0
            Reporter: Marco Crivellaro
            Priority: Critical

the bean gets intialized but it looks like the method retryUntil is never called, could it
be an error of implementation? am I doing something wrong?

using following route:
.aggregationStrategy(new RecipientAggregationStrategy()) 

bean is registered in such way: 
JndiRegistry jndi = new JndiRegistry(new JndiContext()); 
jndi.bind("myRetryBean", new RetryBean()); 

bean class is: 
public class RetryBean { 

        private int _invoked; 
        private Logger _logger; 
    public RetryBean() { 
    this._logger = Logger.getLogger(RetryBean.class); 
    this._invoked = 0; 
    _logger.debug("BEAN INITIALIZED " + _invoked); 
    // using bean binding we can bind the information from the exchange to the types we have
in our method signature 
    public boolean retryUntil(@Header(Exchange.REDELIVERY_COUNTER) Integer counter, @Body
String body, @ExchangeException Exception causedBy) { 
        // NOTE: counter is the redelivery attempt, will start from 1 
    _logger.debug("invoked" + _invoked); 
    _logger.debug("counter" + counter); 
    _logger.debug("result" + (counter < 2)); 
        // we can of course do what ever we want to determine the result but this is a unit
test so we end after 3 attempts 
        return counter < 7; 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message