Cyrille,

I checked the generated code and I could not find any reference to
either HTTPSender or CommonsHTTPSender. I could not find anywhere in my
code where I use them. Where should I check for that? 

Laheeb Alsarraf
Contractor, AC Technologies
E-mail:  [EMAIL PROTECTED]
Office:  301.451.1783

-----Original Message-----
From: Cyrille Le Clerc [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 30, 2006 1:06 PM
To: [email protected]
Subject: Re: Generated code not Thread safe

   Hello Laheeb,

   Could you generate a thread dump ? I searched for "synchronized"
blocks or other tricks in the source code (1.3) and did not find
anything.

   By the way, do you use HTTPSender or CommonsHTTPSender ?

   Cyrille

--
Cyrille Le Clerc
[EMAIL PROTECTED]
[EMAIL PROTECTED]

On 1/30/06, Alsarraf, Laheeb (NIH/OD) [C] <[EMAIL PROTECTED]> wrote:
> Neil,
>
> I checked out the discussion thread and I do use a new Stub object but
> the generated code still hangs unless I use Synchronize around my
call.
> Here is the run() method I use in my test class which extends Thread.
>
>   public void run(){
>         System.out.println("Starting Thread:" + threadName);
>         try{
>             EUtilsServiceLocator eUtilService = new
> EUtilsServiceLocator();
>             EUtilsServiceSoap utils =
> eUtilService.geteUtilsServiceSoap();
>
>             ESummaryRequest params = new ESummaryRequest();
>             params.setDb("pubmed");
>             params.setId(pubMedId);
>             Date startTimeEsum_ = new Date();
>                         System.out.println("Thread:" + threadName + ".
"
>                             + "Calling utils.run_eSummary
> ====================");
>
> // When I use this line as is then the code hangs.
>             ESummaryResult eSummaryRes = utils.run_eSummary(params);
>
> /* When I replace the above code line with this commented code then
the
> client returns successfully.
>
>   ObjectLock obj = ObjectLock.getInstance();
>   synchronized(obj) {
>     ESummaryResult eSummaryRes = utils.run_eSummary(params);
>   }
> */
>
>         }catch(Exception e){
>             System.out.println("Exception in Thread:" + threadName +
> "\n" + e);
>             stop();
>         }
>     }// End run()
>
>
>
> Thanks
> Laheeb Alsarraf
>
>
> -----Original Message-----
> From: Ferguson, Neil, VF-NZ [mailto:[EMAIL PROTECTED]
> Sent: Sunday, January 29, 2006 7:17 PM
> To: [email protected]
> Subject: RE: Generated code not Thread safe
>
> Hi.
>
> You might find this recent discussion on this mailing helpful:
> http://marc.theaimsgroup.com/?l=axis-user&m=113771126214607&w=2
>
> Basically, the generated stub doesn't seem to be thread-safe, but it
> doesn't seem to be very expensive to create a new stub each time you
> want one. The service locator does seem to be thread-safe (and is
> relatively expensive to create), so you can cache this.
>
> Hope this helps.
>
> Neil.
>
>
> -----Original Message-----
> From: Alsarraf, Laheeb (NIH/OD) [C] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 28 January 2006 8:51 a.m.
> To: [email protected]
> Subject: Generated code not Thread safe
>
>
> Hello,
>
> I have used axis 1.1.2 and axis 1.1.3 to generate client code for a
web
> service. I tested the generated code for multithreading and the
program
> deadlocks. I added "Synchronized" keyword in the method createCall()
of
> the generated code and that solved the problem.
>
> Has anyone had thread safety problems with web service client code
> generated using axis.
>
> Here is the command I use to generate the code:
>
> java -cp %AXISCP% org.apache.axis.wsdl.WSDL2Java --timeout -1 %*
>
>
> Thanks
>
> Laheeb Alsarraf
>
>
------------------------------------------------------------------------
> -----------------------
>
> Have you seen our website?.... http://www.vodafone.co.nz
>
> Manage Your Account, check your Vodafone Mail and send web2TXT online:
> http://www.vodafone.co.nz/myvodafone
>
> CAUTION: This correspondence is confidential and intended for the
named
> recipient(s) only.
> If you are not the named recipient and receive this correspondence in
> error, you must not copy,
> distribute or take any action in reliance on it and you should delete
it
> from your system and
> notify the sender immediately.  Thank you.
>
> Unless otherwise stated, any views or opinions expressed are solely
> those of the author and do
> not represent those of Vodafone New Zealand Limited.
>
> Vodafone New Zealand Limited
> 20 Viaduct Harbour Avenue, Private Bag 92161, Auckland 1030
> Telephone + 64 9 355 2000
> Facsimile + 64 9 355 2001
>

Reply via email to