jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart van der Schans <b.vandersch...@onehippo.com>
Subject Namespace methods synchronization in AbstractSession
Date Fri, 12 Jun 2009 11:33:12 GMT
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

Mime
View raw message