You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Paul Grillo <Pa...@trivininc.com> on 2005/09/12 21:29:31 UTC

client.Service and/or client.Stub threadsafe?

For client side Axis use, I'm following/using the pattern as generated
by the WSDLtoJava.

Essentially an "org.apache.axis.client.Service" is created by feeding it
a client.wsdd file.  From this service I get a
"org.apache.axis.client.Stub" by constructing one using the
aforementioned Service.

Now, from the stub, I have entrypoints for any operation I support and
execute them by constructing a call ".createCall" and invoking it,
within each of these entrypoints.  So, in essence, I am constructing a
new "Call" for each invocation, but am not recreating either the stub or
the service.

My question is - is these safe? What of these pieces are threadsafe and
reusable.

I assume, minimally, I can create one service in my application and
reuse it.  If not, I'd be recreating and reconfiguring the service with
the .wsdd file on every invocation.

Can somebody confirm this?

Can I also create a single ...client.Stub and reuse it.

I guess I can't figure out from the documentation which of these objects
are threadsafe and/or can be used sort of like factories.


Thanks for the advice/help.