This doesn't answer the question about synchronization in AbstractBundlePersistenceManager.
I am aware of using Session. However, all session will eventually access Persistence Manager to fetch data. Thanks, Naren On Sun, May 16, 2010 at 7:29 PM, Rakesh Vidyadharan <[email protected]>wrote: > > 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). > > Rakesh
