jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: [jira] Created: (JCR-1793) The abstract base classes in jcr-commons should be synchronized
Date Mon, 20 Oct 2008 12:12:35 GMT
Felix Meschberger wrote:
> Hi,
> Jukka Zitting schrieb:
>> On Wed, Oct 8, 2008 at 4:06 PM, Felix Meschberger <fmeschbe@gmail.com> wrote:
>>> I have the vague guts feeling, that this is not a good idea because it
>>> creates too big synchronized blocks.
>> Why would that be a problem? By definition we should not be having
>> more than one concurrent thread accessing such blocks.
> ehrm, because the synchronized blocks may become too big, which is
> always fragile.

IMO synchronizing access on the JCR API level is desirable because it is simple
and effective. the synchronization issues we had so far were very difficult to
debug or reproduce with a regression test due to the various levels of

the only disadvantage I see right now is that there might be users that share a
session among threads for read-only purpose. those will see a decrease in

> well, this is an interesting point ;-) While I think a service may
> account for some client problems, it may not account for all problems.
> Most notably, if a client is violating the contract, the client should
> get into trouble

I general I agree but when others get in trouble as well then something is wrong
with the implementation. i.e. the repository should never get corrupted even
when multiple threads use whatever method on a single session.


View raw message