ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Ausianik <Pavel_Ausia...@epam.com>
Subject RE: about sharing doc builders
Date Mon, 11 Nov 2002 14:57:17 GMT
Sanjiva,

Please let me know if you agree to accept my patch, other changes depends on
this.

Thanks,
Pavel

> -----Original Message-----
> From: Pavel Ausianik [mailto:Pavel_Ausianik@epam.com]
> Sent: Wednesday, October 30, 2002 4:36 PM
> To: 'soap-dev@xml.apache.org'
> Subject: RE: about sharing doc builders
> 
> 
> Sanjiva
> 
> see my comments inside. Agree that solution for storing in 
> thread assosiated
> storage could work if used alone, the main problem actually that
> DocumentBuilder is not being used only from thread, but also 
> stored in the
> Call, Message, ServiceManager, XMLConfigManager , etc.
> 
> > Here's the setup:
> >     Thread t1, t2;
> >     PoolOfCalls pool = new PoolOfCalls ();
> > 
> > Thread t1 runs the following code and completes it:
> >     Call c = pool.getCall (); // gets call object c1
> >     c.<xyz> (...);  
> 
> XMLParserUtils.getXMLDocBuilder();  // Look at the Document builder
> assosiated with t1 - since we do not have it, create db1
> 
> >     pool.releaseCall (c);
> > 
> > Now comes thread t2 and it does the following:
> >     Call c = pool.getCall (); // again gets call object c1
> >     c.<xyz> (...);
> >     // still running stuff
> 
>  DocumentBuider db1  has been stored in local var xdb in c1, 
> and can still
> parse envelope
> 
> > 
> > Now thread t1 comes back with the following:
> >     Call c = pool.getCall (); // get a new call object c2
> >     // however, because the doc builder db1  is associated with the
> >     // thread t1, it will be reused, and saved to c2.xdb
> 
>  db1 used to parse envelope while not finishing parsing in t2
> 
> 
> Best regards,
> Pavel
> 
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>
> 

Mime
View raw message