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 766D8111A8 for ; Thu, 24 Jul 2014 13:19:39 +0000 (UTC) Received: (qmail 64915 invoked by uid 500); 24 Jul 2014 13:19:39 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 64881 invoked by uid 500); 24 Jul 2014 13:19:39 -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 64871 invoked by uid 99); 24 Jul 2014 13:19:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 13:19:39 +0000 Date: Thu, 24 Jul 2014 13:19:39 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-7598) Camel does not clear the jpa session after each processed message batch 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-7598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-7598: ------------------------------- Fix Version/s: 2.12.5 > Camel does not clear the jpa session after each processed message batch > ----------------------------------------------------------------------- > > Key: CAMEL-7598 > URL: https://issues.apache.org/jira/browse/CAMEL-7598 > Project: Camel > Issue Type: Bug > Components: camel-jpa > Affects Versions: 2.12.3 > Reporter: Daniel Seidewitz > Assignee: Claus Ibsen > Fix For: 2.12.5, 2.13.3, 2.14.0 > > > We are using apache camel to poll from a database. As we want processed rows only to be updated we have disabled consumeDelete on the JPA endpoint. > During testing we found a large memory leak: all polled entities are kept in the session cache (we are using hibernate as persistence provider). > The issue seems to be in the JpaConsumer. In method poll() it calls enitityManager.joinTransaction() at the beginning and entitiyManager.flush() at the end of the method but it never calls entityManager.clear(). As camel is reusing the underlying session during each poll() this causes the first level entity cache to grow indefinitely. -- This message was sent by Atlassian JIRA (v6.2#6252)