Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 74627 invoked from network); 28 Feb 2007 11:26:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2007 11:26:24 -0000 Received: (qmail 96431 invoked by uid 500); 28 Feb 2007 11:26:31 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 96415 invoked by uid 500); 28 Feb 2007 11:26:31 -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 96403 invoked by uid 99); 28 Feb 2007 11:26:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 03:26:31 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.19.7] (HELO sineb-mail-2.sun.com) (192.18.19.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 03:26:18 -0800 Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged)) by sineb-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l1SBPr24012245 for ; Wed, 28 Feb 2007 19:25:56 +0800 (SGT) Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JE600J017GWRG00@mail-apac.sun.com> (original mail from Ruchi.Goel@Sun.COM) for users@jackrabbit.apache.org; Wed, 28 Feb 2007 19:25:53 +0800 (SGT) Received: from [129.158.227.185] by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JE600LQS7QZXX60@mail-apac.sun.com> for users@jackrabbit.apache.org; Wed, 28 Feb 2007 19:25:48 +0800 (SGT) Date: Wed, 28 Feb 2007 16:55:49 +0530 From: ruchi goel Subject: how to shutdown a remote repository Sender: Ruchi.Goel@Sun.COM To: users@jackrabbit.apache.org Message-id: <45E566BD.8000505@sun.com> MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_A8dTND3BWECFzMPZhjd1Jg)" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) X-Virus-Checked: Checked by ClamAV on apache.org --Boundary_(ID_A8dTND3BWECFzMPZhjd1Jg) Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT Hi, *I have a program which registers,starts the repository and then exposes it as remote repository by following code : * Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); InitialContext ctx = new InitialContext(env); RegistryHelper.registerRepository(ctx, REPOSITORY_NAME, REPOSITORY_CONFIG, REPOSITORY_DIR, true); repository = (Repository) ctx.lookup(REPOSITORY_NAME); //bind repository ServerAdapterFactory factory = new ServerAdapterFactory(); RemoteRepository remote = factory.getRemoteRepository(repository); Registry reg = LocateRegistry.createRegistry(new Integer(REPOSITORY_PORT).intValue()); reg.rebind("jackrabbit", remote); *Now , I want a module to shutdown the above repository. I have tried the following :* Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); InitialContext ctx = new InitialContext(env); repository = (Repository) ctx.lookup(REPOSITORY_NAME); RegistryHelper.unregisterRepository(ctx,REPOSITORY_NAME); *But the above is not able to do a lookup for the repository. Then tried looking up as via RMI url :* ClientRepositoryFactory factory = new ClientRepositoryFactory(); try{ repository = factory.getRepository("rmi://localhost:1101/jackrabbit"); }catch(Exception e){ System.out.println(e.getMessage()); e.printStackTrace(); } *But here RemoteRepository does not have a method to shutdown !! Is there some other way to shutdown the repository ?* Thanks, Ruchi --Boundary_(ID_A8dTND3BWECFzMPZhjd1Jg)--