jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabián Mandelbaum <fmandelb...@gmail.com>
Subject Re: jcr session creation takes 2 seconds
Date Thu, 22 Oct 2009 12:36:07 GMT
Hello,

for all it's worth: I am using R/O and R/W session pooling, with
Apache Common's pool classes.

Indeed opening/closing a session for each request is costy.

The downside, with the TransientRepo, the repo is locked while the app
is running, so there's no way you can access the repo with other tools
while the app is running (which is not a problem for me, just an
annoyance to debug the repo).

I'm using JackRabbit 1.4.8.

On Thu, Oct 22, 2009 at 8:57 AM, Torgeir Veimo <torgeir@netenviron.com> wrote:
> I've started seeing lately that session creation takes up to two
> seconds. Am creating a new session on each http request at the moment,
> but from what I've been reading in the past, such creation should not
> be too demanding on the repository.
>
> 21:41:47,549 DEBUG SessionManager  - creating new admin credentials
> jcr session took: 1977ms
>
> Session created as
>
> session = repository.login(new SimpleCredentials("admin", new
> char[]{'a','d','m','i','n'}));
>
> Repository.xml as following. Any idea where I can look? Or do I need
> to implement some sort of read-only session pooling?
>
> <?xml version="1.0"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
> Jackrabbit 1.5//EN"
>
> "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
> <Repository>
>    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>        <param name="path" value="${rep.home}/repository"/>
>    </FileSystem>
>
>    <Security appName="Jackrabbit">
>        <SecurityManager
> class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
> workspaceName="security">
>        </SecurityManager>
>
>        <AccessManager
> class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
>        </AccessManager>
>
>        <LoginModule
> class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
>           <param name="anonymousId" value="anonymous"/>
>           <param name="adminId" value="admin"/>
>        </LoginModule>
>    </Security>
>
>    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
>    <Workspace name="${wsp.name}">
>        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>            <param name="path" value="${wsp.home}"/>
>        </FileSystem>
>
>        <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
>          <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
>          <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>        </PersistenceManager>
>        <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>            <param name="path" value="${wsp.home}/index"/>
>            <param name="textFilterClasses"
> value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>            <param name="extractorPoolSize" value="2"/>
>            <param name="supportHighlighting" value="true"/>
>        </SearchIndex>
>    </Workspace>
>
>    <Versioning rootPath="${rep.home}/version">
>        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>            <param name="path" value="${rep.home}/version" />
>        </FileSystem>
>
>        <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
>          <param name="url"
> value="jdbc:derby:${rep.home}/version/db;create=true"/>
>          <param name="schemaObjectPrefix" value="version_"/>
>        </PersistenceManager>
>    </Versioning>
>
>    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>        <param name="path" value="${rep.home}/repository/index"/>
>        <param name="textFilterClasses"
> value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>        <param name="extractorPoolSize" value="2"/>
>        <param name="supportHighlighting" value="true"/>
>    </SearchIndex>
> </Repository>
>
>
> --
> -Tor
>



-- 
Fabián Mandelbaum
IS Engineer

Mime
View raw message