Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 95445 invoked from network); 19 Dec 2006 08:42:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2006 08:42:30 -0000 Received: (qmail 31693 invoked by uid 500); 19 Dec 2006 08:42:36 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 31687 invoked by uid 500); 19 Dec 2006 08:42:36 -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 31678 invoked by uid 99); 19 Dec 2006 08:42:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Dec 2006 00:42:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 19 Dec 2006 00:42:26 -0800 Received: (qmail invoked by alias); 19 Dec 2006 08:42:04 -0000 Received: from adsl-84-227-24-161.adslplus.ch (EHLO [192.168.0.104]) [84.227.24.161] by mail.gmx.net (mp033) with SMTP; 19 Dec 2006 09:42:04 +0100 X-Authenticated: #894343 Message-ID: <4587A58F.2030908@gmx.net> Date: Tue, 19 Dec 2006 09:40:47 +0100 From: Marcel Reutegger User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Error shutting down RepositoryImpl References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Lei Zhou wrote: > Due to deployment issues (can't use BindableRepository as jndi resource > due to class path conflict with the server), I loaded Jackrabbit classes > and my content managing service JAR file from the EAR root, and used > RepositoryImpl directly. In my initialization code, I used similar Runtime > hook as the BindableRepository to ensure the shutdown method was invoked. > As you've mentioned in Jira entries jcr-120 and jcr-57, it seems to me > that the shutdown hook is invoked too late in the process. I may need to > find another way/place to ensure the shutdown is invoked. > Any suggestion? you could implement a ServletContextListener where you start and stop the repository. or use a simple servlet where you implement the init() and destroy() methods. For an example see: http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java regards marcel