You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/08/08 14:32:48 UTC
[jira] [Commented] (CAMEL-6403) Add support for UnitOfWork per
request
[ https://issues.apache.org/jira/browse/CAMEL-6403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733445#comment-13733445 ]
Claus Ibsen commented on CAMEL-6403:
------------------------------------
A consumer can now add a property on the exchange when it creates the exchange that the consumer want to done the UoW.
{code}
exchange.setProperty(Exchange.UNIT_OF_WORK_CONSUMER_DONE, true);
{code}
Then when the consumer (if extending DefaultConsumer) is done doing its stuff, it can invoke
{code}
doneUoW(exchange);
{code}
Or use the org.apache.camel.util.UnitOfWorkHelper#doneUow method.
> Add support for UnitOfWork per request
> --------------------------------------
>
> Key: CAMEL-6403
> URL: https://issues.apache.org/jira/browse/CAMEL-6403
> 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: http://www.atlassian.com/software/jira