jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: [jira] Created: (JCR-1793) The abstract base classes in jcr-commons should be synchronized
Date Wed, 08 Oct 2008 14:40:45 GMT

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.

> Therefore I would think, that this is probably not a good idea to do. It
> would probably be better to enhance JavaDoc and tell "not thread-safe"
> in big fat red letters.

The background to this issue is a ConcurrentModificationException that
Angela spotted on the namespace map in AbstractSession. That map is
only ever accessed and modified by public Session methods, so the only
way for that exception to occur is if some client is already breaking
the thread-safety contract of Session. That's clearly a bug in the
client code, but IMHO relying on the correctness of client code is too


Jukka Zitting

View raw message