Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 51415 invoked from network); 3 Feb 2011 16:58:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2011 16:58:33 -0000 Received: (qmail 85106 invoked by uid 500); 3 Feb 2011 16:58:32 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 84938 invoked by uid 500); 3 Feb 2011 16:58:30 -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 84930 invoked by uid 99); 3 Feb 2011 16:58:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 16:58:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.snaps@gmail.com designates 209.85.213.46 as permitted sender) Received: from [209.85.213.46] (HELO mail-yw0-f46.google.com) (209.85.213.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 16:58:24 +0000 Received: by ywo7 with SMTP id 7so303438ywo.33 for ; Thu, 03 Feb 2011 08:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=keC0wj8aXG4XDxP6xZGMVPMQY9kJJg5M7I6NusPZZKc=; b=V422kuncGGUxIbRYjlEJ87GzqaX/I21SByQ4BRVcofz5bK3QH3DmIr2lNGYsV2j/0q CKfgZN4j5CBSG1ZIJM18nK7lEg0XnHUY/RbJ2PJcBpzfif5cmRiogZTiUc++cKx3X5Zo OTg3xtpkMpY6YTwMkXGnBi4vkVCcG6Ozqm67c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ATiVAAqja1eNWjl9MiPUafsGensKXpIMoaiaCLl3zYg5c9Ao4MFm3uwrUKTyAUVcZw WTG/EhsoDD/qLxKR9JVwYfO/3ZPBBhOOZEHovikJ4ZxnxI3ztBsKI64NfMIN2bSyACye UQTP4pJWg247B91PgHDUdsvo7QiL4WNADRXb0= MIME-Version: 1.0 Received: by 10.100.136.14 with SMTP id j14mr6668133and.262.1296752282883; Thu, 03 Feb 2011 08:58:02 -0800 (PST) Received: by 10.100.58.16 with HTTP; Thu, 3 Feb 2011 08:58:02 -0800 (PST) Date: Thu, 3 Feb 2011 17:58:02 +0100 Message-ID: Subject: EntityManagerFactory clearing caches on close()? From: Alex Snaps To: dev Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi guys, I've not investigated that much at the code level yet, but it seems EntityManagerFactory.close() calls AbstractQueryCache.close() which in turn calls clearInternal(). As a result a distributed query cache ends up cleared when a node is shut down. This only seems to happen on the query cache though. Is it meant that way? If so, does that mean a query cache shouldn't be clustered? Thanks, Alex -- Alex Snaps Senior Software Engineer - Terracotta http://twitter.com/alexsnaps http://www.linkedin.com/in/alexsnaps