session time-out jax-rs
Do开发者_运维技巧es it make sense do define session-timeout with restful web services like jax-rs? For what I know the rest is stateless (or should be stateless) so what the point of storing a session? If I don't define the session-timeout in the configuration file web.xml for how long session will be stored in servlet container?
Basically REST should be stateless and you should not create a session for the rest calls.
If you don't specify the session timeout, it uses the default one specified by the container. In tomcat the default is 30 minutes.
精彩评论