On Friday 15 October 2010 8:24:58 am Benson Margulies wrote:
> Dan,
> 
> I'm a bit puzzled here.
> 
> The SessionFactory gets the session from the Exchange. 

Right.

 
> For an endpoint deployed by API, the only call I can find that
> establishes the session is in
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Ser
> vletContext, HttpServletRequest, HttpServletResponse). That makes a new
> session every time.

It makes a new HTTPSession which wrappers the HttpServletRequest.   It doesn't 
actually call into the HttpServletRequest.getSession call until you actually 
try to query something out of it. 
org.apache.cxf.transport.http.HTTPSession

> If I needed some concept of sessions persisting across multiple calls,
> what would I do?

Well, you can get the HTTPServletRequest from the context (there is a standard 
JAX-WS property for that) and use the session directly.  You can grab the 
current message from PhaseInterceptorChain.getCurrentMessage and grab the 
exchange and the session from that.   Etc.....

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to