Are you sure you simulated a real world scenario? We faced issues at a customer site where multi cpu boxes were being used on high load. Random errors were being generated especially from the TypeMapping classes that are used by the stubs. The problem was that although we were using a new instance of the stub for each thread, but the stubs were sharing the same instance of EngineConfigurationFactory.
If you look at the big picture, the cost of stub creation should not be significant. Shantanu --- [EMAIL PROTECTED] wrote: > > Hello Tim, > > Thanks for the response. I was trying to simulate > multiple thread call > same method with different parameters to a single > stub object. Did not see > any loss of Data and Thread locks. What I read was > the setting of > properties like session time out's etc may not be > thread safe. > > The intersting question is what kind of performance > gain can you expect by > having a single Stub Object. The stub object seems > to be a fairly > significant object in size. I need to calculate it's > foot print , to be > sure though. > > Thanks and Regards, > > Gary Grewal > > > > > > > > "Tim K. (Gmane)" > > > <[EMAIL PROTECTED] To: > [email protected] > > net> cc: > > > Sent by: news > Subject: Re: Generated Stubs and Thread Safe > > <[EMAIL PROTECTED] > > > rg> > > > > > > > > > 04/06/2005 09:00 > > > PM > > > Please respond to > > > axis-user > > > > > > > > > > > > > I asked the same question a while back and I was > told that the Stub and > the Call are not thread safe, but they can be > re-used from the same thread. > > I'm not sure about the ServiceLocator, but if you > want to maintain > multiple sessions for example, you need one instance > of ServiceLocator > per session because the instance has an instance of > the HTTP transport > object which holds the session cookie (if the > session tracking is done > via cookies). > > I'm not sure what happens if you use the same > ServiceLocator from > multiple threads and get 2 or more Stub or Call > instances and make > concurrent requests, you may end up blocking some > threads because of > possible synchronization at the HTTP transport > object. > > I think the safe thing to do is have a > ServiceLocator per thread and get > the Stub/Call from that. > > This is definitely a topic that would be worth > putting in the wiki, so > if someone who has the final answer could comment on > it ... > > Tim > > [EMAIL PROTECTED] wrote: > > Hello, > > > > Are the generated stubs thread safe . Is > > > > 1. From invoke call stand point > > 2. From setting the properties > > > > Is it advisable to Re-Use the same stub Object we > need to create a new > one > > , per Thread, per Request.] > > > > Thanks and Regards, > > > > Gary Grewal > > > > > > > > This communication is for informational purposes > only. It is not intended > > as an offer or solicitation for the purchase or > sale of any financial > > instrument or as an official confirmation of any > transaction. All market > prices, > > data and other information are not warranted as to > completeness or > accuracy and > > are subject to change without notice. Any comments > or statements made > herein > > do not necessarily reflect those of JPMorgan Chase > & Co., its > subsidiaries > > and affiliates > > > > > > > > > > This communication is for informational purposes > only. It is not intended > as an offer or solicitation for the purchase or sale > of any financial > instrument or as an official confirmation of any > transaction. All market prices, > data and other information are not warranted as to > completeness or accuracy and > are subject to change without notice. Any comments > or statements made herein > do not necessarily reflect those of JPMorgan Chase & > Co., its subsidiaries > and affiliates > >
