#16 Session expiration notification

closed
nobody
None
5
2009-03-08
2005-04-14
Brett Wooldridge
No

I desparately need session expiration notification! I
am storing things like JDBC connections in the session,
and I would like the opportunity to clean them up.

What is needed is either:

1) A way for me to supply my own implementation of
Session -- possibly one that 'extends' Delegate, and
overrides destroy().

or

2) Some sort of callback/listener for the session-death.

Honestly, the former would be preferable. It seems
that a great deal of care was taken to implement things
such as StoreFactories, MaintainerFactories, and
ModuleFactories -- but there is no way (that I can see)
to replace substitute the implementations these
factories produce.

It's as if an Inversion of Control pattern was
implemented all the way up to the last inch of the mile
and then left.

Discussion

  • Logged In: YES
    user_id=30029

    I have added this capability to the code and will gladly
    contribute it back! :-) You can tell I'm motivated for a
    solution, heh.

    What I am curious about is the ability (or inability) to
    configure session timeouts. It appears to be hardcoded to
    10 minutes (60000ms). Even though there is a constructor on
    an internal class (ModuleFactory) that takes a timeout, the
    Registry class always calls the default constructor
    (resulting in the 10 min. expiry time).

     
    • status: open --> closed