> From: Peter Donald [mailto:[EMAIL PROTECTED]] > > On Tue, 9 Jul 2002 22:51, Berin Loritsch wrote: > > > From: Peter Donald [mailto:[EMAIL PROTECTED]] > > > > > > Hi, > > > > > > I was looking at the Parser interface and it seems very very > > > unlikely that any implementation will ever not be > threadsafe. So is > > > it safe to assume that it > > > always will be? > > > > The XercesParser isn't > > Ug - dont know how I missed that. I assume Xerces parser is still in > operation?
The JAXPParser is the default parser. The XercesParser tried to be poolable, but Cocoon ran into issues when the parser was reused. Once a parser threw an exception, it would always throw the same exception no matter what the source was. I think XercesParser can be made to be ThreadSafe. The biggest thing is that the component is implementing SAX interfaces, instead of using a child object for the same thing. It's a point of clean up we still need to do. > In which case can I make it thread safe via some primitive > pooling of the > SAXParser. If you do, have it catch exceptions so that the parser can be removed from the pool when an exception is caught (it's a real issue). > BTW it seems that the XercesParser is a little buggy. The > lexical handler is > never reset to null between subsequent runs even if null is passed in. True. Most support has gone into the more robust JAXPParser. The XercesParser is needed in environments with broken classloaders or JAXP 1.0 environments like BEA WebLogic 6.0. Since most current products supply JAXP 1.1 (including JDK 1.4) the XercesParser can be slowly phased out. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>