• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

valueUnbound() not getting called

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Raghunath Madhvapathi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic