jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: is this a valid configuration? somewhat urgent...
Date Sun, 24 Aug 2008 16:34:24 GMT
On Sat, Aug 23, 2008 at 1:24 AM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> Alex
>
> lets back up here -- we are using deployment model 1 (i think) and use the
> jcr api directly in the code.  every request generates  a
> transientrepository.  this is all wired together with spring, which is
> configured with the location of the cnd file and the repo.xml.
>
> so.
>
> every time a new request comes in a TR is generated which lives as long as
> the session.  I don't know if spring is reusing sessions or not.  since the
> sessionfactory, which is attached to the repository factory, is configued
> with the cnd file and repo xml, what is happing with the filesystem to
> support these repositorys?

The normal Spring jcr session factory creates a new session every time
it is asked for a session. This can be suboptimal if there are
multiple sessions created per request (eg. by using jcrtemplates) -
when using JCR in a webapp it is normally the best thing to have one
session per request.

AFAIK the standard spring jcr module does not create a new
transientrepository every time, this is a singleton that is only
created on the first time the jcrsessionfactory is accessed. So all
repository initialization code (eg. reading of the repository.xml and
registering the cnd file) is only called once the TR is created by
Spring. This way the use of a memoryfilesystem should work until
Spring or the webapp is restarted. Anyway, you need to use a
persistent filesystem implementation for a normal jackrabbit usage.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message