On Mon, 2006-04-17 at 14:02 +0200, Torgeir Veimo wrote: > On Sat, 2006-04-15 at 21:30 +0300, Jukka Zitting wrote: > > Hi, > > > > On 4/15/06, Torgeir Veimo <[EMAIL PROTECTED]> 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.
What about making BindableRepository implement JackrabbitRepository ? -- Torgeir Veimo <[EMAIL PROTECTED]>
