We have implemented a session counter in our site/application using a SessionCounter object, a user defined object which implements HttpSessionBindingListener class. The sessionCounter object is bound to the session inside the SessionCounterFilter class which implements javax.servlet.Filter. Whenever any user logs in the site, the valueBound() method of the SessionCounter is called and the counter is incremented and its decremented whenever any user logs out. The increment/decrement of count is happening perfectly when the users are login/logout of the application normally but the problem arises when the users are idle, i.e after some set period of inactivity the session has to timeout and the count should be decremented which is not happening.The session counter always keeps on incrementing even though the users are idle for more than 1 day also.
Is there any problem in valueUnbound()of HttpSessionBindingListener method, meaning in what cases does it fail or does not get called?
Our application is deployed in Weblogic 7.0 server in a clustered environment with one admin node and 2 managed nodes.
When a session is expired, i.e. when the session is invalidated. it will automatically call valueUnBound() method.
Just make sure that your session is getting timed out.
Joined: Aug 26, 2004
The problem is that, we only have the log file of a UAT test which was conducted some time back. In the log file what we found was that the session count was not getting decremented even though there was a inactivity of 1 day by users who logged in. All these users were test users were simulated by our test.So we concluded that the valueUnbound() was not getting called otherwise the count would have decremented.
Can you please help me in finding out in what cases the valueUnbound() method is not called or fails.