jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: How to force TransientRepository not to shutdown when no active sessions?
Date Tue, 16 Mar 2010 09:59:05 GMT

On Tue, Mar 16, 2010 at 10:55 AM, Niu, Xuetao <Xuetao.Niu@fiserv.com> wrote:
> I noticed that when there is no active sessions of TransientRepository,
> it automatically shuts down itself; and when there comes the 1st active
> session, it starts itself, which takes considerably long time.
> I am wondering if there is a way to tell the repository not to shutdown
> based on no active sessions? And what are the consequences?

You can simply keep one session open as long as you want to keep the
repository. The overhead is minimal if you don't use the session for
anything else.

The alternative is to directly create and manage a RepositoryImpl
instance. This works just as well (it's essentially what
TransientRepository does under the hood), and the repository only gets
closed when you explicitly call the shutdown() method.


Jukka Zitting

View raw message