jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Lifetime of a session?
Date Wed, 02 Mar 2005 20:37:11 GMT
Suhail M. Ahmed wrote:

> Hi Sylvain,
> The Session object is returned on performing a login on the 
> repository. Looking at RepositoryIml you will see
>  Session ses = new XASessionImpl(this, lc, wspInfo.getConfig());
>  activeSessions.put(ses, ses);
> You should I think couple the repository session life cycle to your 
> http session life cycle. I haven't dug deeper in to the object graph 
> derived from session so I can't say anything about the thread safety 
> of Item and its sub classes. I do see some nifty synchronization in 
> the content store implementation so I would think that at that level 
> things are thread safe. I think the optimum route is to use a session 
> listener to login and logout from the repository.

That was my opinion also, but the thread-safety on session itself may be 
a concern if a single user issues several request simultaneously. How 
will the transaction manager behave in such circumstances?


Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message