This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Session time out only for one particular jsf Session scoped managed bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Session time out only for one particular jsf Session scoped managed bean" Watch "Session time out only for one particular jsf Session scoped managed bean" New topic
Author

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

Varun Agrawal
Greenhorn

Joined: Dec 13, 2010
Posts: 4
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

Joined: Jun 25, 2001
Posts: 16019
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session time out only for one particular jsf Session scoped managed bean