Yes , CXF do not share the http conduit between the different client proxy.
If you want to share the session between the client proxy, I am afraid
you need to hack the CXF http conduit code to handle the cookie in you
application code.
Willem.
Chris Campbell wrote:
The problem is that I get a different session for different
endpoints, maybe its how I set the client up? I do set the client up
in java code rather than with xml config, so maybe I am doing
something wrong there. Is it possible that each service interface is
getting a different http-conduit?
Daniel Kulp wrote:
On Friday 01 February 2008, Chris Campbell wrote:
I am using CXFServlet in tomcat, and intend to load balance
instances of them with apache mod_jk, and want to use sticky sessions.
I figure I have to create a session somewhere, as I do not see a
session created (JSESSIONID ?) automatically. For reasons not worth
going into, I do not need the session for state, beyond making sure
that the sticky-ness works on the load-balancer.
I have tried getting the HttpServletRequest in an interceptor
(USER_LOGICAL phase) and creating an HttpSession if there is none,
and it seems to work.
The problem is that I have a few soap endpoints at different URLs,
and the session seems to be created for each endpoint, so calls to
Service /Foo gets on session and /Bar another. This causes my sticky
session load balancer to send /Foo to one of the load balanced
CXFServlet and /Bar to another .
Is there some way to create the Session so that it is valid for all
the service endpoints? Is setting the Session in an interceptor a
bad idea?
That should be completely fine assuming that works with tomcat. This
really is a tomcat question which I don't really know much about. I
would assume if all the endpoints are on the CXFServlet instance they
would have properly shared the session. If they are in separate wars,
maybe not. I don't know know enough about the servlet spec to know
what the rules are around that.