Hi Brian,

"Brian Dillon (ext. 944)" wrote:
> 
> Keith,
> 
> The threading issue, isn't really a problem since there is effectively one
> Unmarshaller created per SOAP request and there is also only one thread per
> SOAP request. 

I'm more concerned if the caching of the XMLReader will cause threading
problems for other castor users.

> However there may be several calls to Unmarshall per single
> request and this is where the gain can be got. I have tested the fix using a
> multithreaded SOAP client to make multiple request and everything was fine.
> 

understood...

> I can't see how getting the UnmarshllerHandler from the Unmarshaller would
> help me. 

Because UnmarshalHandler implements ContentHandler...

> The Handler is set on the XMLReader not the other way around so I
> don't see a way of overrinding the XMLReader in the Unmarshaller.

You don't....but you can do something like this:

UnmarshalHandler handler = myUnmarshaller.getUnmarshalHandler();
myXMLReader.setContentHandler(handler);
myXMLReader.parse(source);
Object ojb = handler.getObject();

So you can cache your own XMLReader, you don't need to modify the castor
code to get your performance gain.


> Maybe that would be and Idea for future API changes ?

My above example is already supported.

> 
> p.s. I will keep you updated with any other performance improvements I find
> and what the end result in the comparison with CORBA turns out to be.

Yes, please do, we're always interested in finding ways to improve
performance of the default configuration or providing the information on
how to tweak/configure Castor to improve performance.

Thanks,

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to