Home Help Center

How to determine the reason of a destroyed session

joel venninjoel vennin Member Joël VenninOrganization: University Lille 1Project: Just Testing when i have time
Hello I would like to know how i can determine why a session i've been destroyed. I'm using glacier2, when i've a proxy on a session i can call the destroy method from the client side to kill the session. However, when a timeout appears, the session is also called, and the destroy method of the session seems to be automatically called.

On the server side, i would like to determine what is the reason that kills a session.

Thank you.


Joel

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    With the current setup there is no way to know this. Why do you want to know that information?
  • joel venninjoel vennin Member Joël VenninOrganization: University Lille 1Project: Just Testing when i have time
    Just to keep an history of session life cycle ...

    Thank you

    Joël
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    There is no direct way to do that. The simplest way I can think to do it is add a new method on your derived session that your application calls instead of destroy(). For example:

    interface MySession extends Glacier2::Session
    {
    void logout();
    };

    Then your application calls logout, which in sets a flag and calls destroy. In this way you know if destroy is called directly it was destroyed by a session timeout, otherwise it was destroyed by your application.
Sign In or Register to comment.