cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Client endpoints in servlet sessions & clustering
Date Mon, 14 Dec 2009 16:51:31 GMT
On Tue December 8 2009 9:31:27 am Alexandros Karypidis wrote:
> Hi,
> I intend to use JAX-WS to access web services from within servlets in a
> clustered environment.
> Rather than create a proxy for each servlet invocation, I'd like to
> cache the client stub in the session object.
> Does CXF use serializable objects when creating JAX-WS proxies?

Probably not, no.  Very little in CXF implements serializable so that may end 
up being an issue.    Plus, the clients hold onto things like shared wsdl 
models and JAXBContexts and such that could be huge to serialized

> Is it
> safe to put a JAX-WS client stub in the servlet's "session" object?

You MAY be able to use proxy singletons.   See:
about the thread safety and such of the proxies.    You could just store and 
special "keys" for the RequestContext into the session and just use a single 
client proxy with a threadsafe RequestContext.  

Daniel Kulp

View raw message