aspose file tools*
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 Spring in Action this week in the Spring 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: 16142
    
  21

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.
 
 
subject: Session time out only for one particular jsf Session scoped managed bean