jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Newbie Question - Performance
Date Thu, 29 Jun 2006 11:58:23 GMT
On 6/29/06, Torgeir Veimo <torgeir@pobox.com> wrote:
> Tobias Bocanegra wrote:
> > the creation of the session is indeed lightweight. but there are
> > caches attached to the session that increase performance (especially
> > the CachingHierarchyManager). whenever you close (i.e. logout) the
> > session, you loose the cached information.
> >
> > in a web-based environment, with anonymous, access, i would have a
> > pool of connected (i.e. logged-in) jcr-sessions, that are used for
> > every request. this pool can have the size of 1, as long you are only
> > doing read-only access.
> >
> > as soon you have write access, possible several modifications over
> > multiple requests, with a 'save' at the end, you need to attach the
> > jcr-session to the j2ee-session, so that the transient changes don't
> > get lost, or mixed up with different users.
>
> Just to clarify this; a node retrieved from a (read-only) session,
> cannot be used to make modifications in another session?

no. every Node, Property, Workspace etc is bound to the session
it originated from.

in case you meant:
> Just to clarify this; a node retrieved from a (read-only) session,
> cannot be used to make modifications in another *thread*?

no. write operations are not thread-safe.
again, see "7.5 Thread-Safety Requirements" of the jsr 170 spec.

cheers
stefan

>
>
>
> --
> -Torgeir
>

Mime
View raw message