jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Creating a new Jackrabbit repository session for each incoming web service request
Date Fri, 20 Nov 2009 19:21:37 GMT
On Fri, Nov 20, 2009 at 19:27, Phukan, Anit <Anit_Phukan@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

Mime
View raw message