1

Can someone point me to example implementation for custom session state management ?

I am looking for following approach "keep all the session state in database and keep only the keys in HttpSession object. "

Can it be done using Spring ?

TIA

-Vin

Sergey K.
  • 24,894
  • 13
  • 106
  • 174
Vinayak
  • 96
  • 7

1 Answers1

0

Using a plain old java proxy for this (or cglib proxies) should be possible, you still need to handle saving/loading to/from your db. There's also the issue to see if a proxied object has been modified this would have to been handled additionally. Spring does not anything to this AFAIK.

Not sure what you're trying to achieve really, but perhaps also memcached-session-manager is interesting for you (shameless plug :-)).

MartinGrotzke
  • 1,301
  • 8
  • 13
  • I want to keep all the transient-session data in database with a just a key in session. This will be helpful in failover for replicating the user session. Using tomcat server is not an option for me. I wanted to explore if anybody has done this and if there are any best practices around it.. like when to flush the data stored in tables, db schema etc .. – Vinayak Jan 29 '11 at 00:38
  • Why don't you use existing session replication/failover solutions? Which app server are you using? – MartinGrotzke Jan 29 '11 at 21:29
  • I am using weblogic and its inbuilt jdbc session replication is not working for me... so wanted to try out this – Vinayak Feb 02 '11 at 01:28