Discussion:
Change default session timeout interval
harry
2012-03-26 01:51:35 UTC
Permalink
Dear Tapestry community,

I am wondering what's the best practice to change default session timeout
interval. Specifically, I'd like to shorten it. The older discussions in
the mailing list seem to be either out-dated or not on point.

I have been using the ApplicationStateManager (with the default strategy of
session storage) to handle User objects. The storage time is a lot longer
than I intend it to be.

The setMaxInactiveInterval() method on org.apache.tapestry5.services.Session
looks appealing, but I am not sure about /how/ and /when/ to invoke it, if
it is indeed the right method to use.

Any help will be greatly appreciated. Thank you.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-default-session-timeout-interval-tp5594150p5594150.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Lenny Primak
2012-03-26 01:56:37 UTC
Permalink
The session timeout is strictly a function of a servlet container you are using. Most of them listen to web.xml session-timeout property in session-config section. Look up web.xml syntax on the web.
This has nothing to do with tapestry.
Post by harry
Dear Tapestry community,
I am wondering what's the best practice to change default session timeout
interval. Specifically, I'd like to shorten it. The older discussions in
the mailing list seem to be either out-dated or not on point.
I have been using the ApplicationStateManager (with the default strategy of
session storage) to handle User objects. The storage time is a lot longer
than I intend it to be.
The setMaxInactiveInterval() method on org.apache.tapestry5.services.Session
looks appealing, but I am not sure about /how/ and /when/ to invoke it, if
it is indeed the right method to use.
Any help will be greatly appreciated. Thank you.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-default-session-timeout-interval-tp5594150p5594150.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Rural Hunter
2012-03-26 01:57:48 UTC
Permalink
why don't you just set it in web.xml? I don't think tapestry will
violate it.
Post by harry
Dear Tapestry community,
I am wondering what's the best practice to change default session timeout
interval. Specifically, I'd like to shorten it. The older discussions in
the mailing list seem to be either out-dated or not on point.
I have been using the ApplicationStateManager (with the default strategy of
session storage) to handle User objects. The storage time is a lot longer
than I intend it to be.
The setMaxInactiveInterval() method on org.apache.tapestry5.services.Session
looks appealing, but I am not sure about /how/ and /when/ to invoke it, if
it is indeed the right method to use.
Any help will be greatly appreciated. Thank you.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-default-session-timeout-interval-tp5594150p5594150.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
harry
2012-03-26 02:14:37 UTC
Permalink
Thank you, lprimak and RuralHunter.

I am so dumb. I was so fixated with setMaxInactiveInterval() that I
completely forgot about web.xml.

Anyhow, I solved the problem by adding

<session-config>
<session-timeout>10</session-timeout>
</session-config>

to web.xml. Because I am using Jetty, this configuration overwrites the
default of 30 set by webdefault.xml

Thanks again, guys!

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-default-session-timeout-interval-tp5594150p5594171.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Beat Durrer
2012-03-27 10:34:20 UTC
Permalink
I tried using a zoneupdater mixin inside a formfragment (which is
shown/hidden using the triggerfragment mixin on a radiobutton). The
code does what it's intended to do, aside from the reported error.
With the mentioned patch the Exception is reported as following:

Ajax failure: Status 200 for
http://localhost:8086/bpc/application/copywriting.country:countrychanged?param=Switzerland:
TypeError: func is undefined
/tapestry.js:340 ((void 0),(function ()
{callback.call(this);Tapestry.executeInits(reply.inits);}))
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/tapestry.js:2040
([object Object],(function () {var a = merge(args, arguments);return
__method.apply(context, a);}))
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/tapestry.js:338
([object Object])
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/tapestry.js:1864
([object Object],null)
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/tapestry.js:1889
([object Object],null)
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/scriptaculous_1_9_0/prototype.js:399
([object Object],null)
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/tapestry.js:456 (4)
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/scriptaculous_1_9_0/prototype.js:1610
([object Event])
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/scriptaculous_1_9_0/prototype.js:1553
([object Event])
@http://localhost:8086/bpc/assets/0.0.3-DEV/core/scriptaculous_1_9_0/prototype.js:399
Ajax failure: Status 200 for
http://localhost:8086/bpc/application/copywriting.country:countrychanged?param=Switzerland:
TypeError: func is undefined
Post by harry
Thank you, lprimak and RuralHunter.
I am so dumb.  I was so fixated with setMaxInactiveInterval() that I
completely forgot about web.xml.
Anyhow, I solved the problem by adding
<session-config>
       <session-timeout>10</session-timeout>
 </session-config>
to web.xml.  Because I am using Jetty, this configuration overwrites the
default of 30 set by webdefault.xml
Thanks again, guys!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-default-session-timeout-interval-tp5594150p5594171.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org

Continue reading on narkive:
Loading...