Sanjiva,

sorry, I don't know if you missed my answer , but you letter , and other two
answers to you is available in the list.
Please see my answer
http://marc.theaimsgroup.com/?l=soap-dev&m=103582951732270&w=2

Thinking more about a solution which could work safely. I found that it will
be realtively simple to add a reusable pool of DocumentBuilders inside
XMLParserUtils, adds method like getXMLDocBuilderFromPool(),
releaseXMLDocBuilder(), and change the code were DocBuilder requested in the
SOAP llib to use new methods. Method getXMLDocBuilder() could be ramained
unchanged  if somebody used it for some purposes in own application

Thanks,
Pavel


> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:sanjiva@;watson.ibm.com]
> Sent: Tuesday, October 29, 2002 2:36 PM
> To: Apache SOAP
> Subject: Fw: cvs commit: xml-soap/java/src/org/apache/soap/util/xml
> XMLParserUtils.java
> 
> 
> I sent this to soap-dev earlier but didn't see it appearing. Sorry
> if its a re-post.
> 
> Sanjiva.
> 
> ----- Original Message -----
> From: "Sanjiva Weerawarana" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 29, 2002 12:10 AM
> Subject: Re: cvs commit: xml-soap/java/src/org/apache/soap/util/xml
> XMLParserUtils.java
> 
> 
> > Hi Pavel,
> >
> > > What if threads are not reused constantly, but once 
> finished processing
> > > something just discarded? In this case hashmap will 
> prevent both thread
> > and
> > > document builder from be removed by GC.
> >
> > Yes, that would be the case with this approach. The better way
> > would be to use thread local storage .. I just talked to 
> Bill Nagy and
> > he said he would look into committing a patch to change this part.
> > (He's familiar with thread local storage and I'm not.)
> >
> > > Another question, what if Call created in one thread, but 
> then reused in
> > > other threads (I myself thought about having pool of Call 
> objects) - in
> > this
> > > case the login of getting DocumentBuilder by current 
> thread will likely
> > > produce errors, which very difficult to debug.
> >
> > No that should work fine. There will not be any relevant 
> state inside
> > the doc builder - so I believe the 2nd thread will just pick up a
> > different doc builder and life will go aon jus fine.
> >
> > Bye,
> >
> > Sanjiva.
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>

Reply via email to