use of org.apache.cxf.transport.http.HTTPSession in project cxf by apache.
the class JAXWSHttpSpiDestination method serviceRequest.
protected void serviceRequest(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Service http request on thread: " + Thread.currentThread());
}
Message inMessage = new MessageImpl();
ExchangeImpl exchange = new ExchangeImpl();
exchange.setInMessage(inMessage);
setupMessage(inMessage, null, req.getServletContext(), req, resp);
((MessageImpl) inMessage).setDestination(this);
exchange.setSession(new HTTPSession(req));
try {
incomingObserver.onMessage(inMessage);
resp.flushBuffer();
} catch (SuspendedInvocationException ex) {
if (ex.getRuntimeException() != null) {
throw ex.getRuntimeException();
}
// else nothing to do
} catch (Fault ex) {
Throwable cause = ex.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
}
throw ex;
} catch (RuntimeException ex) {
throw ex;
} finally {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Finished servicing http request on thread: " + Thread.currentThread());
}
}
}
Aggregations