jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea K." <akre...@alteanet.it>
Subject RE: Shared session pool
Date Tue, 08 Jan 2008 09:37:14 GMT

Hi Shaun,
I implemented an easy pool that hold a group of read-only session (15 per
workspace) and share them to users. A session is not dedicated to a request,
but is shared for multiple request.

These are actual property in JCA connector xml:
                <property name="waitTimeout" value="0" />
		<property name="scheme" value="dynamic" />
		<property name="maxConnections" value="200" />
		<property name="inactivity-timeout-check" value="all" />
		<property name="minConnections" value="1" />
		<property name="inactivity-timeout" value="900" />

To ensure a polish situation in time, i run a scheduled task that clean the
pool every 30 min, and recreate 15 new sessions every time. Old sessions are
logged out or expires automatically. These ensure a correct value of
CacheManager, normally below 100.

What do you think about that?

It works well, is synchronized obviously, but performance seems to be better
than dedicated sessions.

Just an issue. Sometimes the pool hang up and I think is linked to dead
sessions... Now I'm trying controlling also isLive session properties before
returning to user.

Do you have any help to improve my code?

I can share it if is needed...

Thanks a lot.



sbarriba wrote:
> 
> Hi Andrea,
> We use an "Open Session In View" pattern with Jackrabbit and
> org.apache.commons.pool.KeyedObjectPool.
> Within a Filter:
> * we determine the context workspace name from the request (based on the
> URL) 
> * retrieve a JCR session from the pool
> * bind it to the thread for the duration of the request and
> * then return it to the pool again after the request completes.
> This has worked well for us. Hope this helps.
> Regards,
> Shaun
> 
> -----Original Message-----
> From: Andrea K. [mailto:akregar@alteanet.it] 
> Sent: 24 December 2007 10:47
> To: users@jackrabbit.apache.org
> Subject: Shared session pool
> 
> 
> Hi all,
> I want to start a thread concerning forum users experience with session
> pool
> in (web) apps using JR.
> I read about many users are using pools in their applications.
> 
> Does anyone want to share his knowledge/code?
> 
> Thank you all.
> 
> Best regards and Merry Christmas.
> AK.
> -- 
> View this message in context:
> http://www.nabble.com/Shared-session-pool-tp14486499p14486499.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Shared-session-pool-tp14486499p14685207.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message