markt       2004/05/22 16:23:23

  Modified:    catalina/src/share/org/apache/catalina/session
                        StoreBase.java
  Log:
  Fix bug 19034. After a change to a class, sessions in the store may throw
    exceptions as the serialised class is not longer compatible with the new
    class. The bug describes an issue when InvalidClassException was
    thrown. An apparently related bug (22716) referred to a
    NotSerializableException so to be on the safe side I implemented a
    solution that catches all exceptions.
    The patch is based on a solution suggested by Ronald Klop.
    Ported from TC4
    This patch is untested as I was unable to reproduce the exception
    described on my development machine.
  
  Revision  Changes    Path
  1.8       +9 -7      
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StoreBase.java
  
  Index: StoreBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StoreBase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StoreBase.java    27 Feb 2004 14:58:47 -0000      1.7
  +++ StoreBase.java    22 May 2004 23:23:23 -0000      1.8
  @@ -228,12 +228,14 @@
                       session.expire();
                   }
                   remove(session.getId());
  -            } catch (IOException e) {
  -                log (e.toString());
  -                e.printStackTrace();
  -            } catch (ClassNotFoundException e) {
  -                log (e.toString());
  -                e.printStackTrace();
  +            } catch (Exception e) {
  +                log ("Session: "+keys[i]+"; "+e.toString());
  +                try {
  +                    remove(keys[i]);
  +                } catch (IOException e2) {
  +                    log (e2.toString());
  +                    e2.printStackTrace();
  +                }
               }
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to