camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Comment Edited] (CAMEL-6403) Add support for UnitOfWork per request
Date Thu, 08 Aug 2013 13:22:47 GMT


Claus Ibsen edited comment on CAMEL-6403 at 8/8/13 1:21 PM:

If a consumer wants to handle the uow itself, such as this use, case then it should do

When it creates the Exchange

And then when its done processing and all its needed work it must do

These methods is part of DefaultConsumer.

This has been implemented for
- camel-http
- camel-jetty
- camel-netty
- camel-netty-http

      was (Author: davsclaus):
    A consumer can now add a property on the exchange when it creates the exchange that the
consumer want to done the UoW.

exchange.setProperty(Exchange.UNIT_OF_WORK_CONSUMER_DONE, true);

Then when the consumer (if extending DefaultConsumer) is done doing its stuff, it can invoke

Or use the org.apache.camel.util.UnitOfWorkHelper#doneUow method.
> Add support for UnitOfWork per request
> --------------------------------------
>                 Key: CAMEL-6403
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.11.0
>            Reporter: Gert Vanthienen
>            Assignee: Claus Ibsen
>             Fix For: 2.12.0
> When using a {{camel-jetty}} endpoint, the {{UnitOfWork}} is not being managed by the
servlet handling the request but by the Camel route that's being invoked.  
> This means that some resources have already been removed/cleaned up when the servlet
is writing the response, e.g. files for cached streams have already removed before the servlet
gets a chance to read from them.
> It would be nice to have an option available to configure the servlet itself to handle
the unit of work and mark it {{done}} after the HTTP response has been written.  That way,
the unit of work can be matched up with the actual HTTP request.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message