Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 54519 invoked from network); 14 Aug 2006 21:26:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Aug 2006 21:26:45 -0000 Received: (qmail 94562 invoked by uid 500); 14 Aug 2006 21:26:44 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 94538 invoked by uid 500); 14 Aug 2006 21:26:44 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 94529 invoked by uid 99); 14 Aug 2006 21:26:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 14:26:44 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of kwsutter@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 14:26:43 -0700 Received: by nf-out-0910.google.com with SMTP id c29so86082nfb for ; Mon, 14 Aug 2006 14:26:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=rCrh/kbvnUl2kfhcLQZmpHygi9rnBXw2ueN7SqoJM1lYRE81YPAJeKvPq5QjcihEg4BdQdhlg2lNUMkFA3Voqk7a/Pe3idajL0htGoZN7dRfu9vaTTP2kBVeUlL6xhuzzmwfQVMSUmAc1TJO1oCnT3hjGgEWgyC7V0je4gD5fgI= Received: by 10.78.117.10 with SMTP id p10mr3503988huc; Mon, 14 Aug 2006 14:26:21 -0700 (PDT) Received: by 10.78.135.4 with HTTP; Mon, 14 Aug 2006 14:26:21 -0700 (PDT) Message-ID: <89c0c52c0608141426j7e22ece9iff0da5ab38d72e89@mail.gmail.com> Date: Mon, 14 Aug 2006 16:26:21 -0500 From: "Kevin Sutter" To: open-jpa-dev@incubator.apache.org Subject: Extending the OpenJPA implementation MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_201869_16990144.1155590781668" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_201869_16990144.1155590781668 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I've been experimenting with extending the OpenJPA implementation. My first experiment was just extending the OpenJPA PersistenceProviderImpl class and selectively enhancing a couple of methods. At first, this looked to be rather straight forward. But, then I ran into a problem with the ConfigurationProviderImpl load() method since it did some validation to make sure that a requested PersistenceProvider element was equal to the currently executing class: if (!StringUtils.isEmpty(providerName) && !PersistenceProviderImpl.class.getName().equals(providerName)) return false; Since I have extended the PersistenceProviderImpl class, this test failed. I considered modifying the above conditional to be more lenient of openjpa-derived persistence providers, but Patrick pointed out (via a separate e-mail) that we might end up with some false positives when a specific persistence provider is requested. Thus, we decided to move this conversation to the dev mailing list to get a discussion started. >From what I can tell, we have the PersistenceProviderImpl, the ConfigurationProvider Service, and the ProductDerivation Service that can help develop a proper OpenJPA derivative. Even my brief experimentation with extending the PersistenceProviderImpl showed that this would not be useful without extending the ConfigurationProviderImpl (or providing a replacement implementation). So, is there a defined mechanism and process for extending the OpenJPA persistence provider? If not, any good starting points? I'm happy to do the experimentation. I just would like to fit within the defined framework. Thanks, Kevin ------=_Part_201869_16990144.1155590781668--