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>

Reply via email to