Mail Archive Home | enhydra List | May 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Seems to be what I was looking for. I'll give it a try and get back to you. Thanks for your help. Ricardo Slobodan Vujasinovic wrote:
Hi, New (custom) 'SessionManager' implementation in Enhydra 5.X mid be a problem while in Enhydra 6.X you have 'SessionManager.Class' configuration option so you are able to elegantly integrate custom 'SessionManager' implementation. But, I think that faster and cleaner way to do this is to generate custom implementations of "SessionHome" and "SessionUserTable". This is configurable in both Enhydra 5.X and Enhydra 6.X Server. Depending on "SessionHome.Mode" that you are using (BASIC by default) you can extend existing Enhydra (EAF) implementations. As explanation example I'll use BASIC "SessionHome.Mode" option. You can create your 'CustomSessionHome' class that extends 'BasicSessionHome' enhydra implementation and override its 'removeSession(String sessionKey)' method. ------------------------------------------------------- public synchronized void removeSession(String sessionKey) throws SessionException { /** * Do your thing here */ super.removeSession(sessionKey); } -------------------------------------------------------- Note that 'BasicSessionHome' class has dummy implementation of 'shutdown()' method (called on application shutdown) so I recommend you to additionally override (implement) this method. After that you can create 'CustomSessionUserTable' class that extends already existing 'BasicSessionUserTable' implementation (class is not public so you can expect packaging issue here) without any additional implementation. At the end, don't forget to change (add) adequate application configuration properties: CONF configuration file: SessionManager.SessionHome.Class = CusomSessionHome SessionManager.SessionHome.Mode = CUSTOM SessionManager.SessionUserTable.Class = CustomSessionUserTable web.xml configuration file: <env-entry> <env-entry-name>SessionManager/SessionHome/Class</env-entry-name> <env-entry-value>CustomSessionHome</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>SessionManager/SessionHome/Mode</env-entry-name> <env-entry-value>CUSTOM</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>SessionManager/SessionUserTable/Class</env-entry-name> <env-entry-value>CustomSessionUserTable</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> Hope this helps! Regards, Slobodan Vujasinovic Enhydra Development Team ----- Original Message ----- From: "Ricardo Tedim" <rjtedim@xxxxxxxxxxxx> To: <enhydra@xxxxxxxxxxxxx> Sent: Thursday, May 05, 2005 10:12 PM Subject: [enhydra] Session Data Destruction EventHi, I need to intercept the session destruction "event" in order to trigger some backend operations. I looked through the mailing list and I haven't found any answer on this. Do you how this can be done in Enhydra 5.1 and 6.3? Do I have to write a custom session manager for this? Thanks in advance, Ricardo Tedim
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.