You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Bart van der Schans <b....@onehippo.com> on 2009/06/12 13:33:12 UTC

Namespace methods synchronization in AbstractSession

Hi,

The namespace handling methods in o.a.j.common.AbstractSession are
synchronized. There is a reference to
https://issues.apache.org/jira/browse/JCR-1793 in the code about it.
The fact that namespace handling is synchronized on the Session causes
deadlocks in our code that use synchronaeous observations. E.g. if
'something' else during the synchronaeous event dispatching tries to
do a getNamespacePrefix() or a getNamespaceURI() it can cause a
deadlock. Would it be an options to use a SynchronizedMap instead of
synchronizing the methods? Or are there some other reasons why the
synchronization is done explicitly on the Session?

Regards,
Bart