You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Glen Daniels <gd...@macromedia.com> on 2001/04/19 01:15:18 UTC

Parsing stuff

I've got a version of the multi-thread SAX parse working, though it needs a
bit of cleanup.  It's mostly a proof-of-concept.

I'm going to see if I can make some improvements, clean it up a bit, and
post it to the list tomorrow for review.

Basically, it does exactly what we talked about.  When you create a Message
around an InputSource, it spawns a thread which parses the <envelope>
element, makes sure it looks OK, and then suspends.  When anyone asks for
something from the Message (i.e. getHeaderByName(QName)), the parsing thread
wakes up and runs until it finds the desired thing or runs out of XML
(initially this just means getting to the end of the headers).  As it goes,
it creates SOAPHeader objects, which contain records of the SAX events
inside them, suitable for replaying to any ContentHandler.  Meanwhile the
other thread (the one that made the getHeaderByName() call) blocks until the
parse is complete.

Glen Daniels
Macromedia
Engineering Manager
http://www.macromedia.com/
                                Building cool stuff for web developers


Re: Parsing stuff

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Aren't there major issues with app servers and thread management? I
thought that part of the server side programming model was that
user application components are not spsed to be creating threads ..
the app server does thread creation and mgmt.

I believe Xalan does something like this with DTM. I wonder how they
addressed this issue.

Sanjiva.

----- Original Message -----
From: "Glen Daniels" <gd...@macromedia.com>
To: <ax...@xml.apache.org>
Sent: Wednesday, April 18, 2001 7:15 PM
Subject: Parsing stuff


>
> I've got a version of the multi-thread SAX parse working, though it needs
a
> bit of cleanup.  It's mostly a proof-of-concept.
>
> I'm going to see if I can make some improvements, clean it up a bit, and
> post it to the list tomorrow for review.
>
> Basically, it does exactly what we talked about.  When you create a
Message
> around an InputSource, it spawns a thread which parses the <envelope>
> element, makes sure it looks OK, and then suspends.  When anyone asks for
> something from the Message (i.e. getHeaderByName(QName)), the parsing
thread
> wakes up and runs until it finds the desired thing or runs out of XML
> (initially this just means getting to the end of the headers).  As it
goes,
> it creates SOAPHeader objects, which contain records of the SAX events
> inside them, suitable for replaying to any ContentHandler.  Meanwhile the
> other thread (the one that made the getHeaderByName() call) blocks until
the
> parse is complete.
>
> Glen Daniels
> Macromedia
> Engineering Manager
> http://www.macromedia.com/
>                                 Building cool stuff for web developers