Ah read the javadoc of the consumer template, the doneUoW
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ConsumerTemplate.html

We should actually add same details to the PollingConsumer API javadoc.

Since you return an Exchange you need to manually done its UoW when
you are done using it.


On Mon, Aug 22, 2011 at 12:20 PM, aurelienmasse
<[email protected]> wrote:
> I'm using the released version 2.8.0
>
>
> Below is a code snippet of what i'm currently doing :
>
> String uri = buildFullUri(baseUrl, fileName);
>
> GenericFileEndpoint endpoint = (GenericFileEndpoint)
> exchange.getContext().getEndpoint(uri);
>
> PollingConsumer consumer = endpoint.createPollingConsumer();
>
> consumer.start();
> Exchange result = consumer.receive(DEFAULT_TIMEOUT);
> consumer.stop();
> if (result == null) {
>     throw new IllegalStateException("Requested resource [" + fileName + "]
> has not been found.");
> }
> GenericFile body = result.getIn().getBody(GenericFile.class);
>
> endpoint.getInProgressRepository().remove(body.getAbsoluteFilePath());
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/inProgressRepository-not-cleaned-in-GenericFileEndpoint-tp4722713p4722880.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to