Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 3141 invoked from network); 18 Oct 2007 03:42:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 03:42:30 -0000 Received: (qmail 73390 invoked by uid 500); 18 Oct 2007 03:42:18 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 73366 invoked by uid 500); 18 Oct 2007 03:42:18 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 73357 invoked by uid 99); 18 Oct 2007 03:42:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 20:42:18 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mprudhomapache@gmail.com designates 209.85.198.187 as permitted sender) Received: from [209.85.198.187] (HELO rv-out-0910.google.com) (209.85.198.187) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 03:42:19 +0000 Received: by rv-out-0910.google.com with SMTP id k20so39750rvb for ; Wed, 17 Oct 2007 20:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; bh=AlHBiwtmbuvPAdrOfTtAgBmQKPInamSx2ezDPkB4M64=; b=QL04+0Y3e7aRDRpT+T+C/WA8T63WMCjE2HiRSjjdS8+G9eI1+xpne3/fz4QnoQZdKNkKlhH37KiCZPeeBl88fLm9uwgbxBWCSqiXJgNpaUhbtok4yMfU2LSSev0MLLFb0ILVnd9gUmmmSla/P3j544I4Ng06cdslD5uTIzdt60Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=XuFeOqrJpdvUSqI247OhEIjVtNGT5RAyElBN7p38ER2MY/Mwk1kREger/7XyQLzYZLn3x58OQ8bQlQuKAPyTI7Tibx0dUBpDcZb3TuJqVSU9U3dwdRYT+yb7dNJb4cRmBjnqX9e7RSKobYHiPyf/T9TVQi3ikbUdmD6rZqaKTi8= Received: by 10.114.198.1 with SMTP id v1mr94974waf.1192678917352; Wed, 17 Oct 2007 20:41:57 -0700 (PDT) Received: from ?192.168.1.4? ( [76.115.137.55]) by mx.google.com with ESMTPS id m34sm383119waf.2007.10.17.20.41.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2007 20:41:56 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Marc Prud'hommeaux Subject: Re: Same database, two EMF, different derby drivers Date: Wed, 17 Oct 2007 20:41:29 -0700 To: users@openjpa.apache.org X-Mailer: Apple Mail (2.752.3) Sender: Marc Prud'hommeaux X-Virus-Checked: Checked by ClamAV on apache.org Gavin- There shouldn't be any problem. Note that you can also use a single =20 EMF, and just multiple EMs from the single EMF. As an aside, you might want to consider using connection pooling. See: http://openjpa.apache.org/faq.html On Oct 17, 2007, at 8:37 PM, Gavin Bong wrote: > Hi, > > If I point two EMFs at the same database (meaning same 'name') but =20 > with > different Derby drivers, will there be any problems ? > In short, will this work ? > > e.g. > > type=3D"RESOURCE_LOCAL"> > > value=3D"jdbc:derby:mydb;create=3Dtrue"/> > value=3D"org.apache.derby.jdbc.EmbeddedDriver"/> > ....snip... > > > > type=3D"RESOURCE_LOCAL"> > > value=3D"jdbc:derby://localhost:1527/mydb;create=3Dtrue"= /> > value=3D"org.apache.derby.jdbc.ClientDriver"/> > ....snip... > > > Thanks. > > --=20 > Regards, > > Gavin Bong > blogging at http://raverun.com/jayway > > ----- > Ce qui compte dans une vie, > c'est l'intensit=E9 d'une vie, > ce n'est pas la dur=E9e d'une vie > ~ Jacque Brel > > Be liberal in what you accept, > and conservative in what you send > ~ Jon Postel, RFC1122