Mario,

So you never did a session.invalidate() or removed the object from the session? 
 Not before your removal of the sessions
file?

Regards,
David

-----Original Message-----
From: Mario Ivankovits [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 11, 2006 2:26 PM
To: MyFaces Discussion
Subject: JFYI: change session to request bean - the way life


(Sorry for the crosspost, initially my intention was to post it on ther
user list but selected the wrong address)

Hi!

It cost me a couple of hours to figure it out, so I'll share my insights
with you.

I have had a bean which I declared in session scope at first.
After a while I decided to make it a request scoped bean and use the
managed-property stuff to inject a request param.

I restarted tomcat a couple of times but never got this request
parameter injected.

Why ...?

The solution was:
Tomcat stores all session variables in its work directory in a file
named SESSIONS.ser.
Even after restarting tomcat my OLD session scoped bean were
reinitialized from this file. Now that myfaces found the bean in session
scope there was no need to recreate it and thus the request param werent
injected.

After removing this SESSIONS.ser all worked as expected.

Hope this will sometimes save someones time.

Ciao,
Mario

Reply via email to