Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 34105 invoked from network); 5 Dec 2005 09:48:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 09:48:45 -0000 Received: (qmail 7620 invoked by uid 500); 5 Dec 2005 09:41:57 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 7352 invoked by uid 99); 5 Dec 2005 09:41:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 01:41:51 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 193.19.192.5 is neither permitted nor denied by domain of the.mindstorm.mailinglist@gmail.com) Received: from [193.19.192.5] (HELO mail.evolva.ro) (193.19.192.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 01:41:49 -0800 Received: (qmail 3500 invoked by uid 1013); 5 Dec 2005 09:41:25 -0000 Received: from 86.55.40.139 by mail.evolva.ro (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87.1/1167. Clear:RC:1(86.55.40.139):. Processed in 0.131349 secs); 05 Dec 2005 09:41:25 -0000 Received: from unknown (HELO ?192.168.62.51?) (alexandru.popescu@evolva.ro@86.55.40.139) by mail.evolva.ro with AES256-SHA encrypted SMTP; 5 Dec 2005 09:41:24 -0000 Message-ID: <43940B03.5000909@gmail.com> Date: Mon, 05 Dec 2005 11:40:19 +0200 From: Alexandru Popescu User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: devJackrabbit Subject: BindableRepository Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! I have been reading about the decissions around the BindableRepository an= d why or why not make it=20 package vs public level. I was wondering how to handle the following scenario: 2 applications A & B using a shared repository application A starts the repository application B retrieves it through JNDI application A is shutdown for maintanance (the repository shouldn't be cl= osed, still being used by B) JVM is shutting down This results imo in a not-shutdown repository. IMO a better approach would be to have the BindableRepository public and = its shutdown public, so=20 that every application relying on it can `try=B4 to close the repository.= I am saying `try=B4 because=20 the BindableRepository should be able to find out if it is still referenc= ed and trigger the=20 RepositoryImpl.shutdown only when the last referencing application is tri= ggering the shutdown. Please let me know what do you think about this. If you agree with this s= cenario I can (almost)=20 immediately provide the patched version. thanks in advance, =2E/alex -- =2Ew( the_mindstorm )p.