Cannot adjust jetty timeout value.

View: New views
6 Messages — Rating Filter:   Alert me  

Cannot adjust jetty timeout value.

by Colin Canfield-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
   I am trying to adjust the amount of time that Jetty keeps a session alive before timing it out. For the application I am using I want to set it to around 30 seconds (it has a custom client that polls far more often than that). I have done what I think is the correct setting but the timeout still takes around 10 minutes.

   sslConnect.setMaxIdleTime(30000);

   I am using jetty6.1.7 as an embedded web server. Any help would be greatly appreciated!

Colin


Re: Cannot adjust jetty timeout value.

by Stephen Davidson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Colin Canfield wrote:
| Hello,
|    I am trying to adjust the amount of time that Jetty keeps a session
| alive before timing it out. For the application I am using I want to set
| it to around 30 seconds (it has a custom client that polls far more
| often than that). I have done what I think is the correct setting but
| the timeout still takes around 10 minutes.
|
|    sslConnect.setMaxIdleTime(30000);
|
|    I am using jetty6.1.7 as an embedded web server. Any help would be
| greatly appreciated!
|
| Colin
|
Hi Colin.

There is a session-timeout element in webdefault.xml that you might need
to have a look at.

- -Steve

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIKt21SphIUSiVzgYRAl6vAJ9/OD98VElVEfwMO8YRG+9Esv46YACg7AZM
m73p7gEVgOVtCJVmZXtEq6Q=
=BlaG
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Cannot adjust jetty timeout value.

by FredSprint :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 sslConnect.setMaxIdleTime(30000);  is for the socket timeout not the
session.

Fred

Colin Canfield a écrit :

> Hello,
>    I am trying to adjust the amount of time that Jetty keeps a session
> alive before timing it out. For the application I am using I want to
> set it to around 30 seconds (it has a custom client that polls far
> more often than that). I have done what I think is the correct setting
> but the timeout still takes around 10 minutes.
>
>    sslConnect.setMaxIdleTime(30000);
>
>    I am using jetty6.1.7 as an embedded web server. Any help would be
> greatly appreciated!
>
> Colin
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Cannot adjust jetty timeout value.

by Colin Canfield-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am not 100%, but I think this is the equivalent of  
setMaxInactiveInterval in session manager. I have tried setting this  
but to no help, it still takes around 10 minutes to time out.

Anyone out there had more success with time outs, or know of a  
different way to set it ?

Regards, Colin


> There is a session-timeout element in webdefault.xml that you might  
> need
> to have a look at.
>
>




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Cannot adjust jetty timeout value.

by janb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Colin,

Setting session-timeout in web.xml calls setMaxInactiveInterval on the
session manager (note that the timeout in web.xml is in minutes and
the inactive interval is in seconds).

The session-timeout is set in webdefault.xml which is applied to every
web application, so if you've set maxInactiveInterval in a context.xml
file then it will be overridden by the webdefault.xml setting. Try setting
it instead in a jetty-web.xml file, which is applied to the web app AFTER
web.xml has been parsed.

cheers
Jan

Colin Canfield wrote:

> I am not 100%, but I think this is the equivalent of
> setMaxInactiveInterval in session manager. I have tried setting this but
> to no help, it still takes around 10 minutes to time out.
>
> Anyone out there had more success with time outs, or know of a different
> way to set it ?
>
> Regards, Colin
>
>
>> There is a session-timeout element in webdefault.xml that you might need
>> to have a look at.
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


--
Jan Bartel, Webtide LLC | janb@... | http://www.webtide.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Cannot adjust jetty timeout value.

by mavenj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In an app I use, a main class kicks off the jetty server.  AFTER the line server.start(), I wrote:

        Handler handler = server.getHandler();
        if(handler instanceof WebAppContext) {
            System.out.println("found wac");
            WebAppContext rctx = (WebAppContext) handler;
            rctx.getSessionHandler().getSessionManager().setMaxInactiveInterval(30); // sets to 30 sec
        }

this seems to work.

Colin Canfield-3 wrote:
I am not 100%, but I think this is the equivalent of  
setMaxInactiveInterval in session manager. I have tried setting this  
but to no help, it still takes around 10 minutes to time out.

Anyone out there had more success with time outs, or know of a  
different way to set it ?

Regards, Colin


> There is a session-timeout element in webdefault.xml that you might  
> need
> to have a look at.
>
>




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email