Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 54204 invoked from network); 28 Oct 2008 15:23:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 15:23:13 -0000 Received: (qmail 86604 invoked by uid 500); 28 Oct 2008 15:23:17 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 86119 invoked by uid 500); 28 Oct 2008 15:23:16 -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 86108 invoked by uid 99); 28 Oct 2008 15:23:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 08:23:16 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 15:22:02 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KuqOZ-00081W-3r for users@jackrabbit.apache.org; Tue, 28 Oct 2008 08:22:11 -0700 Message-ID: <20209013.post@talk.nabble.com> Date: Tue, 28 Oct 2008 08:22:11 -0700 (PDT) From: Dave Fried To: users@jackrabbit.apache.org Subject: Result of VERSION-CONTROL request MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: dfried@phoenix-int.com X-Virus-Checked: Checked by ClamAV on apache.org The WebDAV standard seems to indicate that the result of a VERSION-CONTROL request should be a resource which is in the checked-in state: "If the request-URL identified a versionable resource at the time of the request, the request MUST have created a new version history and MUST have created a new version resource in that version history. The resource MUST have a DAV:checked-in property that identifies the new version." But Jackrabbit's WebDAV implementation seems to leave the resource in the checked-out state. This probably isn't a problem in most cases, since the VERSION-CONTROL request, when applied to an already version-controlled resource, is not guaranteed to leave the resource in a checked-in state, so applications will have to handle this anyway. But it seems like an arbitrary departure from the standard. Two questions: * is this ever a problem in practice? (in other words, should I care?) * is there an easy way to add the version-controlled JCR mixin to the resource and check it in atomically, all in one fell swoop, as part of the version-control handler? For example, in VersionControlledResourceImpl::addVersionControl(), would the following code work? if (!isVersionControlled()) { Node item = getNode(); try { item.addMixin(JcrConstants.MIX_VERSIONABLE); item.save(); item.checkin(); // <<<====== ADDED LINE OF CODE } catch (RepositoryException e) { throw new JcrDavException(e); } } Should checkin() come before save()? I am not so familiar with how JCR works yet. Thanks in advance! --Dave -- View this message in context: http://www.nabble.com/Result-of-VERSION-CONTROL-request-tp20209013p20209013.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.