Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A86810107 for ; Thu, 8 Aug 2013 12:32:52 +0000 (UTC) Received: (qmail 18138 invoked by uid 500); 8 Aug 2013 12:32:52 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 17472 invoked by uid 500); 8 Aug 2013 12:32:49 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 17413 invoked by uid 99); 8 Aug 2013 12:32:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Aug 2013 12:32:48 +0000 Date: Thu, 8 Aug 2013 12:32:48 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-6403) Add support for UnitOfWork per request MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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