From jackrabbit-dev-return-771-apmail-incubator-jackrabbit-dev-archive=www.apache.org@incubator.apache.org Thu Feb 17 14:50:55 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 44656 invoked from network); 17 Feb 2005 14:50:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Feb 2005 14:50:54 -0000 Received: (qmail 81981 invoked by uid 500); 17 Feb 2005 14:50:54 -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 81967 invoked by uid 99); 17 Feb 2005 14:50:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: 24.232.0.219 is neither permitted nor denied by domain of edgarpoce@gmail.com) Received: from avas-mr06.fibertel.com.ar (HELO avas-mr06.fibertel.com.ar) (24.232.0.219) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 17 Feb 2005 06:50:53 -0800 Received: from OL20-12.fibertel.com.ar ([24.232.12.20]:52741 "EHLO [192.168.0.187]" smtp-auth: "edgarpoce") by avas-mr06.fibertel.com.ar with ESMTP id S180369AbVBQOum; Thu, 17 Feb 2005 11:50:42 -0300 X-Comment: RFC 2476 MSA function at avas-mr06.fibertel.com.ar logged sender identity as: edgarpoce Message-ID: <4214AF36.2030007@gmail.com> Date: Thu, 17 Feb 2005 11:50:30 -0300 From: Edgar Poce User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: How to call RepositoryImpl.shutdown() when using RegistryHelper References: <20050217140951.79625.qmail@web52702.mail.yahoo.com> In-Reply-To: <20050217140951.79625.qmail@web52702.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Fib-Al-Info: Al X-Fib-Al-MRId: 056fa1a519f53468a9d27e08d0dbdd89 X-Fib-Al-From: edgarpoce@gmail.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi francis > I use Jackrabbit API from JSPs under Tomcat 5.5.7 and > i don't know if hooks are called when processing JSPs > (i don't know how hooks work). I'll google the web but > if someone have the solution, it would be nice to post > it here. You can delegate on the container the jackrabbit lifecycle through j2ee JNDI Resources. Tomcat will take care of jackrabbit startup and the hook will take care of shutting it down when you stop tomcat. Just don't kill the jvm process and it should work ok. You have to register jackrabbit in the JNDI env. factory org.apache.jackrabbit.core.jndi.BindableRepositoryFactory configFilePath [path to repository.xml] repHomeDir [path to repository folder] and you will be able to get the repository with this code InitialContext ctx = new InitialContext(); Context env = (Context) ctx.lookup("java:comp/env"); Repository o = (Repository) env.lookup("jcr/repositoryFactory"); regards Edgar