File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes valueUnbound() not getting called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "valueUnbound() not getting called" Watch "valueUnbound() not getting called" New topic
Author

valueUnbound() not getting called

Raghunath Madhvapathi
Greenhorn

Joined: Aug 26, 2004
Posts: 6
Hi ,

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.

Any help is appreciated. Thanks in advance.
John Mallavalli
Ranch Hand

Joined: Apr 24, 2002
Posts: 46
Please confirm whether the session is getting expired if the users are idle.
I mean, does the server expires the session after a stipulated time in case of inactivity for that amount of time period ?

Thanks,
John


Do not let what you cannot do interfere with what you can do !!<br /> <br />SCJP & SCWCD 1.4
Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
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.


SCJP2, SCWCD
Raghunath Madhvapathi
Greenhorn

Joined: Aug 26, 2004
Posts: 6
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: valueUnbound() not getting called