Listener Count datastructure in DocumentImpl should be a document variable and 
not static.
------------------------------------------------------------------------------------------

                 Key: XERCESJ-1345
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1345
             Project: Xerces2-J
          Issue Type: Improvement
            Reporter: Ludger Bünger


The listener count datastructure is currently a static global hashtable.

This has the disadvantage of not being thread-safe even across otherwise 
totally independent document instances since each uses the same static 
hashtable to keep track of the number of event listeners registered upon the 
document.

A second effect of this is: 
Deserializing a document with listeners registered upon it in a freshly created 
virtual machine (with a fresh static listener table having no listener count 
data inside) causes the document to believe no event listeners are registered 
upon it and thus not causing dom events to be fired even though listeners are 
registered.

Thus serialisation/deserialisation of documents having listeners registered 
upon them is factually broken since the very first implementation of event 
listeners using the static listener counters (which is if I did not get it 
wrong since event listeners have been implemented in xerces).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to