jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torgeir Veimo <torg...@pobox.com>
Subject Re: repository shutdown
Date Mon, 17 Apr 2006 12:02:29 GMT
On Sat, 2006-04-15 at 21:30 +0300, Jukka Zitting wrote:
> Hi,
> On 4/15/06, Torgeir Veimo <torgeir@pobox.com> wrote:
> > What's the normal way to trigger a repository shutdown?
> >
> > I retrieve any repository instance through jndi in our webapp, and close
> > any open session when no longer in use, yet when we redeploy our webapp,
> > we get out-of-memory exceptions since the repository isn't being closed
> > down, causing the old webapp instance to remain in memory.
> The preferred way to shut down a Jackrabbit repository is to call the
> JackrabbitRepository.shutdown() method. (You can cast a Jackrabbit
> Repository instance to the
> org.apache.jackrabbit.api.JackrabbitRepository interface.) You can do
> this for example in a Servlet.destroy() method of a model 1
> deployment.

This doesn't really work if the repository is configured using jndi,
since the repository instance is a BindableRepository, which is a
package protected class, so you can't cast to it, and the shutdown
method is package protected as well.

Torgeir Veimo <torgeir@pobox.com>

View raw message