Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 57559 invoked from network); 1 Oct 2006 23:39:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Oct 2006 23:39:14 -0000 Received: (qmail 93858 invoked by uid 500); 1 Oct 2006 23:39:14 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 93845 invoked by uid 500); 1 Oct 2006 23:39:13 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 93836 invoked by uid 99); 1 Oct 2006 23:39:13 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Oct 2006 16:39:13 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [72.21.53.35] ([72.21.53.35:39920] helo=talk.nabble.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 06/0A-05102-E9150254 for ; Sun, 01 Oct 2006 16:39:11 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GUAtn-0008Gv-GO for users@jackrabbit.apache.org; Sun, 01 Oct 2006 16:39:07 -0700 Message-ID: <6594059.post@talk.nabble.com> Date: Sun, 1 Oct 2006 16:39:07 -0700 (PDT) From: behrangsa To: users@jackrabbit.apache.org Subject: Re: Comparing an RDBMS to JCR In-Reply-To: <3a9670a0610011609v7b1a376eg90fe93057ab862db@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: behrangsa@gmail.com References: <6593713.post@talk.nabble.com> <3a9670a0610011609v7b1a376eg90fe93057ab862db@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Doug, Thanks for the reply. Does it imply that using JCR has a __serious__ performance penalty compared to direct access to the database via JDBC, and even using ORM tools such as EJB3? BTW - There's a good comparison of JCR to File Systems and DBs available at http://www.day.com/site/en/index/products/content-centric_infrastructure/content_repository/crx_faq.html But I am still confused as to when one should consider using JCR* as a fundamental component of an enterprise project? For what kind of projects does it make sense to use JCR? Once we consider using JCR, should we store/retrieve everything via JCR? Or only a portion of the project should be so? *JCR or any other CMS (?) API Regards, Behi Doug Douglass-2 wrote: > > Behi, > > I think the only thing you're missing is locking. Many (most) RDBMS have > some level of built-in/implicit locking of the table or, better yet the > row, > for write operations. This is not true of JCR, you must explicitly > lock/unlock your nodes to prevent concurrent update attempts. > > HTH, > Doug > > On 10/1/06, behrangsa wrote: >> >> >> Hi, >> >> The concurrent update capability of JCR is a little bit confusing to me. >> >> In an RDBMS, when I execute the following code sinppet simultaneously by >> a >> few threads, no problem rises: >> >> tx.being(); >> executeUpdate("insert into positions(id, name, parentId) values (?, ?, >> 1)"); >> tx.commit(); >> >> In JCR, the equivalent to this seems to be: >> >> tx.begin(); >> Node positions = session.getRootNode().getNode("positions"); >> Node pos = positions.addNode("position"); >> pos.setProperty("name", "some name"); >> tx.commit(); >> >> But apparantly this throws an InvalidItemStateException (am I right?) >> when >> multiple sessions concurrently execute this snippet of code. If this is >> true, then how can one handle the aforementioned SQL operation in JCR? >> >> Regards, >> Behi (via Nabble :-) >> -- >> View this message in context: >> http://www.nabble.com/Comparing-an-RDBMS-to-JCR-tf2366850.html#a6593713 >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Comparing-an-RDBMS-to-JCR-tf2366850.html#a6594059 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.