* Extract cache insertion code into new private registerNewNode() method.

* Delay onInit() invocation until after the node has been registered with the cache.
  Two advantages: first, we won't call onInit() on nodes that are bound to be
  thrown away because a clone already exists in the cache, and second no need
  to cache nodes in the transactor clean node map, which was troublesome in
  exactly the same case.
* Remove some old code that has been commented out for ages.
This commit is contained in:
hns 2006-12-12 14:54:52 +00:00
parent d843138386
commit 414b22836b
3 changed files with 78 additions and 148 deletions

View file

@ -198,9 +198,7 @@ public final class XmlDatabaseReader extends DefaultHandler implements XmlConsta
*/
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if ("hopobject".equals(qName) && currentNode != null) {
currentNode.invokeOnInit();
} else if (elementType != null) {
if (elementType != null) {
Property prop = new Property(elementName, currentNode);
String charValue = charBuffer.toString();