From dev-return-9641-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Nov 27 00:23:37 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 64470 invoked from network); 27 Nov 2008 00:23:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2008 00:23:37 -0000 Received: (qmail 96222 invoked by uid 500); 27 Nov 2008 00:23:45 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 96200 invoked by uid 500); 27 Nov 2008 00:23:45 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 96184 invoked by uid 99); 27 Nov 2008 00:23:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 16:23:45 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Nov 2008 00:22:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2B3DC234C29D for ; Wed, 26 Nov 2008 16:22:44 -0800 (PST) Message-ID: <1771022058.1227745364169.JavaMail.jira@brutus> Date: Wed, 26 Nov 2008 16:22:44 -0800 (PST) From: "Fernando (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-794) issues with closing/opening entity manager (slices) (can't seem to be able to create multiple entityManagers ) In-Reply-To: <1389537824.1227745004139.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando updated OPENJPA-794: ----------------------------- Attachment: log.txt A log of the failing run. The first web request works fine ( you can see copious amounts of logs as it gets objects, etc etc ). The second request fails from the go and every db access after, complaining that the EntityManager has already been closed, even though this was a fresh request. that request ends around: 2008-11-26 16:18:17,570 the second request starts right after at: 2008-11-26 16:18:34,334 > issues with closing/opening entity manager (slices) (can't seem to be able to create multiple entityManagers ) > -------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-794 > URL: https://issues.apache.org/jira/browse/OPENJPA-794 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.0.0 > Reporter: Fernando > Priority: Critical > Attachments: log.txt > > > So, for each of my web requests I open an entitymanager at the begining, and close it at the end, something like this: > EntityManager pm = pmf.createEntityManager(); > try { > chain.filter(...); > } > finally { > pm.close(); > } > And this works perfectly without slices. But when I turn on slices, this fails. The first request works fine, but the second requests complains that the EntityManager has already been closed. So it seems to be caching the EntityManager from the previous request... can someone please help me figure out how to fix this?? > I'll attach the log. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.