Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session time out only for one particular jsf Session scoped managed bean

 
Varun Agrawal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two session scoped beans in my application. I want one of them to have automatic session time out of 5 hours and other one to have automatic session time out for 30 mins.
If I use the regular session timeout in web.xml than the session timeout is same for both of the beans.
Can some one please help me how to set different session time out for different beans.

thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beans don't time out. There's exactly one and only one session between a browser and a J2EE server. That session will be destroyed when application logic explicitly destroys it (session invalidate) or when the session timeout limit specified in web.xml has been exceeded.

Beans that are stored via the session attributes can be disassociated with the session via a "remove attribute" method invocation. However, since J2EE application code does not run as a process, that can only be done as part of an HTTP request/response processing cycle.

All this is fundamental J2EE and JSF doesn't factor into it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic