Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Removing an attribute before persisiting the session via HttpSessionActivationListener

off the cuff this seems like something you could log a ticket for in under RT -> Jetty

I suspect the listeners are to notify _after_ things have been put to
disk and altering that contract would be problematic, that being said
I don't see why we couldn't put something else there to make this

lodging a bug/feature is the correct next step and a patch from you
implementing the behavior you desire would be even better :)


jesse mcconnell

2010/7/29 Eirik Bjørsnøs <eirbjo@xxxxxxxxx>:
> 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.
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx

Back to the top