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 Sat, 15 Apr 2006 22:49:25 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.

Is it possible to set up a model deployment while still configuring the
repository in the deployment descriptor of the webapp?

> Support for this feature is however not yet available in the
> BindableRepositoryFactory object factory so you'll need custom code to
> bind a TransientRepository to JNDI.

A TransientRepository wouldn't be sufficient here, since it doesn't
actually persist any data?

What's exactly the issue with the repository that prevents gc when all
sessions are closed?

-- 
Torgeir Veimo <torgeir@pobox.com>


Mime
View raw message