Hi Can you try moving the onException on up?
And if still a problem then try using onException as context scoped, eg outside the from Just to see if that resolves anything. I am a tad busy with a couple of other issues, but let me know how goes. And if still a problem then create a JIRA so we can get it resolved for 2.2. On Wed, Jan 13, 2010 at 3:28 PM, mcrive <mcr...@optasportsdata.com> wrote: > > I have following route: > > from("jms-test:queue:queue.delivery.notification.test") > .process(processor) > .onException(Exception.class).retryUntil(bean("myRetryBean")).end() > .recipientList(header("recipientListHeader").tokenize(",")) > .parallelProcessing().executorService(customThreadPoolExecutor) > .aggregationStrategy(new RecipientAggregationStrategy()) > .to("direct:chunk.completed"); > > > > 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 > _invoked++; > > > _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; > } > > > > 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? > > > -- > View this message in context: > http://old.nabble.com/recipientList-retryUntil-not-working--tp27145846p27145846.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus