Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6054099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:06:52+00:00 2026-05-23T08:06:52+00:00

I have an implementation of HttpSessionListener where ‘locked’ resources in the application are released

  • 0

I have an implementation of HttpSessionListener where ‘locked’ resources in the application are released with sessionDestroyed method.

The ‘lock’ information is maintained in database, and the release of locks is working fine in most cases. But In some cases I still see resource is locked – even if there is no session active!

So, I’m doubting if there is possibility that sessionDestroyed not being invoked? Suppose if the session is timed out – will sessionDestroyed method be called?

Suppose user closes browser tab without logging out(destroying session) -then will the listener be invoked?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:06:52+00:00Added an answer on May 23, 2026 at 8:06 am

    A servlet engine will handle session timeouts.
    It will determine on its own when the session is no longer valid and it will call the sessionDestroyed. (this can occur some time after the user closed his browser).

    Some other points :

    Logging

    Perhaps you can add some logging to sessionCreated and sessionDestroyed methods. for each sessionCreated you should have a sessionDestroyed.

    Excepion Handling

    Perhaps the fact that stuff remains locked is not due to the session not being destroyed, but perhaps due to an error in your sessionDestroyed logic. Do you have sufficient exception handling / logging in place there ?

    Timing

    Did you wait long enough to check your locked resources ? (close all clients, and take into account the session timeout value configured on the application / server). As stated earlier, the server cannot detect a user closing a browser, but it does maintain its list of http sessions, and it will destroy them after timeout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following implementation of HttpSessionlistener public class SessionListener implements HttpSessionAttributeListener, HttpSessionListener {
I have an implementation of uploadify running on top of a PHP application. It
I have an implementation of default handler. When it gets to a   in
Does VbScript have a native implementation for Regex? I need to validate e-mail addresses
Does anyone have a good implementation of a stream cipher written in pure portable
I am learning about SOAP implementation and have become somewhat confused regarding the appropriate
In our data access layer at work we have this standard implementation where the
Have created a c++ implementation of the Hough transform for detecting lines in images.
I have a priority queue implementation in C# that I want to add a
I have created my own Tree implementation for various reasons and have come up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.