dev@jax-ws.java.net

RE: Thread safety of web service objects/proxies/ports

From: Nick Wilson <nickwi_at_yahoo.com>
Date: Tue, 8 Dec 2009 14:23:31 +0000

David,

After doing some performance testing ourselves we settled on caching the service and getting a new port for each call. It performs well and is fine with multiple threads. Caching the port caused problems.
Regards,

Nick


-----Original Message-----
From: David Balažic <xerces9_at_gmail.com>
Sent: 08 December 2009 13:25
To: dev_at_jax-ws.dev.java.net
Subject: Thread safety of web service objects/proxies/ports

(I'm trying my luck here as I got no reply on the users list)

Hi!

I googled and found this:
http://forums.java.net/jive/thread.jspa?messageID=328373

quote: "We need to know whether the service objects generated by
wsimport (JAX-WS RI 2.0.1 and later versions), as well as the port
objects returned by the getPort() methods of those service objects are
thread-safe."

So is there a definitive answer?

I am doing a cleanup in our project and want to know:
 - can I reuse the same proxy object returned by a single getPort()
call in multiple threads?
or
- can I at least call the getPortName() method javax.xml.ws.Service
child from mulriple threads?

We use tomcat 6.0.20 and jaxws-api-2.1.jar  jaxws-rt-2.1.4.jar
jaxws-tools-2.1.5.jar

Regards,
David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net