The servlet container spec requests that sessions are persistent by
default, but it often doesn't make sense with JSF beans. In Tomcat, it's
configurable through manager's saveOnRestart attribute:
<Context ...>
  <Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false"/>
</Context>

Kalle

> -----Original Message-----
> From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 11, 2006 8:38 AM
> To: MyFaces Development
> Subject: JFYI: change session to request bean - the way life
> 
> 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