Hi, On Tue, Mar 16, 2010 at 10:55 AM, Niu, Xuetao <[email protected]> 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. BR, Jukka Zitting
