Hello,
I did find a very dirty solution: Tomcat 4.x doesn't seem to have
functionality to disable restart persistence. But when using:
<Manager className="org.apache.catalina.session.StandardManager"
debug="0"
pathname="">
</Manager>
in server.xml with a empty pathname the restart persistence is disabled.
Not really disabled though, because when tomcat shutdown it will produce a
lot of filenotfound exceptions. This is because a empty pathname is no
valid filename. But the advantage is that sessions.ser isn't written
anymore, so restart persistence is disabled. A bit crude, but it seems to work.
A better solution is still welcome ;-)
Greetings,
Twan
At 19:44 06-7-2004, you wrote:
>Hello,
>
>I'm currently in the process of getting
>cayenne/struts/velocity/velocitytools to work in jbuilder9. That's a lot
>of work but i almost got it right.
>
>There is one thing i can't figure out:
>Tomcat 4.x is saving (serialize) objects which are in session when tomcats
>shutsdown. The session data is saved into a file named "SESSIONS.ser".
>This file is loaded and session data is recovered when tomcats starts again.
>
>There seems to be a conflict with cayenne here. I'm using a
>WebApplicationListener to get the datacontext up and running like
>described here:
><http://www.objectstyle.org/cayenne/userguide/deploy/web-application.html>.
>
>This works fine, but when i shutdown tomcat and restart tomcat a exception
>occurs:
>
>StandardManager[/proj]: Exception loading sessions from persistent storage
>java.lang.ExceptionInInitializerError
> at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
> at
> java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1513)
> at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:45)
> at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:169)
> at java.security.AccessController.doPrivileged(Native Method)
>
>This means that the session data saved to disk can't be loaded. After this
>exception occurs very strange things happen, for example cayenne can't
>find the cayenne.xml.
>
>My solution is to delete the "SESSIONS.ser" when tomcat shutsdown, but
>thats a bit dirty.
>
>Does anybody know a solution to this problem? or maybe a way to turn off
>the automatic serialisation of session data by tomcat? (just for
>development purposes ;-)
>
>Cheers,
>Twan Kogels
>
>
This archive was generated by hypermail 2.0.0 : Tue Jul 06 2004 - 14:51:09 EDT