Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 59247 invoked from network); 30 Apr 2008 12:08:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2008 12:08:48 -0000 Received: (qmail 73542 invoked by uid 500); 30 Apr 2008 12:08:49 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 73186 invoked by uid 500); 30 Apr 2008 12:08:48 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 73168 invoked by uid 99); 30 Apr 2008 12:08:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 05:08:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tmueller@day.com designates 62.192.10.254 as permitted sender) Received: from [62.192.10.254] (HELO goobak01.day.com) (62.192.10.254) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 12:08:03 +0000 Received: by goobak01.day.com (Postfix, from userid 1212) id BDB3F50871; Wed, 30 Apr 2008 14:07:15 +0200 (CEST) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.227]) by goobak01.day.com (Postfix) with ESMTP id 890E55086C for ; Wed, 30 Apr 2008 14:07:15 +0200 (CEST) Received: by hu-out-0506.google.com with SMTP id 19so638933hue.21 for ; Wed, 30 Apr 2008 05:07:55 -0700 (PDT) Received: by 10.150.212.12 with SMTP id k12mr861073ybg.228.1209557272769; Wed, 30 Apr 2008 05:07:52 -0700 (PDT) Received: by 10.151.84.3 with HTTP; Wed, 30 Apr 2008 05:07:52 -0700 (PDT) Message-ID: <91f3b2650804300507q5265049cj8c69cb9a8c03d0a0@mail.gmail.com> Date: Wed, 30 Apr 2008 14:07:52 +0200 From: "=?ISO-8859-1?Q?Thomas_M=FCller?=" Sender: tmueller@day.com To: dev@jackrabbit.apache.org Subject: Re: remove JackrabbitRepository.shutdown() In-Reply-To: <510143ac0804280848t1008b27fo39ab5bf7e0955ec0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <91f3b2650804280325m7e313a64pdd5e3ebf893525b2@mail.gmail.com> <510143ac0804280407v17c6d9d2w831241e87f6f0ba9@mail.gmail.com> <91f3b2650804280529r73117e36p9b363fbe9012f2b0@mail.gmail.com> <510143ac0804280848t1008b27fo39ab5bf7e0955ec0@mail.gmail.com> X-Google-Sender-Auth: 397ecf9ea65cf250 X-Virus-Checked: Checked by ClamAV on apache.org Hi, > I have no concerns about shutdown being in an interface as such > I just object to putting it in a client-level interface. We should have discussed that earlier... > For example the > idea of a separate RepositoryManager interface that covers both > repository startup and shutdown is IMHO much better. OK then let's do that. Technically it's not a problem. It's not the most simple solution, but I understand your concern. > > > [JCRLog] It doesn't cover repository startup. > Sorry, doesn't cover the startup in a repository-independent manner. It does up to some point, see RepositoryFactory.open. > Since JCRLog already has a dependency to jackrabbit-core I hope it's just a compile time dependency. If not, it could be made into a compile time dependency if required. > and uses specific class references (TransientRepository) to start up a > repository, why should it have a generic mechanism for shutting the > repository down? JCRLog is incomplete. Currently it's hard to use it because there are still too many direct references to Jackrabbit classes in containers and applications using Jackrabbit. Shutdown is one of them ;-) > public interface RepositoryMBean { > void startRepository() throws RepositoryException; > void stopRepository() throws RepositoryException; > boolean isRunning(); > Repository getRepository(); > } That would be OK for me. > RepositoryMBean bean = new RepositoryMBeanImpl(/* config */); This could be written as: RepositoryMBean bean = RepositoryMBeanFactory.create(url); The URL could be one of: "jackrabbit/transient" "jackrabbit:file:~/repos/test" "jackrabbit:jndi:jcr/globalRepository" "jackrabbit:rmi:localhost/jackrabbit" "jackrabbit:rmi://localhost/jackrabbit" "jackrabbit:jcrlog:jackrabbit/file/~/repos/test" The RepositoryMBeanFactory doesn't need to know the classes (RepositoryMBeanImpl,...). Instead, the Java service provider interface can be used to load the classes, and the classes would register themselves in the RepositoryMBeanFactory. Regards, Thomas