Hi

On 30/01/12 10:24, Guy Pardon wrote:
Hi,

The JAXRS spec says that a new Resource object should be created for each 
request - is this the case in CXF?

 From what I understood, this is not what happens?

If you use singleton resource classes then indeed a single instance is shared. The injected JAX-RS context instances are thread-safe though, but the custom state would need to be protected assuming it;s modified after the initialization.

If you need a per-request resource creation then check this section please:

http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-Lifecyclemanagement

HTH, Sergey



Guy

Reply via email to