My gut reaction is that this is not supposed to work. Synchronization
has overhead. If we put a synchronized(this) around the body of the
invocations, the single-threaded users pay the price and they don't
need it. If you do it, it's three lines of code and all is well.
However, I'm not the expert here in the JAX-WS standard to which we
strive to conform, so I'm somewhat waiting for word from Dan.

On Wed, Mar 11, 2009 at 10:43 AM, Cornel Masson
<[email protected]> wrote:
> Yes.....
>
>
>
> Benson Margulies wrote:
>>
>> And you are using that client object, unprotected by a syncronization,
>> in multiple threads?
>>
>>
>>
>> On Wed, Mar 11, 2009 at 10:32 AM, Cornel Masson
>> <[email protected]> wrote:
>>
>>>
>>> My final solution uses the CXF Client (org.apache.cxf.endpoint.Client)
>>> directly, constructed using the JaxWs Spring factory bean.
>>>
>>> <bean id="cxfClientFactory"
>>> class="org.apache.cxf.jaxws.JaxWsClientFactoryBean" scope="prototype">
>>>  <property name="serviceClass"
>>> value="com.shazam.internal.recognition.webservices.v1.SIFoRInterface"/>
>>> </bean>
>>>
>>> Code:
>>>
>>>  //"cxfClientFactory" injected via Spring, then...
>>>  cxfClientFactory.setAddress(url);
>>>  Client client = cxfClientFactory.create();
>>>
>>> and used:
>>>
>>>  Object[] results = client.invoke(aMethodName, aRequest);
>>>
>>>
>>> That's it.
>>>
>>> -Cornel
>>>
>>>
>>>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>

Reply via email to