Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 67517 invoked from network); 18 Jul 2008 11:09:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 11:09:54 -0000 Received: (qmail 46427 invoked by uid 500); 18 Jul 2008 11:09:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 46394 invoked by uid 500); 18 Jul 2008 11:09:52 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 46383 invoked by uid 99); 18 Jul 2008 11:09:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 04:09:52 -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 stefan.guggisberg@gmail.com designates 209.85.146.181 as permitted sender) Received: from [209.85.146.181] (HELO wa-out-1112.google.com) (209.85.146.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 11:08:59 +0000 Received: by wa-out-1112.google.com with SMTP id m33so150608wag.9 for ; Fri, 18 Jul 2008 04:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=QAn7hyk7ZjeaBf82K/JW1U4eDqK6vE8G9724WTZVi2k=; b=fdR87NAM4rE/q5Xjkvzhxj+0NSctVSWd0H0ZXsgIS8ZitXy6iRX18jsZWFNS/5qYia BbIyxY7JxAucVjkGQOP563wKNBzFOK9D7mD++lsfrqaQ8JQj37REmPQuyId6XVoAJJ/6 KIoCLQCeBvGqVfw8W2FoggsUPiyY7iRqsTqgg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=RT/fm/iEsyhhvwh7aFfZPp7OyBMZP5MUJND0p81scZDw/fRPkuDEepboUi26PzJZL+ tcb6DBeC0ZsUa2W2WqPPnf04XFZOVxPfOVZg8Qki6v130YvpgfPcc2Fyw+5ujZk9Wt9d mB32qgJdxEtoVqpISHICooyJyTkn12JlOdOXU= Received: by 10.115.14.1 with SMTP id r1mr2717904wai.206.1216379363893; Fri, 18 Jul 2008 04:09:23 -0700 (PDT) Received: by 10.114.190.14 with HTTP; Fri, 18 Jul 2008 04:09:23 -0700 (PDT) Message-ID: <90a8d1c00807180409k760c3eeer40cf28ba7042b80@mail.gmail.com> Date: Fri, 18 Jul 2008 13:09:23 +0200 From: "Stefan Guggisberg" Sender: stefan.guggisberg@gmail.com To: dev@jackrabbit.apache.org Subject: Re: Connection pooling In-Reply-To: <109027740807171209hc602df1t782435875d13dda4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <109027740807151733g247e4dc8g4df2ffc2b675903f@mail.gmail.com> <487DE45C.2010405@gmx.net> <109027740807161030i75865634ke75cbab77c55ea1f@mail.gmail.com> <109027740807170711n46661b4awfc9d53cd2fcd202@mail.gmail.com> <91f3b2650807170947q58d94969lb95c4af04627b663@mail.gmail.com> <109027740807171209hc602df1t782435875d13dda4@mail.gmail.com> X-Google-Sender-Auth: 84ab054334fdbad2 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jul 17, 2008 at 9:09 PM, Matej Knopp wrote: > On Thu, Jul 17, 2008 at 6:47 PM, Thomas M=FCller = wrote: >> Hi, >> >> I am trying to understand both Matej and Alexander / Marcel... >> >> In my view Jackrabbit should be able to obtain database connections >> using a JDBC URL as well as a data source name. If Jackrabbit requires >> some kind of connection pooling, that should be integrated in >> Jackrabbit - otherwise it is not possible to use Jackrabbit in a >> standalone application. Otherwise FirstHop couldn't be started from >> the command line. > > What should such integration look like? Would you allow the user to > chose the connection pooling implementation or would you "hardcode" > one? What if user already has connection pooling infrastructure in > place (but not one exported by JNDI)? > > I still don't quite understand what is the big issue with managing > DataSource instances. We are not talking about writing an IoC > container here. All that would do is a simple map -> > where dataSourceInstance is a simple java bean > implementing DataSource. > > If user wants jndi, the bean would be simple JNDI DataSource proxy. > C3P0 or commons-dbcp have their own data source classes already that > could be easily configured. Or user could provide a DataSource that > would proxy calls to a spring/guice/hivemind managed beans. > > All of those would be trivial to write and configure. > > One of the annoyances with jackrabbit apart from the fact that it > keeps db connections opened is that it only provides two options to > obtain the actual connections. Either through JNDI or it creates the > connections on it's own. But there is a good reason why the DataSource > interface was introduced. I really don't think it is a good idea to > have Jackrabbit creating database connections without having a simple > way to override this behavior. DataSource et al are fine for client/user applications. jackrabbit OTOH is = an infrastructure app and therefore needs exclusive control over the persisten= ce layer (i.e. jdbc connections in this case). with hindsight i regret i did implement the jdbc persistence manager in the first place (it was meant as a proof of concept only). but that's a different story and just my very personal view ;) cheers stefan > > -Matej >