I'm not sure whether this comes under JSPs or EJBs but here goes....
In our JSPs we have the following line of code -
<
jsp:useBean id="user" class="com.ugc.ead.login.User" scope="session" />
what I understand this to mean is to look for a bean called user - if it exists then use it, else instantiate one. It will be stored in HttpSession?
We currently use this to denote when a user has timed out - the instantiation of the object sets a 'logged' flag to false, which is set to true when they log in successfully. Therefore if they log in and have no activity for 30 minutes the next time they have actitivy it will execute the above line, instantiate a new user class which will determine the logged flag is false and we then log them off. All this is fine and works well.
We now want to track who has an active session, which means that at the point they time out we want to know this, instead of having to wait for the user to press a button to get timed out as described above. What I am leading up to saying is does anyone know what happens at the point of a timeout, will the user class be automatically be removed from the session object - I assume it will be because a subsequent call to the above line of code will instantiate a new one, which must mean the old one has gone? If this is the case why am I having no joy with implementing HttpSessionBindingListener on the user class and checking in the "valueUnbound" method to denote the removal of the class from session?? Basically if I log on and sit for 30 minutes the valueUnbound method is not called??
Apologies if this is bit confusing but if anyone understands what I am going on about here I'd be grateful for some advice.
Many thanks,
Tony