jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cech. Ulrich" <Ulrich.C...@aeb.de>
Subject AW: 30 secondes to create and open a repository ?
Date Thu, 11 Nov 2010 07:25:12 GMT
Hi,

did you try to configure a repository.xml and choose simple FileSystem as PersistenceManager
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√ľngliche Nachricht-----
Von: Ista Pouss [mailto:istaous@gmail.com] 
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 = System.currentTimeMillis();
    System.out.println("start at " + time);
    File dir = new File(System.getProperty("java.io.tmpdir"));
    dir = new File(dir, "jcr" + time);
    dir.mkdirs();
    TransientRepository repo = new TransientRepository(dir);
    Session session = 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.<init>(FileOutputStream.java:177)
        at java.io.FileOutputStream.<init>(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:132)
        at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
        at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
        at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
        at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.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.<clinit>(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.<clinit>(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/default
---------
- 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 initial
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 initial
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 initial
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 = class
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.

Mime
View raw message