Hi

SyncopeClient.getService appears to be a construction call and as such it is not expected to be thread-safe. Though I guess it can be made thread-safe if preferred but that would likely imply passing the user name and password to getService() method too to avoid having cached CXF client factory beans. The actual CXF proxies (ResourceService, etc) can be made thread safe too by having a thread safe flag set on them:

http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-ThreadSafety

HTH, Sergey

On 11/02/15 11:15, Nicola Baiocco wrote:
Hi all,

we have some problem with multiple cxf calls to Syncope core, seems that
some concurrent problem breaks syncope client calls.

Here a part of the stack trace error:

java.lang.RuntimeException: java.util.ConcurrentModificationException

                 at
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWithValues(JAXRSClientFactoryBean.java:341)
~[cxf-rt-rs-client-3.0.2.jar:3.0.2]

                 at
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.create(JAXRSClientFactoryBean.java:264)
~[cxf-rt-rs-client-3.0.2.jar:3.0.2]

                 at
org.apache.syncope.client.rest.RestClientFactoryBean.createServiceInstance(RestClientFactoryBean.java:63)
~[syncope-client-1.2.1.jar:na]

                 at
org.apache.syncope.client.SyncopeClient.getService(SyncopeClient.java:95) 
~[syncope-client-1.2.1.jar:na]

We’ve done a unit test to reproduce the problem, you can find it here
(not the real unit test but an adaptable example):

http://apaste.info/iDr

Hope this will help to have major details.

Kind regards.

http://www.intesys.it/firme/logo_intesys.jpg

*Nicola Baiocco**| Software Developer*

Intesys - Via Roveggia 122 A - 37136 Verona
Tel. 045 503663 | Fax 045 503604
[email protected]
www.intesys.it <http://www.intesys.it>

Great Place to Work
<http://www.intesys.it/Partecipazione-dei-dipendenti/>Sito a impatto
zero <http://www.intesys.it/Sostenibilita-Ambientale/>

/Le informazioni contenute nella presente e-mail e nei suoi allegati
potrebbero essere confidenziali/riservate e sono dirette unicamente ai
destinatari sopra indicati. In caso di ricezione da parte di persona
diversa è vietato qualunque tipo di divulgazione o copia anche parziale.
Chi riceva questo messaggio per errore è pregato di inoltrarlo al
mittente e di cancellare questa e-mail. /

/This e-mail and its attachments may contain confidential/reserved
information and is intended only for the use of the address(es) named
above. If the reader of this message is not the intended recipient of
this message, please note that distribution or copying of this
communication is forbidden. Anyone who receives this communication in
error should return it immediately to the sender and delete the message. /


Reply via email to