title: Question about Request and Session with CXF, JAX-RS webservice
body: <p>I have a webservice set up using CXF, JAX-RS and Spring. I have the following method:</p>
  
  <pre><code>@GET
  @Path("/getPayload")
  @Produces("application/XML")
  public Response makePayload(){
      Payload payload = new Payload();
      payload.setUsersOnline(new Long(200));
  
      return Response.ok().entity(payload).build();
  }
  </code></pre>
  
  <p>How can I get access to the <code>HttpRequest</code> object in my <code>makePayload()</code>?</p>
  
  <p>Will a call to this method generate a Session, and if so, can I get a handle to it and  will that session be persistent for all subsequent requests from the same client?</p>