jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: AccessManager Question.
Date Thu, 05 Mar 2009 11:21:03 GMT
hi ian

On Thu, Mar 5, 2009 at 2:26 AM, Ian Boston <ieb@tfd.co.uk> wrote:
> I have an AccessManager implementation that uses its own session to get
> properties (ACL) on nodes and the parents of nodes that it is controlling.
> I get lots of
> WARN: overwriting cached item b38c5119-2aa2-4e08-b4bf-41dd1720c197
> (2009-03-03 17:10:59,740
> TP-Processor3_org.apache.jackrabbit.core.ItemManager)
> I think this is because the ItemManager is checking with the AccessManager,
> which is adding the item to the cache in ItemManager, and when the current
> thread returns to ItemManager to put the item in...... its already been
> pulled in by AccessManager.. hence the warn.

that's correct.

> I am using 1.4.8, I couldn't find anything in jira to help.
> So, my questions:
> If I want to store ACL's on the nodes, can I use the same session as is
> accessing the node, or do I have to create a second session just for
> accessing the ACL's ?

i would recommend using a dedicated session for accessing the ACL's.

> Will creating a second session per AccessManager have a performance impact ?

a session is not light-weight and does have a considerable memory footprint.
assuming you've got enough jvm heap it shouldn't cause performance issues.

you might try to use a shared ACL reading session for multiple AccessManagers
in order to reduce memory consumption. we've tried to make read-only sessions
thread-safe, however this has only been a best effort. you might still
run into the
occasional concurrency issue under heavy load. our 'official' stamenet
is: a Session
is not thread-safe.


> Ian

View raw message