Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] how to set embedded Jetty web services endpoint session timeout

Hi,

I am using an embedded Jetty server (v7.5.1) only for the support of a
few JAX-WS based web services endpoints. The web services endpoints
works fine, except I could not find a way to configure the HTTP
session timeout. My test shows the server can take more than 10 min if
the request handler task runs a long time.

My code looks like this:

// config server from jetty.xml, with a SelectChannelConnector and
HandlerCollection
Server jettyServer = new Server(...);

System.setProperty("com.sun.net.httpserver.HttpServerProvider",
           "org.mortbay.jetty.j2se6.JettyHttpServerProvider");
new JettyHttpServerProvider().setServer(jettyServer);

//  publish the endpoint using JAX-WS RI
endpoint.publish(myWSUrl, wsServiceImpl);

jettyServer.start();

I want to timeout a long running handler task, not the connector
read/write timeout. Since I don't have any web app context, and no
web.xml, how to enable HTTP session timeout? Or, is there a timeout at
all?

Thanks in advance,
Julia


Back to the top