That won't work in general as some servlet containers (like tomcat) serialise the session to disk when its idle for too long.

What I meant is that when the page is serialised, it _must_ not contain a reference to session.

but than some other developers can complain because they are deliberated
serialializing some session.
They won't complain when the exception text specifies why this is wrong. See Martijn's e-mail in this discussion thread for why it is wrong.

Regards,
     Erik.


Op 17-11-10 21:05, Pedro Santos schreef:
I think it is to specific. You can override the Session on your app an catch
this situation like:

     private void writeObject(java.io.ObjectOutputStream out) throws
IOException {
         if (Application.get() != null&&
Application.get().getConfigurationType().equals(Application.DEPLOYMENT)) {
             log.info("Session is being serialized in the development
environment, which is an not a desirable behavior.");
         }}

but than some other developers can complain because they are deliberated
serialializing some session.

On Wed, Nov 17, 2010 at 4:49 PM, Erik van Oosten<[email protected]>wrote:
Shouldn't serialization fail when it references session/application?
Perhaps only in development mode.

Regards,
    Erik.

Op 16-11-10 19:03, Igor Vaynberg schreef:

  added a log warning to property models when they reference session.

--
Sent from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to