[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[jetty-dev] Removing an attribute before persisiting the session via HttpSessionActivationListener
|
- From: Eirik Bjørsnøs <eirbjo@xxxxxxxxx>
- Date: Thu, 29 Jul 2010 15:17:57 +0200
- Delivered-to: jetty-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=jV+N6Q5XWQxFYSLomBz7gjEHW5kV+rtsK1Lu1XlaPfE=; b=FuECz2U9yBMFUdUtsmt4iSAdOnlxGVXuzgwj92zyklCVn61kyZZe8loAuvYXXttsaW k1H9YWKDgKuJmZFlZcw7dqjkq0XZQnNotcqYQLYiSBqKVEaxxZrowod/EyoMUjmgalsq 7qCEJh38DTbbGJ3NE7VN0kkw+82V6GP27lQTY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=eLrK2QtC8HQ0wZi6kZslGyNicGymuPbGU2NZH06TXqcbtxHl3Dg+5K+bJeEWeJMxob hSC7uVm04OMgQIZ0YVqrRsLVY4kFYqamoGqLZWq2p2spuWXtT9SoutRdiA/T3GFo51eu GarQO8/yptMLJsUdq1gsgDe34A8A8Z67QMOXU=
Hi,
I have some nice-to-have attributes in the user session which I don't want persisted. These attributes are either not serializable or they hold references to non-serializable attributes. So I need to remove them for session persistance to work.
I figured that implementing a listener that removes the attributes on HttpSessionActivationListener.sessionWillPassivate should work.
But in HashSessionManager.doStop() (around line 100), sessions seem to be serialized to disk *before* any listeners are triggered.
Does this mean I'm out of luck? Is the behaviour by design, or could it be solved?
I wouldn't expect this use case to be very uncommon, so my initial reaction was that it's probably me missing something here..
Thanks,
Eirik.