jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Moseley <...@osafoundation.org>
Subject shutting down repository obtained from jndi via spring
Date Thu, 29 Sep 2005 02:38:43 GMT
i know at least a few folks here use spring with jackrabbit, so i'm 
asking this question here first in hopes that somebody has already 
solved the problem.

i'm using spring's JndiObjectFactoryBean to obtain the Repository i've 
set up as a naming resource in tomcat.

since updating to the latest jackrabbit source, i'm finding that a 
normal server shutdown does not cause the repository to be shutdown. the 
repository lock file is not removed, and i can not successfully reopen 
the repository when restarting tomcat.

i tried using a destroy method on my bean (see below), but i got an 
error from DefaultListableBeanFactory that "Couldn't find a destroy 
method named 'shutdown' on bean with name 'jcrRepository'".

   <bean id="jcrRepository"
     <property name="jndiName">
     <property name="resourceRef">

destroy-method works fine in my test environment, where i instantiate 
RepositoryImpl directly.

   <bean id="jcrRepositoryConfig"
     <constructor-arg type="java.lang.String" index="0">
     <constructor-arg type="java.lang.String" index="1">

   <bean id="jcrRepository"
       <ref local="jcrRepositoryConfig"/>

any suggestions? i *really* don't want to have to write a servlet 
context listener to shut jackrabbit down. i have thus far managed to 
keep jackrabbit-specific code out of the webapp and would like to keep 
it that way.


View raw message