Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 33255 invoked from network); 15 Feb 2006 10:54:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 10:54:33 -0000 Received: (qmail 15785 invoked by uid 500); 15 Feb 2006 10:54:31 -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 15765 invoked by uid 99); 15 Feb 2006 10:54:31 -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; Wed, 15 Feb 2006 02:54:30 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 6037CDF for ; Wed, 15 Feb 2006 11:54:09 +0100 (CET) Message-ID: <200704211.1140000849391.JavaMail.jira@ajax.apache.org> Date: Wed, 15 Feb 2006 11:54:09 +0100 (CET) From: "Mark Slater (JIRA)" To: jackrabbit-dev@incubator.apache.org Subject: [jira] Created: (JCR-318) RepositoryHelper.unregisterRepository() does not allow the repository to be automatically restarted. 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 RepositoryHelper.unregisterRepository() does not allow the repository to be automatically restarted. ---------------------------------------------------------------------------------------------------- Key: JCR-318 URL: http://issues.apache.org/jira/browse/JCR-318 Project: Jackrabbit Type: Bug Components: core Versions: 0.9 Environment: Tomcat 5.5.x, JNDI Reporter: Mark Slater Priority: Minor Using JNDI to create a model 1 (embedded) repository as suggested in the documentation (http://incubator.apache.org/jackrabbit/doc/deploy/howto-model1.html) returns a BindableRepository instance to the web app. The same documentation page strongly recommends the webapp calls RepositoryImpl.shutdown() in the servlet's destroy() method. However, since BindableRepository is restricted to its package, there is no way for the webapp to access the RepositoryImpl. The RepositoryHelper class provides a unregisterRepository() method which can perform the shutdown. Unfortunately, the method does not allow the repository to be restarted later on, forcing a full restart of Tomcat. The exception thrown when trying to access a repository shut down in this manner in a re-deployed webapp is: java.lang.IllegalStateException: repository instance has been shut down org.apache.jackrabbit.core.RepositoryImpl.sanityCheck(RepositoryImpl.java:481) org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1005) org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1080) org.apache.jackrabbit.core.jndi.BindableRepository.login(BindableRepository.java:174) org.apache.jackrabbit.deployment_test.JackrabbitTest.testRepository(JackrabbitTest.java:212) org.apache.jackrabbit.deployment_test.JackrabbitTest.doGet(JackrabbitTest.java:80) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) It may be useful to merge the transient capabilities of TransientRepository into BindableRepository, perhaps making it a factory configuration option. I imagine there's a performance hit to opening a repository, in a shared deployment environment, where the lifecycle is controlled by the application server, it would probably be best to not have the repository be transient. -- 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