We are running 1.1 of Dom4J on OS/390 (mainframe), and IBM helped us isolate
a problem within dom4j.

The code is thus:

We create an element using DocumentHelper.

We then addElement(String) to the element.


IBM's look at our WAS trace showed that, at time of failure, we have two
threads in this code, and each one of them does this:

0000045e    java/util/HashMap.rehash()V                                 
00000234    java/util/HashMap.put(Ljava/lang/Object;Ljava/lang/Object;) 
00000534    mmipSelectInvokeJavaMethod  (org/dom4j/tree/QNameCache.get) 
00000534    mmipSelectInvokeJavaMethod                                  
                                (org/dom4j/DocumentFactory.createQName) 
00000534    mmipSelectInvokeJavaMethod                                  
                            (org/dom4j/tree/AbstractElement.addElement) 
00000534    mmipSelectInvokeJavaMethod                                  
                         (org/acord/xmlife/io/XMLifeWriter.buildPolicy) 


Our added Element has no namespace.  (I should probably add one, but have
not)  I think I traced the operation down to:

AddElement called getDocumentFactory, which noticed no namespace so returns
the default factory, which is a singleton
CreateElement is called (I think, it does not reflect in stack trace), which
tries to get an entry from QnameCache, which fails and a new Qname is put in
the Qname cache, which is a HashMap.

What I need to know is:

If we move to 1.3, will this problem go away (HashTables in DocumentFactory,
or synchronized methods?)
If not, what can we do to make this go away.  From our perspective, we have
an instance variable of Element, and we thought it was thread safe.

Jim


Jim Brain, [EMAIL PROTECTED] <mailto:jbrain@;aegonusa.com> 
"Researching tomorrow's decisions today."
(319) 369-2070 (work)
Systems Architect, ITS, AEGON Financial Partners



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to