Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 51812 invoked from network); 9 Sep 2005 13:31:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2005 13:31:36 -0000 Received: (qmail 5952 invoked by uid 500); 9 Sep 2005 13:31:33 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 5939 invoked by uid 99); 9 Sep 2005 13:31:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2005 06:31:32 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 96EB632E for ; Fri, 9 Sep 2005 15:31:31 +0200 (CEST) Message-ID: <238625032.1126272691615.JavaMail.jira@ajax.apache.org> Date: Fri, 9 Sep 2005 15:31:31 +0200 (CEST) From: "Edgar Poce (JIRA)" To: jackrabbit-dev@incubator.apache.org Subject: [jira] Resolved: (JCR-213) Avoid creation of more than one jackrabbit instance with the same configuration In-Reply-To: <1059723773.1126238550386.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JCR-213?page=all ] Edgar Poce resolved JCR-213: ---------------------------- Resolution: Fixed > > i woud also mark it for 'auto-deletion' by calling File.deleteOnExit() > I would not. Apart from deleteOnExit() being prone to memory problems, > I think the existence of the lock file beyond the life time of the repository would > indicate problems. I agree with felix. anyway the change proposed by tobi can be added later if needed. > PS. Should the releaseRepositoryLock call be placed at the end of the shutdown() method > instead of the beginning? I agree. thanks for your comments > Avoid creation of more than one jackrabbit instance with the same configuration > ------------------------------------------------------------------------------- > > Key: JCR-213 > URL: http://issues.apache.org/jira/browse/JCR-213 > Project: Jackrabbit > Type: Improvement > Components: core > Reporter: Edgar Poce > Assignee: Edgar Poce > Priority: Minor > Fix For: 1.0 > Attachments: 05-09-09-lockRepoHome.patch > > based on the mailing list archive, it seems new users often run more than one jackrabbit instance with the same configuration. I propose to lock the repository by creating an empty file called ".lock" at the repository home on startup and remove it on shutdown. > If the lock file is found on jackrabbit startup the following message will be logged: > "The repository home at " + home.getAbsolutePath() + " appears to be in use. If you are sure it's not in use please delete the file at " + lock.getAbsolutePath() + ". Probably the repository was not shutdown properly." -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira