Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 63311 invoked from network); 16 Mar 2010 10:14:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Mar 2010 10:14:30 -0000 Received: (qmail 11796 invoked by uid 500); 16 Mar 2010 10:14:29 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 11707 invoked by uid 500); 16 Mar 2010 10:14:29 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 11698 invoked by uid 99); 16 Mar 2010 10:14:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 10:14:28 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dreamreal@gmail.com designates 209.85.220.218 as permitted sender) Received: from [209.85.220.218] (HELO mail-fx0-f218.google.com) (209.85.220.218) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 10:14:22 +0000 Received: by fxm10 with SMTP id 10so3113500fxm.10 for ; Tue, 16 Mar 2010 03:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=xJOi6bj4DEYzEp8VGRl0ZcyV96QaSWwtrJ7ZUaq64Wk=; b=Mwy6GqcrU85jBKhEE4e2mYqSmw0fSTUbJGFyHw+v5Kn1iVtNr+srJtQsMFPmgaK+bw XIfSM2hwCR2eR+pzOHIZ8i+j9Od8T83V7gjsu86GmHXp3syqfgHX7UAPY1hjJXUBR1vX DSuC1ncRQmwXHBPbGR0FcuDiASfI/ID+alP/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=HTSix3h4HAha9asdV8woeCOlss9sXG99fMkNEtEJyfvJOx9Q5zGoulnNyvYevOK92l xUJOg1YNoMED5uQOGQZ0FlfaWogahBxuQ2zdaXvLh6Sg3ZO1B/P8+xapgx4U5RAp3PQ0 MMnyo0aaJ3ZHHF4IrsjFI9vhMx9Umvg9UFDb8= MIME-Version: 1.0 Received: by 10.239.190.137 with SMTP id x9mr1019690hbh.17.1268734442040; Tue, 16 Mar 2010 03:14:02 -0700 (PDT) In-Reply-To: <510143ac1003160259y589616dcs73c4594fa4a2b608@mail.gmail.com> References: <1774B1C6F7D65448AE964FB69BC08AEE08F7DCC8@MKEXCHVS3.Mail.Fiserv.net> <510143ac1003160259y589616dcs73c4594fa4a2b608@mail.gmail.com> Date: Tue, 16 Mar 2010 06:14:02 -0400 Message-ID: <8fb1e0d21003160314t6e3ea207v87abd0e1a31790a5@mail.gmail.com> Subject: Re: How to force TransientRepository not to shutdown when no active sessions? From: Joseph Ottinger To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=001485f5d210bb70490481e8413d X-Virus-Checked: Checked by ClamAV on apache.org --001485f5d210bb70490481e8413d Content-Type: text/plain; charset=ISO-8859-1 Jukka, it might be a good idea for JackRabbit to have this as part of the actual package - I was wondering the same thing myself. On Tue, Mar 16, 2010 at 5:59 AM, Jukka Zitting wrote: > Hi, > > On Tue, Mar 16, 2010 at 10:55 AM, Niu, Xuetao > 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 > -- Joseph B. Ottinger http://enigmastation.com --001485f5d210bb70490481e8413d--