I think you can override:

override protected def setFunc(name: String, value: T): Unit

put a trace there and then call super.

Br's,
Marius

On Jan 13, 10:06 am, Juha Syrjälä <juha.syrj...@gmail.com> wrote:
> I am using only one tab.  The app itself is rather simple, it just
> contains forms where fields are submitted to objects stored in
> SessionVar.
>
> I'll try the thing you suggested later today.
>
> Is there a some way I could add some logging to sessionVar when it's
> value is changed?
>
> On Jan 13, 9:40 am, Marius <marius.dan...@gmail.com> wrote:
>
> > Hmmm  ... I never saw this behavior. Do you happen to use multiple
> > browser tabs using different sessions of your app?
>
> > Can you trace the sessionID in your app with (S.session.map
> > (_.uniqueId) openOr '") or trace the HTTP session Id by S.request.map
> > (_.request.session.sessionId) ?
>
> > Br's,
> > Marius
>
> > On Jan 13, 9:01 am, Juha Syrjälä <juha.syrj...@gmail.com> wrote:
>
> > > Hello all,
>
> > > I am having a problem with SessionVar that keeps losing its contents.
>
> > > I have defined the SessionVar like this:
>
> > > object MyObject {
> > >    object myVar extends SessionVar[Box[MyObject]](Empty)
>
> > > }
>
> > > Then I set value once for myVar:
>
> > > MyObject.myVar(Full(value))
>
> > > My problem is that after some time (0-5 mins) myVar will lose its
> > > value, that is, it will have value Empty again. This seems not to be
> > > due inactivity since I am clicking pages constantly. My code is not
> > > setting value to Empty. During this 0-5 mins the myVar will work
> > > correctly. The logs contain no related messages.
>
> > > I am requesting pages that all reference the session var. Sometimes
> > > session var becomes empty in the first request, sometimes after
> > > several dozen requests.
>
> > > I tried to add shutdown method to myVar, but it is not getting called.
>
> > > override protected def onShutdown(session: CleanUpParam): Unit = {
> > >    Log.error("shutdown executed" + session)
>
> > > }
>
> > > I am running Lift in jetty via mvn jetty:run command. I am using 1.1-
> > > SNAPSHOT of Lift. I am not creating explicitly any kind of cookie or
> > > session.
>
> > > Any ideas what is happening? It could be that session expires or
> > > invalidates somehow, but why and by whom? How can I found out when
> > > session invalidates?
>
> > > I even tried to disable liftGC with (LiftRules.enableLiftGC = false)
> > > but that does not affect the problem.
>
> > > --
> > > Juha Syrjälä
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to