You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2005/02/01 13:08:20 UTC

svn commit: r149389 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis: deployment/ engine/ impl/llom/ impl/llom/builder/ impl/llom/factory/ impl/transport/http/ om/

Author: hemapani
Date: Tue Feb  1 04:08:11 2005
New Revision: 149389

URL: http://svn.apache.org/viewcvs?view=rev&rev=149389
Log:
add OMNode pooling

Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/ExecutionChain.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNamedNodeImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPBodyImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPFaultImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderBlockImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXBuilder.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXOMBuilder.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMNode.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java Tue Feb  1 04:08:11 2005
@@ -269,7 +269,6 @@
             } catch (MalformedURLException e) {
                 throw new AxisFault(e.getMessage(),e);
             } catch (Exception e) {
-                e.printStackTrace();
                 throw new AxisFault(e.getMessage(),e);
             }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/ExecutionChain.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/ExecutionChain.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/ExecutionChain.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/ExecutionChain.java Tue Feb  1 04:08:11 2005
@@ -66,9 +66,6 @@
                 }
             }
         } catch (Exception e) {
-            /////////////
-            e.printStackTrace();
-            ////////////////
             while (!executionStack.isEmpty()) {
                 Handler handler = (Handler) executionStack.pop();
                 handler.revoke(msgctx);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java Tue Feb  1 04:08:11 2005
@@ -25,6 +25,8 @@
 import org.apache.axis.om.OMXMLParserWrapper;
 
 
+
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -48,30 +50,36 @@
     private HashMap attributes;
     private Stack namespaceStack;
 
-    public OMElementImpl(OMElement parent) {
-        super(parent);
-        done = true;
-        this.namespaces = CollectionPool.createHashMap(5);
-        this.attributes = CollectionPool.createHashMap(5);
-    }
-
-	public OMElementImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-		super(localName, null, parent);
-		this.namespaces = CollectionPool.createHashMap(5);
-		this.attributes = CollectionPool.createHashMap(5);
 
+	public OMElementImpl(){
+		namespaces = new HashMap(5);
+		this.attributes = new HashMap();
+	}
+
+
+	public void free(){
+		this.namespaces.clear();
+		this.attributes.clear();
+		firstChild.free();
+		OMFactory.newInstance().free(this);
+		nextSibling.free();
+	}
+	
+	
+	public void init(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+		super.init(localName, null, parent);
 		if (ns != null) {
 			setNamespace(handleNamespace(ns));
 		}
 		this.builder = builder;
+		namespaceStack = null;
+		firstChild = null;
 	}
 
 
-    public OMElementImpl(String localName, OMNamespace ns) {
-        super(localName, null, null);
-		this.namespaces = CollectionPool.createHashMap(5);
-		this.attributes = CollectionPool.createHashMap(5);
-
+    public void init(String localName, OMNamespace ns) {
+        super.init(localName, null, null);
+		this.done = true;
         if (ns != null) {
             setNamespace(handleNamespace(ns));
         }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNamedNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNamedNodeImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNamedNodeImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNamedNodeImpl.java Tue Feb  1 04:08:11 2005
@@ -28,17 +28,14 @@
     protected OMNamespace ns;
     protected String localName;
 
-
-    public OMNamedNodeImpl(String localName, OMNamespace ns, OMElement parent) {
-        super(parent);
+	public OMNamedNodeImpl(){}
+	
+    public void init(String localName, OMNamespace ns, OMElement parent) {
+        super.init(parent);
         this.localName = localName;
         this.ns = ns;
     }
 
-    public OMNamedNodeImpl(OMElement parent) {
-        super(parent);
-    }
-
     public String getLocalName() {
         return localName;
     }
@@ -69,26 +66,4 @@
         QName qName = new QName(ns.getName(), localName, ns.getPrefix());
         return qName;
     }
-
-//    /**
-//     * Equals method of QName seems doesn't working the way I need in this situation.
-//     * So implementing my own !!
-//     *
-//     * @param qName
-//     * @return
-//     */
-//    public boolean isQNameEquals(QName qName) {
-//        String thatLocalName = qName.getLocalName();
-//
-//        return ((thatLocalName == null && this.localName == null) || (thatLocalName != null && thatLocalName.equalsIgnoreCase(this.localName)))
-//                && ns.equals(qName.getNamespaceURI(), qName.getPrefix());
-//    }
-//
-//    private String getStringValue(String s) {
-//        if (s == null) {
-//            return "null";
-//        }
-//
-//        return s;
-//    }
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java Tue Feb  1 04:08:11 2005
@@ -2,6 +2,7 @@
 
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNode;
 
 import javax.xml.stream.XMLStreamException;
@@ -43,8 +44,8 @@
      */
 
 
-    public OMNodeImpl(OMElement parent) {
-        if (parent instanceof OMElementImpl){
+    public void init(OMElement parent) {
+        if (parent != null && parent.getType() == OMNode.ELEMENT_NODE){
             this.parent = (OMElementImpl) parent;
         }
     }
@@ -207,5 +208,9 @@
     public void serialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException {
         serialize(writer,cache,null);
     }
+	public void free(){
+		OMFactory.newInstance().free(this);
+		nextSibling.free();
+	}
 
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java Tue Feb  1 04:08:11 2005
@@ -25,15 +25,17 @@
 public class OMTextImpl extends OMNodeImpl implements OMText, OMConstants {
 
     protected short textType = TEXT_NODE;
+    
+	public OMTextImpl(){}
+    
 
-    public OMTextImpl(OMElement parent, String text) {
-        super(parent);
+    public void init(OMElement parent, String text) {
+        super.init(parent);
         setValue(text);
         done = true;
     }
 
-    public OMTextImpl(String s) {
-        super();
+    public void init(String s) {
         setValue(s);
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPBodyImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPBodyImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPBodyImpl.java Tue Feb  1 04:08:11 2005
@@ -30,13 +30,13 @@
      * @param envelope
      */
     public SOAPBodyImpl(SOAPEnvelope envelope) {
-        super(envelope);
+        super.init(envelope);
         this.ns = envelope.getNamespace();
         this.localName = OMConstants.BODY_LOCAL_NAME;
     }
 
     public SOAPBodyImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        super(localName, ns, parent, builder);
+        super.init(localName, ns, parent, builder);
     }
 
     /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java Tue Feb  1 04:08:11 2005
@@ -27,18 +27,18 @@
      * @param builder
      */
     public SOAPEnvelopeImpl(OMXMLParserWrapper builder) {
-        super(SOAPENVELOPE_LOCAL_NAME, null, null, builder);
+        super.init(SOAPENVELOPE_LOCAL_NAME, null, null, builder);
     }
 
     public SOAPEnvelopeImpl(OMNamespace ns, OMXMLParserWrapper builder) {
-        super(SOAPENVELOPE_LOCAL_NAME, ns, null, builder);
+        super.init(SOAPENVELOPE_LOCAL_NAME, ns, null, builder);
     }
 
     /**
      * @param ns
      */
     public SOAPEnvelopeImpl(OMNamespace ns) {
-        super(SOAPENVELOPE_LOCAL_NAME, ns);
+        super.init(SOAPENVELOPE_LOCAL_NAME, ns);
     }
 
         /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPFaultImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPFaultImpl.java Tue Feb  1 04:08:11 2005
@@ -30,22 +30,17 @@
     private Exception e;
 
     public SOAPFaultImpl(OMElement parent, Exception e) {
-        super(parent);
+        super.init(SOAPFAULT_LOCAL_NAME,
+        	new OMNamespaceImpl(SOAPFAULT_NAMESPACE_URI, SOAPFAULT_NAMESPACE_PREFIX));
+		this.parent = (OMElementImpl)parent;       
         this.e = e;
         StringWriter sw = new StringWriter();
         e.printStackTrace(new PrintWriter(sw));
         this.addChild(OMFactory.newInstance().createText(this, sw.getBuffer().toString()));
-        localName = SOAPFAULT_LOCAL_NAME;
-        setNamespace(new OMNamespaceImpl(SOAPFAULT_NAMESPACE_URI, SOAPFAULT_NAMESPACE_PREFIX));
     }
 
-//    public SOAPFaultImpl(OMElement parent) {
-//        super(parent);
-//
-//    }
-
     public SOAPFaultImpl(OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        super(SOAPFAULT_LOCAL_NAME, ns, parent, builder);
+        super.init(SOAPFAULT_LOCAL_NAME, ns, parent, builder);
     }
 
     public void setFaultCode(QName faultCode) throws OMException {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderBlockImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderBlockImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderBlockImpl.java Tue Feb  1 04:08:11 2005
@@ -27,11 +27,11 @@
      * @param ns
      */
     public SOAPHeaderBlockImpl(String localName, OMNamespace ns) {
-        super(localName, ns);
+        super.init(localName, ns);
     }
 
     public SOAPHeaderBlockImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        super(localName, ns, parent, builder);
+        super.init(localName, ns, parent, builder);
     }
 
     /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderImpl.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPHeaderImpl.java Tue Feb  1 04:08:11 2005
@@ -29,7 +29,7 @@
      * @param envelope
      */
     public SOAPHeaderImpl(SOAPEnvelope envelope) {
-        super(envelope);
+        super.init(envelope);
         //set the namespaces
         this.ns = envelope.getNamespace();
         this.localName = OMConstants.HEADER_LOCAL_NAME;
@@ -37,7 +37,7 @@
     }
 
     public SOAPHeaderImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        super(localName, ns, parent, builder);
+        super.init(localName, ns, parent, builder);
     }
 
     /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXBuilder.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXBuilder.java Tue Feb  1 04:08:11 2005
@@ -1,13 +1,18 @@
 package org.apache.axis.impl.llom.builder;
 
-import org.apache.axis.impl.llom.OMElementImpl;
-import org.apache.axis.impl.llom.OMNodeImpl;
-import org.apache.axis.impl.llom.OMTextImpl;
-import org.apache.axis.om.*;
-
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamReader;
 
+import org.apache.axis.impl.llom.OMElementImpl;
+import org.apache.axis.impl.llom.OMNodeImpl;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMXMLParserWrapper;
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -32,6 +37,7 @@
 
     protected OMFactory ombuilderFactory;
     protected XMLStreamReader parser;
+    protected OMFactory omfactory;
 
     protected OMNode lastNode;
 //returns the state of completion
@@ -47,10 +53,12 @@
     protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
         this.ombuilderFactory = ombuilderFactory;
         this.parser = parser;
+        omfactory = OMFactory.newInstance();
     }
 
     protected StAXBuilder(XMLStreamReader parser) {
         this(OMFactory.newInstance(), parser);
+		omfactory = OMFactory.newInstance();
     }
 
     public void setOmbuilderFactory(OMFactory ombuilderFactory) {
@@ -79,14 +87,14 @@
     protected OMNode createOMText() throws OMException {
         if (lastNode == null)
             throw new OMException();
-        OMNodeImpl node;
+        OMNode node;
         if (lastNode.isComplete()) {
-            node = new OMTextImpl(lastNode.getParent(), parser.getText());
+            node = omfactory.createText(lastNode.getParent(), parser.getText());
             lastNode.setNextSibling(node);
             node.setPreviousSibling(lastNode);
         } else {
             OMElementImpl e = (OMElementImpl) lastNode;
-            node = new OMTextImpl(e, parser.getText());
+            node = omfactory.createText(e, parser.getText());
             e.setFirstChild(node);
         }
         return node;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXOMBuilder.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXOMBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXOMBuilder.java Tue Feb  1 04:08:11 2005
@@ -30,15 +30,18 @@
  */
 public class StAXOMBuilder extends StAXBuilder implements OMXMLParserWrapper {
     protected OMDocument document;
+    protected OMFactory omFactory;
 
     public StAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
         super(ombuilderFactory, parser);
         document = new OMDocument(this);
+		omfactory = OMFactory.newInstance();
     }
 
     public StAXOMBuilder(XMLStreamReader parser) {
         super(parser);
         document = new OMDocument(this);
+		omfactory = OMFactory.newInstance();
     }
 
     protected OMNode createOMElement() throws OMException {
@@ -46,15 +49,15 @@
         String elementName = parser.getLocalName();
 
         if (lastNode == null) {
-            node = new OMElementImpl(elementName, null, null, this);
+            node = omfactory.createOMElement(elementName, null, null, this);
             document.setRootElement(node);
         } else if (lastNode.isComplete()) {
-            node = new OMElementImpl(elementName, null, lastNode.getParent(), this);
+            node = omfactory.createOMElement(elementName, null, lastNode.getParent(), this);
             lastNode.setNextSibling(node);
             node.setPreviousSibling(lastNode);
         } else {
             OMElement e = (OMElement) lastNode;
-            node = new OMElementImpl(elementName, null, (OMElement) lastNode, this);
+            node = omfactory.createOMElement(elementName, null, (OMElement) lastNode, this);
             e.setFirstChild(node);
         }
 
@@ -122,7 +125,6 @@
         } catch (OMException e) {
             throw e;
         } catch (Exception e) {
-            e.printStackTrace();
             throw new OMException(e);
         }
     }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java Tue Feb  1 04:08:11 2005
@@ -180,7 +180,6 @@
         } catch (OMException e) {
             throw e;
         } catch (Exception e) {
-            e.printStackTrace();
             throw new OMException(e);
         }
     }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java Tue Feb  1 04:08:11 2005
@@ -1,7 +1,30 @@
 package org.apache.axis.impl.llom.factory;
 
-import org.apache.axis.impl.llom.*;
-import org.apache.axis.om.*;
+import java.util.Stack;
+
+import org.apache.axis.impl.llom.OMElementImpl;
+import org.apache.axis.impl.llom.OMNamedNodeImpl;
+import org.apache.axis.impl.llom.OMNamespaceImpl;
+import org.apache.axis.impl.llom.OMNodeImpl;
+import org.apache.axis.impl.llom.OMTextImpl;
+import org.apache.axis.impl.llom.SOAPBodyImpl;
+import org.apache.axis.impl.llom.SOAPEnvelopeImpl;
+import org.apache.axis.impl.llom.SOAPFaultImpl;
+import org.apache.axis.impl.llom.SOAPHeaderBlockImpl;
+import org.apache.axis.impl.llom.SOAPHeaderImpl;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamedNode;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.SOAPFault;
+import org.apache.axis.om.SOAPHeader;
+import org.apache.axis.om.SOAPHeaderBlock;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -20,48 +43,73 @@
  * <p/>
  */
 public class OMLinkedListImplFactory extends OMFactory {
+	private Stack elements = new Stack();
+	private Stack textNodes = new Stack();
+	
+	public void free(OMNode node){
+		int type = node.getType();
+		switch(type){
+			case OMNode.ELEMENT_NODE:
+			elements.push(node);
+			case OMNode.TEXT_NODE:
+			textNodes.push(node);
+			default:
+			//NOOP;
+			
+		}
+	}
 
 
-//    public OMElement createOMElement(OMElement parent, OutObject object) {
-//        ObjectToOMBuilder objectToOMBuilder = new ObjectToOMBuilder(parent, object);
-//        createOMElement(null, null, parent, objectToOMBuilder);
-//        return parent;
-//    }
-
-    public OMElement createOMElement(OMElement parent) {
-        return new OMElementImpl(parent);
-    }
-
     public OMElement createOMElement(String localName, OMNamespace ns) {
-        return new OMElementImpl(localName, ns);
+		OMElementImpl element = null;
+		if(elements.isEmpty()){
+			element = new OMElementImpl();
+		}
+		element.init(localName, ns);
+		return element;
     }
 
     public OMElement createOMElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        return new OMElementImpl(localName, ns, parent, builder);
-    }
-
-    public OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent) {
-        return new OMNamedNodeImpl(localName, ns, parent);
+    	OMElementImpl element = null;
+    	if(elements.isEmpty()){
+    		element = new OMElementImpl();
+    	}
+        element.init(localName, ns, parent, builder);
+        return element;
     }
 
-    public OMNamedNode createOMNamedNode(OMElement parent) {
-        return new OMNamedNodeImpl(parent);
-    }
+//    public OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent) {
+//        return new OMNamedNodeImpl(localName, ns, parent);
+//    }
+//
+//    public OMNamedNode createOMNamedNode(OMElement parent) {
+//        return new OMNamedNodeImpl(parent);
+//    }
 
     public OMNamespace createOMNamespace(String uri, String prefix) {
         return new OMNamespaceImpl(uri, prefix);
     }
 
-    public OMNode createOMNode(OMElement parent) {
-        return new OMNodeImpl(parent);
-    }
+//    public OMNode createOMNode(OMElement parent) {
+//        return new OMNodeImpl(parent);
+//    }
 
     public OMText createText(OMElement parent, String text) {
-        return new OMTextImpl(parent, text);
+		OMTextImpl textNode = null;
+		if(textNodes.isEmpty()){
+			textNode = new OMTextImpl();
+		}
+		textNode.init(parent, text);
+		return textNode;
     }
 
     public OMText createText(String s) {
-        return new OMTextImpl(s);
+		OMTextImpl textNode = null;
+		if(textNodes.isEmpty()){
+			textNode = new OMTextImpl();
+		}
+		textNode.init(s);
+		return textNode;
     }
 
     public SOAPBody createSOAPBody(SOAPEnvelope envelope) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java Tue Feb  1 04:08:11 2005
@@ -144,8 +144,7 @@
             try {
                 Thread.sleep(9000);
             } catch (InterruptedException e1) {
-                // TODO Auto-generated catch block
-                e1.printStackTrace();
+				throw new AxisFault("Thread interuptted",e1);
             }
             this.engine = new AxisEngine(er);
         } catch (PhaseException e) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java Tue Feb  1 04:08:11 2005
@@ -19,21 +19,7 @@
  * This will help to create OM API object. This will ease the switching from one OM impl to another.
  */
 public abstract class OMFactory {
-
-    //    /**
-//     * @param parent
-//     * @param object
-//     * This is used to construct the elements from an Object
-//     * @return the parent itself
-//     */
-//   public abstract OMElement createOMElement(OMElement parent,Object object);
-
-    /**
-     * @param parent
-     * @return
-     */
-    public abstract OMElement createOMElement(OMElement parent);
-
+	public abstract void free(OMNode node);
     /**
      * @param localName
      * @param ns
@@ -57,18 +43,18 @@
      * @param parent
      * @return
      */
-    public abstract OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent);
+   /// public abstract OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent);
 
-    /**
-     * @param parent
-     * @return
-     */
-    public abstract OMNamedNode createOMNamedNode(OMElement parent);
+//    /**
+//     * @param parent
+//     * @return
+//     */
+//    public abstract OMNamedNode createOMNamedNode(OMElement parent);
 
     public abstract OMNamespace createOMNamespace(String uri, String prefix);
 
 
-    public abstract OMNode createOMNode(OMElement parent);
+//    public abstract OMNode createOMNode(OMElement parent);
 
     /**
      * @param parent

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMNode.java?view=diff&r1=149388&r2=149389
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMNode.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMNode.java Tue Feb  1 04:08:11 2005
@@ -157,5 +157,5 @@
      * @throws XMLStreamException
      */
     public void serialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException ;
-
+    public void free();
 }