3 Replies Latest reply on Oct 21, 2009 4:17 PM by ropalka

    jbossws - DOM vs SAX

      I have just had OutOfMemoryError on the jboss-ws 2.0.3 GA. When I was watching the coredump file I saw the jboss-ws use the class org.apache.xerces.dom.DeferredDocumentImpl to build response and needed over 100MB memory to handled 23MB response.
      Can I configure jboss-ws to using sax parser?
      If not why dom was chosen.

        • 1. Re: jbossws - DOM vs SAX
          ropalka

           

          "urandom" wrote:
          Can I configure jboss-ws to using sax parser?

          No
          "urandom" wrote:
          If not why dom was chosen.

          There are many reasons:
          * we're leveraging Sun tools which are using DOM
          * SAX parser have schema validation limitations/issues
          * architecture decision (either DOM or SAX, but not both)

          • 2. Re: jbossws - DOM vs SAX

            I agree with you that dom is a better choice, on the whol you shouldn't send big data via ws.
            But, what is going to happen when somebody sends to my jboss-ws big request ? He may invoke the OutOfMemoryError and the jvm will go down.

            Can I set maximum size of request in jboss-ws or tomcat?

            • 3. Re: jbossws - DOM vs SAX
              ropalka

              JBossWS doesn't provide input stream hooks where you could check message size. Maybe tomcat can do it?