cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: @ThreadScope equivalent in CXF?
Date Fri, 17 Sep 2010 15:49:09 GMT
On Friday 17 September 2010 10:14:30 am Christian Lindell wrote:
> Hi!
> Is there any equivalent of the JAX-WS RI @ThreadScope in CXF?
> Description:
> I need it in my service (not client) for allowing thread safe access and
> reuse of connections so it's more or less the same use-case described on
> that webpage. How can I achieve this?

There are two options:

1) Use the spring scopes and aop-proxy - this is generally what I recommend 
for normal scoping things such as per-request and session scopes as Spring has 
them built in.   Unfortunately, there isn't a "thread" scope built into spring 
2.x (looks like it's added to Spring 3.x). However, there are some blogs/docs 
for adding it:

2) The cxf jaxws:endpoint/server config things have an invoker config element 
that can be used to specify a custom invoker.   You can either subclass the 
JAXWSMethodInvoker that we use or provide a custom Factory to it's 
constructor.  You could use one of our factories:

as a starting point.

Daniel Kulp

View raw message