Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 42457 invoked from network); 4 Oct 2006 09:51:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Oct 2006 09:51:54 -0000 Received: (qmail 88839 invoked by uid 500); 4 Oct 2006 09:51:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 88470 invoked by uid 500); 4 Oct 2006 09:51:53 -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 88459 invoked by uid 99); 4 Oct 2006 09:51:53 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2006 02:51:52 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=tobias.strasser@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.162.201] ([64.233.162.201:37125] helo=nz-out-0102.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 4F/13-00170-A2483254 for ; Wed, 04 Oct 2006 02:51:40 -0700 Received: by nz-out-0102.google.com with SMTP id z3so15422nzf for ; Wed, 04 Oct 2006 02:51:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=i9fQScnh4x1Aue0S75hX96d0MkP+LmpSVe9+U5uGHY+FOdJZB//F72tBHw/I2TI0c7WV0BOmGvS1DpQfetxclnxDWdlYeHepm+UOBvj5QoCwwylafYSD724/zUOoAZn4zNyHuMRRucJAVgRW62R07I25ma7V7fjmpht4aHPy+Qc= Received: by 10.65.20.11 with SMTP id x11mr594089qbi; Wed, 04 Oct 2006 02:51:01 -0700 (PDT) Received: by 10.65.214.16 with HTTP; Wed, 4 Oct 2006 02:51:00 -0700 (PDT) Message-ID: <8be731880610040251t2a464b9bscc6de3103bae6223@mail.gmail.com> Date: Wed, 4 Oct 2006 11:51:00 +0200 From: "Tobias Bocanegra" Reply-To: tobias.bocanegra@day.com Sender: tobias.strasser@gmail.com To: dev@jackrabbit.apache.org Subject: Re: Using jackrabbit repository remotely In-Reply-To: <5f211bd50610040241t6aa2e38du8fb14ec31b8ba642@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5f211bd50610040241t6aa2e38du8fb14ec31b8ba642@mail.gmail.com> X-Google-Sender-Auth: 89c218660e37c18d X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N we once started the jackrabbit-api...maybe it's time to expose those methods via RMI aswell....creating a specific jackrabbit-rmi. On 10/4/06, Thomas Mueller wrote: > Hi, > > I am currently writing a Trace/Log wrapper for the JCR API, and I ran into > the same problem. I think this functionality should be included in the next > JCR API (as part of JSR 283). But I don't know how long this will take? > Short / medium term, I think there are other solutions / workarounds: > > - For those interfaces that need to be extended, create new interfaces as > part of Jackrabbit, and let them extend the JCR API. Then use those > interfaces instead of the JCR API for the RMI API and the log/trace wrapper. > The application then just casts to the new interfaces instead of the > implementation. > > - Alternative solution: Create a public utility class with some public > static methods. Example: JcrUtils.registerNodeType(NodeTypeManager, > InputStream nodeTypeDef). This utility class calls the relevant method(s) > via reflection. For the log/trace wrapper this should be quite easy to > implement, it is probably a little harder for RMI API. > > Thomas > > > On 10/4/06, Eknath Kadam wrote: > > > > I dont what to do about this problem. When connected to a remote > > repository > > using JNP, I see that a couple of repository admin functions are not > > available. > > > > For example, > > 1. Registering cutom nodes. > > Workspace wsp = session.getWorkspace(); > > NodeTypeManager ntMgr = wsp.getNodeTypeManager(); > > NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) > > ntMgr).getNodeTypeRegistry(); > > ntReg.registerNodeType(nodeTypeDef); > > Above code will throw ClassCastException when trying cast NodeTypeManager > > to > > NodeTypeManagerImpl > > > > 2. Creating a new workspace remotely is also not supported > > ((org.apache.jackrabbit.core.WorkspaceImpl > > )workspace).createWorkspace(name); > > > > 3. or shutting down a repository. > > ((org.apache.jackrabbit.core.RepositoryImpl) session.getRepository > > ()).shutdown(); > > > > I was informed by Jukka that JCR-RMI only supports the standard JCR > > interfaces, > > so you can't cast the adapters to Jackrabbit-specific classes. > > > > I understand this but is there any other way or workaround to perform > > these > > functions? Our system would go live soon and before that I need to figure > > out > > how I can do this remotely. > > > > Thanks, > > Eknath > > > > > > > > -- -----------------------------------------< tobias.bocanegra@day.com >--- Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel T +41 61 226 98 98, F +41 61 226 98 97 -----------------------------------------------< http://www.day.com >---