Hi Boris,
The stubs are reusable, but not reentrant - so if you're running
multiple threads you'll want to either create a new one each time
(higher overhead), cache them per thread, or synchronize around each use
(only if there's not much use, of course - in which case you're probably
better off creating a new one each time anyway).
- Dennis
On 01/20/2011 07:58 PM, Boris Klug wrote:
> Hi,
>
> I have one question regarding the handling of the generated Java
> client code.
>
> To call a web service, I use the following code:
>
> AServiceStub stub = new AServiceStub("http://....");
> response = stub.methodeToCall(paramIn);
>
> My question is: Do I have to create the stub every time when I call a
> webservice or can I create the stub only once and use it over and over
> again? If I can reuse the stub, whats about mutiple thread calling web
> services? What is the best practice?
>
> Thanks in advance for your help.
>
> Mit freundlichen Grüßen
>
> Boris Klug
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]