Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 78684 invoked from network); 21 Jun 2008 16:32:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jun 2008 16:32:21 -0000 Received: (qmail 52669 invoked by uid 500); 21 Jun 2008 16:32:22 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 52652 invoked by uid 500); 21 Jun 2008 16:32:22 -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 52641 invoked by uid 99); 21 Jun 2008 16:32:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jun 2008 09:32:22 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pauloslf@gmail.com designates 209.85.200.170 as permitted sender) Received: from [209.85.200.170] (HELO wf-out-1314.google.com) (209.85.200.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jun 2008 16:31:33 +0000 Received: by wf-out-1314.google.com with SMTP id 26so1705487wfd.13 for ; Sat, 21 Jun 2008 09:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=Yl5HRr7/UvjDwKmxx0UjHHZPZxCyxvWLqbnrHzHmkQg=; b=EIlaVGGVaxkyfMNO7jMKg0ldXCgvpRCtjaPLfnmLnas9LgABufhUl+gzOqQ/udybXY NSpgjoX+0jR3RtR7QTquBBwRMV8pUilyqYI8caXaFVlxllBmzDGG/YKF2mfjWd7B9LL8 2OeuFaG/nnmLv+2PXzvP+wcr978B76IaN/3/E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=FlG+BaIexYWepL0lBI1e7KCrrpF9NxEBMtNStNWU0ux64b0oQbrTJUR/5YYiaxLLwb gsQKXIz62NxcgULnqsUNgqgerv98RDLeu+5wXs8oOxZNvyGFp/Mm7dESCK4ZbYm9M+eX namPi60dsxOm1uxogLK0LDsGGu4XHcTysOGaM= Received: by 10.142.170.3 with SMTP id s3mr2387502wfe.252.1214065912230; Sat, 21 Jun 2008 09:31:52 -0700 (PDT) Received: by 10.150.137.19 with HTTP; Sat, 21 Jun 2008 09:31:52 -0700 (PDT) Message-ID: Date: Sat, 21 Jun 2008 17:31:52 +0100 From: "Paulo Sergio" To: users@jackrabbit.apache.org Subject: Re: Jackrabit and webdav In-Reply-To: <002101c8d39e$aedb24b0$29b2a8c0@spiritlink.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12457_3621992.1214065912100" References: <001c01c8d39c$85998990$29b2a8c0@spiritlink.de> <002101c8d39e$aedb24b0$29b2a8c0@spiritlink.de> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_12457_3621992.1214065912100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Thanks a lot guys! yes it's really easy indeed, it's now working with tomcat, saving files remotely :) now i have one extra question: what is the advantage of using jackrabbit in tomcat? (apart from integration with a webapplication) does it have better performance? cheers, paulo f. On Sat, Jun 21, 2008 at 1:59 PM, Markus wrote: > Sorry, I forgot the probably most obvious possibility: > > 3. Accessing the repository with RMI (needs jackrabbit-jcr-rmi in client > classpath): > > With running tomcat try the following code in your application (running on > the same machine as the tomcat server): > > package test; > > import org.apache.jackrabbit.rmi.repository.RMIRemoteRepository; > > import javax.jcr.*; > > public class RMITest { > public static void main(String[] args) throws RepositoryException { > Repository repository = new > RMIRemoteRepository("//localhost/jackrabbit.repository"); > Session session = repository.login(new SimpleCredentials("admin", > "admin".toCharArray())); > > NodeIterator nodeIterator = session.getRootNode().getNodes(); > while(nodeIterator.hasNext()) { > System.out.println(nodeIterator.nextNode().getName()); > } > > session.logout(); > } > } > > Regards, > Markus > > -----Original Message----- > From: Markus [mailto:caleb7@gmx.net] > Sent: Saturday, June 21, 2008 2:44 PM > To: users@jackrabbit.apache.org > Subject: RE: Jackrabit and webdav > > Hi Paulo, > > I think there are two approaches for a simple access to the repository > running in your default Jackrabbit-Tomcat installation: > > 1. Access the repository over the TransientRepository class from your > client > application: > - String configLocation = [tomcat]\bin\jackrabbit\repository.xml>; > - String repositoryLocation = [tomcat]\bin\jackrabbit>; > - Repository repository = new TransientRepository(configLocation, > repositoryLocation); > - Session session = repository.login("admin", "admin"); > > Please note, that with this approach you can access the repository only > with > either your client OR the web application. Which means, tomcat must not be > running while you access it with your application. > > 2. Access the repository over JNDI within another webapplication: > - This needs a little extra Tomcat configuration and is briefly described > in > http://localhost:8080/jackrabbit-webapp-1.4/local.jsp > > Regards, > Markus > > > -----Original Message----- > From: Paulo Sergio [mailto:pauloslf@gmail.com] > Sent: Saturday, June 21, 2008 2:13 PM > To: users@jackrabbit.apache.org > Subject: Re: Jackrabit and webdav > > Hi guys, > thanks for all the answers, > i gues i have a problem i have to fix before these one, as i said i pretty > new to jcr and i seem to have missed a point. > when i run the client it creates a new repository and does not use the one > running on tomcat (i assumes it was using localhost as default) > > so first problem is making the client program "talk " with the repository > in > tomcat.. any directions in order to achive this? > > > thanks for helping.. > > paulo f. > On Sat, Jun 21, 2008 at 10:09 AM, Bertrand Delacretaz < > bdelacretaz@apache.org> wrote: > > > Hi Paulo, > > > > On Sat, Jun 21, 2008 at 9:49 AM, Paulo Sergio > wrote: > > > ...is there any place where i can get examples of that code?... > > > > There's an example in Sling's Loader class [1], look at the createFile() > > method. > > > > (there are also examples in Jackrabbit but I'm less familiar with that > > code). > > > > -Bertrand > > > > [1] > > > > http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/jcr/contentloader/s > rc/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java > > > > ------=_Part_12457_3621992.1214065912100--