Charles Severance wrote:
Elliot - That helps a lot. Thanks. I kind of figured it was some
big obvious RTM thing.
It seems like a curious default - for simple applications you really
don't want to save across restart - for complex applications where
folks want dynamic load balancing without requiring stickiness - the
sessions need to be serialized at the end of each request.
I *think* that by default - e.g. in the absense of a <Manager/> element,
objects that you want to be persisted across restarts should implement
Serializable.
So when Tomcat shuts down with non-serializable session elements, a
java.io.NotSerializableException is thrown when Tomcat is shut down.
Start Tomcat back up - no exceptions - everything is serializable -
but the session stuff came back (i.e. the value for fred lasted
across server reboots!)
If the session hadn't expired, this is, I believe, proper behavior.
The default configuration kind of does both common Session
serialization use cases "poorly".
I guess I think that Tomcat is doing what it is supposed to do - if I am
reading your use case example correctly -
Objects that implement Serializable were available across restarts (as
long as the session has not expired, objects should be deserialized into
the current session), and objects that didn't implement Serializable
were not available across restarts (and the exception is thrown).
But since I can fix it - I am a happy camper.
Excellent :) Hope this helps,
Best,
Elliot
/Chuck
On Aug 27, 2006, at 12:31 PM, Elliot Metsger wrote:
Charles Severance wrote:
There is a bug (I think) in session handling in Pluto 1.1. Why
would Pluto 1.1 keep a session across a Tomcat restart!
Chuck,
Have you tried putting a <Manager pathname=""/> element in your
context.xml? The context.xml should be in
conf/Catalina/localhost/sakai-portlets.xml. That should disable
session persistence across restarts for that context.
See also:
http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html#Standard%20Implementation,
scroll down to the "pathname" attribute and also
http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html#Restart%20Persistence
HTH,
Elliot