Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 11889 invoked from network); 19 Aug 2009 15:13:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Aug 2009 15:13:10 -0000 Received: (qmail 83840 invoked by uid 500); 19 Aug 2009 15:13:29 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 83774 invoked by uid 500); 19 Aug 2009 15:13:29 -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 83764 invoked by uid 99); 19 Aug 2009 15:13:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 15:13:29 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwsutter@gmail.com designates 209.85.211.171 as permitted sender) Received: from [209.85.211.171] (HELO mail-yw0-f171.google.com) (209.85.211.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 15:13:19 +0000 Received: by ywh1 with SMTP id 1so6087698ywh.9 for ; Wed, 19 Aug 2009 08:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=/GAbT9mTmC3jIX9mpy7wMYumRiPbrgJoJn6opbHAMIQ=; b=xllXj0mkNCeyrC2SJKY62UH8PR4FzhVRVx0YoJ4ORI5jbLo2DOK3f3YdUlMo66pre+ oHdGctJkE6iy9TpJM002SYEHA2kYxn6Q0ofVGwU6jgyMLmTPpRD+0ec/QprocIwn8Bh2 2W3xJ/ejBKsvFOKZhP6bkjkS1DRv54Y4u+RbE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=OUsSMmEjpC4MErZCRiR57Uh1dKXJeymYjsebh/JxexnqF3eLVwfX3MApKpqiC/d4bG 02KEWZFT9SUVE+lFS7LSM7UgwYOKa6bzb4hnFbyXrsXmiVcRDRmPema6DtjPZox/u2Jd /D0MQqKRLReh7utBPR/Kr1c3nFxxXOzThN8rw= MIME-Version: 1.0 Received: by 10.150.209.10 with SMTP id h10mr10586477ybg.141.1250694778153; Wed, 19 Aug 2009 08:12:58 -0700 (PDT) In-Reply-To: <1250692174521-3472622.post@n2.nabble.com> References: <1250692174521-3472622.post@n2.nabble.com> Date: Wed, 19 Aug 2009 10:12:58 -0500 Message-ID: <89c0c52c0908190812l732bdcadua39df69cad8fd788@mail.gmail.com> Subject: Re: openjpa, derby, pooled connections? From: Kevin Sutter To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=000e0cd37a74f96d1d047180116e X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd37a74f96d1d047180116e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Rick has also posted information on connection pooling with OpenJPA on this blog entry: http://webspherepersistence.blogspot.com/2009/01/jpa-connection-pooling.html Kevin On Wed, Aug 19, 2009 at 9:29 AM, Michael Dick wrote: > > Hi Chris, > > OpenJPA does not include a connection pool, so you'll need to plug in a > third party pool like commons-dbcp. > > We use commons-dbcp fairly extensively in our unit tests and it can be > configured similarly to a direct connection to the database. > > For example to use derby add these properties to persistence.xml: > value="org.apache.commons.dbcp.BasicDataSource"/> > > value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:target/database/openjpa-test-database;create=true"/> > > org.apache.commons.dbcp.BasicDataSource is the datasource, and you specify > the rest of the connection information as ConnectionProperties - > commons-dbcp will handle the rest. > > The configuration for DB2 will be pretty similar but you'll need to include > a username and password. > > Hope this helps, > -mike > > > Christopher Giblin wrote: > > > > > > Hi, > > I am developing an Eclipse RCP app with OpenJPA. That is, Java SE, not > > Java > > EE. > > I would like to enable connection pooling and have questions regarding > > Derby and DB2: > > > > 1) Has anyone a OpenJPA config example for DB2 and connection pooling? > > > > 2) Is the only way to enable JDBC connection pooling for OpenJPA with a > > Derby database by means of Apache DBCP? Is Derby connection pooling > > possible only through a third-party connection pool? > > > > Thanks, > > chris > > > > > > > > -- > View this message in context: > http://n2.nabble.com/openjpa%2C-derby%2C-pooled-connections--tp3463682p3472622.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --000e0cd37a74f96d1d047180116e--