jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Vidyadharan <rak...@sptci.com>
Subject Re: Persistence Manager - Query on Concurrency
Date Mon, 17 May 2010 02:29:43 GMT

On 16 May 2010, at 20:37, Narendra Sharma wrote:

> I am learning about Apache JackRabbit and trying to understand the Bundle
> Persistence Manager. I observed that the methods (load and exists) in the
> AbstractBundlePersistenceManag
> er are synchronized. Is there any specific reason why they are synchronized?
> The only reason I can think of is that it has been kept so to keep both
> cache and persistence store in sync. Is this reason "the reason"?
> Also, If I understand correctly there will be a single instance of
> Persistence Manager. If this correct then synchronization of methods like
> load, exists and store would mean that only one operation can happen at a
> time. This is a serious limitation esp when the repository is large and
> cannot fit in the cache.
> What is the best way to handle multiple concurrent writes through
> Persistence Manager? Shall I implement my own Persistence Manager and not
> extend AbstractBundlePersistenceManager? Do you see any design and
> implementation issues that would prevent me from doing this? What are other
> alternatives?
> Thanks,
> Naren

You should work with the JCR API and not the JackRabbit API (other than for the initial configuration
of the Repository).  You have Session interfaces in the JCR API that you use.  You create
as many session instances as you need (essentially one Session per thread of execution).

View raw message