You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Alexander Klimetschek <ak...@day.com> on 2009/11/20 20:21:37 UTC

Re: Creating a new Jackrabbit repository session for each incoming web service request

On Fri, Nov 20, 2009 at 19:27, Phukan, Anit <An...@intuit.com> wrote:
> Could you please let me know if there is a good way to create a new
> repository session for each incoming web service request?
>
> I have created a long running session in a static initializer, but sessions
> are not thread safe and may get corrupted over a period of time with
> multiple concurrent hits.
>
> I would appreciate your thoughts on this.

If you use j2ee, you can easily have a ServletFilter that will create
the session and add it to the servlet attributes for use in your
request handling servlets. Or take a look at Apache Sling [1], which
does that (and much more) automatically for you. For general thoughts
on sessions in the context of web apps, see also [2].

[1] http://sling.apache.org
[2] http://wiki.apache.org/jackrabbit/JcrSessionHandling

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

RE: Creating a new Jackrabbit repository session for each incoming web service request

Posted by "Phukan, Anit" <An...@intuit.com>.
Thanks Alex,

Is there any way that you know of by which I can turn off the
[RepositoryImpl] SecurityManager = class
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager so that
it uses the simple login module only for default login?

Regards
Anit