Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 460 invoked from network); 3 Aug 2007 00:44:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 00:44:15 -0000 Received: (qmail 97189 invoked by uid 500); 3 Aug 2007 00:44:15 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 97153 invoked by uid 500); 3 Aug 2007 00:44:15 -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 97142 invoked by uid 99); 3 Aug 2007 00:44:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 17:44:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 00:43:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C7F767141F1 for ; Thu, 2 Aug 2007 17:43:52 -0700 (PDT) Message-ID: <29571279.1186101832799.JavaMail.jira@brutus> Date: Thu, 2 Aug 2007 17:43:52 -0700 (PDT) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-305) Dynamic configuration of EntityManagerFactory In-Reply-To: <15516536.1186084432901.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-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517415 ] Pinaki Poddar commented on OPENJPA-305: --------------------------------------- Dynamic (i.e. while EntityManagerFactory is alive) change of Configuration will impact the pooling of BrokerFactory (which is the core implementation of which EntityManagerFactory is a facade). The pool maintains a Map of poolKey to BrokerFactory. A poolKey is effectively the Configuration expressed as a Property. So dynamically changing configuration properties must take into account the integrity of this pool which is till now based on the assumption of constancy of Configuration. Possibility of using IdentityHashMap and use the Configuration instance (not its Property values) as key: This is most likely *not* going to work. The idea of freezing the config at the first place (perhaps) originated because callers who supply new copies of Configuration (that are same by value but not by identity) expect to get the same Factory. > Dynamic configuration of EntityManagerFactory > --------------------------------------------- > > Key: OPENJPA-305 > URL: https://issues.apache.org/jira/browse/OPENJPA-305 > Project: OpenJPA > Issue Type: New Feature > Reporter: Pinaki Poddar > > OpenJPA configures EntityManagerFactory at creation time via an instance of Configuartion object. Once EntityManagerFactory is created and a EntityManager is issued from it -- the Configuration is frozen by design. That is no further changes to Configuration is allowed as long as EntityManagerFactory lives. > For certain configuration properties, it is desirable to change them during the lifetime of a EntityManagerFactory. > This issue is raised to initiate a discussion on such a feature, the possibility and limitations of dynamic update and track the impact of such a change as frozen Configuration is an important assumption. > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.