Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 86504 invoked from network); 11 Nov 2010 07:25:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Nov 2010 07:25:14 -0000 Received: (qmail 59397 invoked by uid 500); 11 Nov 2010 07:25:45 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 59255 invoked by uid 500); 11 Nov 2010 07:25:43 -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 59244 invoked by uid 99); 11 Nov 2010 07:25:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 07:25:43 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.172.26.36] (HELO MX2.aeb.de) (194.172.26.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 07:25:34 +0000 X-IronPort-AV: E=Sophos;i="4.59,181,1288566000"; d="scan'208";a="1790190" Received: from unknown (HELO S-HQMX6.pmbelz.de) ([10.237.5.6]) by MX2I.pmbelz.de with ESMTP; 11 Nov 2010 08:25:14 +0100 Received: from S-HQMX6.pmbelz.de ([fe80::c11d:7ab7:ed94:fb34]) by S-HQMX6.pmbelz.de ([fe80::c11d:7ab7:ed94:fb34%14]) with mapi; Thu, 11 Nov 2010 08:25:13 +0100 From: "Cech. Ulrich" To: "users@jackrabbit.apache.org" Date: Thu, 11 Nov 2010 08:25:12 +0100 Subject: AW: 30 secondes to create and open a repository ? Thread-Topic: 30 secondes to create and open a repository ? Thread-Index: AcuA8N+nRRxn/1spQKC6u5tXfPXhXAAgDUSg Message-ID: References: In-Reply-To: Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, did you try to configure a repository.xml and choose simple FileSystem as P= ersistenceManager and so on and give this XML to the TransientRepository? Do you have some other IO-Processes in the background? The code is quite ok= , but the starting of the repository should never last so long. Bye, Ulrich -----Urspr=FCngliche Nachricht----- Von: Ista Pouss [mailto:istaous@gmail.com]=20 Gesendet: Mittwoch, 10. November 2010 17:03 An: users@jackrabbit.apache.org Betreff: 30 secondes to create and open a repository ? Hi, On my post I need 30s to create and open a repository. Is it possible to reduce this time ? Here is my super program : package com.hum; import java.io.File; import javax.jcr.Session; import javax.jcr.SimpleCredentials; import org.apache.jackrabbit.core.TransientRepository; public class HurryUpJCR { public static void main(String[] args) throws Exception { long time =3D System.currentTimeMillis(); System.out.println("start at " + time); File dir =3D new File(System.getProperty("java.io.tmpdir")); dir =3D new File(dir, "jcr" + time); dir.mkdirs(); TransientRepository repo =3D new TransientRepository(dir); Session session =3D repo.login( new SimpleCredentials("logiciel", "mamamia".toCharArray())); System.out.println("finish at " + System.currentTimeMillis()); } } And I get start at 1289404350797, end at 1289404377984, so 27secondes more or less. My computer is a normal computer, and my jvm is 1.6.0_22, jackrabitt 2.0.0. Here is my complete log : --- exec-maven-plugin:1.1.1:exec (default-cli) @ autonome --- start at 1289404350797 log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /logs/auteurlog4j.log (No such file or directory) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:177) at java.io.FileOutputStream.(FileOutputStream.java:102) at org.apache.log4j.FileAppender.setFile(FileAppender.java:289) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:167) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:13= 2) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96= ) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.ja= va:654) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.ja= va:612) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigu= rator.java:509) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java= :415) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java= :441) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter= .java:470) at org.apache.log4j.LogManager.(LogManager.java:122) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:249) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:261) at org.apache.jackrabbit.core.TransientRepository.(TransientRepository= .java:53) at com.hum.HurryUpJCR.main(HurryUpJCR.java:26) - 10 nov. 2010 16:52:30,963 INFO [main] org.apache.jackrabbit.core.config.RepositoryConfig : Installing default repository configuration to /tmp/jcr1289404350797/repository.xml --------- - 10 nov. 2010 16:52:31,120 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : Starting repository... --------- - 10 nov. 2010 16:52:31,125 INFO [main] org.apache.jackrabbit.core.fs.local.LocalFileSystem : LocalFileSystem initialized at path /tmp/jcr1289404350797/repository --------- - 10 nov. 2010 16:52:31,311 INFO [main] org.apache.jackrabbit.core.nodetype.NodeTypeRegistry : no custom node type definitions found --------- - 10 nov. 2010 16:52:31,320 INFO [main] org.apache.jackrabbit.core.fs.local.LocalFileSystem : LocalFileSystem initialized at path /tmp/jcr1289404350797/version --------- - 10 nov. 2010 16:52:40,310 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : initializing workspace 'default'... --------- - 10 nov. 2010 16:52:40,311 INFO [main] org.apache.jackrabbit.core.fs.local.LocalFileSystem : LocalFileSystem initialized at path /tmp/jcr1289404350797/workspaces/defaul= t --------- - 10 nov. 2010 16:52:49,936 INFO [main] org.apache.jackrabbit.core.query.lucene.MultiIndex : indexing... /jcr:system/jcr:nodeTypes/nt:file (100) --------- - 10 nov. 2010 16:52:50,083 INFO [main] org.apache.jackrabbit.core.query.lucene.MultiIndex : Created initia= l index for 180 nodes --------- - 10 nov. 2010 16:52:50,083 INFO [main] org.apache.jackrabbit.core.query.lucene.SearchIndex : Index initialized: /tmp/jcr1289404350797/repository/index Version: 3 --------- - 10 nov. 2010 16:52:50,285 INFO [main] org.apache.jackrabbit.core.query.lucene.MultiIndex : Created initia= l index for 1 nodes --------- - 10 nov. 2010 16:52:50,286 INFO [main] org.apache.jackrabbit.core.query.lucene.SearchIndex : Index initialized: /tmp/jcr1289404350797/workspaces/default/index Version: 3 --------- - 10 nov. 2010 16:52:50,286 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : workspace 'default' initialized --------- - 10 nov. 2010 16:52:50,292 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : created system workspace: security --------- - 10 nov. 2010 16:52:50,292 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : Repository started --------- - 10 nov. 2010 16:52:50,292 INFO [main] org.apache.jackrabbit.core.TransientRepository : Transient repository initialized --------- - 10 nov. 2010 16:52:50,292 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : initializing workspace 'security'... --------- - 10 nov. 2010 16:52:50,293 INFO [main] org.apache.jackrabbit.core.fs.local.LocalFileSystem : LocalFileSystem initialized at path /tmp/jcr1289404350797/workspaces/security --------- - 10 nov. 2010 16:52:57,924 INFO [main] org.apache.jackrabbit.core.query.lucene.MultiIndex : Created initia= l index for 1 nodes --------- - 10 nov. 2010 16:52:57,924 INFO [main] org.apache.jackrabbit.core.query.lucene.SearchIndex : Index initialized: /tmp/jcr1289404350797/workspaces/security/index Version: 3 --------- - 10 nov. 2010 16:52:57,925 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : workspace 'security' initialized --------- - 10 nov. 2010 16:52:57,932 INFO [main] org.apache.jackrabbit.core.security.simple.SimpleSecurityManager : init: using Repository LoginModule configuration for Jackrabbit --------- - 10 nov. 2010 16:52:57,940 INFO [main] org.apache.jackrabbit.core.RepositoryImpl : SecurityManager =3D cla= ss org.apache.jackrabbit.core.security.simple.SimpleSecurityManager --------- - 10 nov. 2010 16:52:57,984 INFO [main] org.apache.jackrabbit.core.TransientRepository : Session opened --------- finish at 1289404377984 Thanks.