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

Reply via email to