tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Thu, 08 Sep 2005 15:41:11 GMT
remm        2005/09/08 08:41:11

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        ReplicationStream.java
               catalina/src/share/org/apache/catalina/util
                        CustomObjectInputStream.java
               webapps/docs changelog.xml
  Log:
  - 36113: Session persistence for objects with primitive types.
  - The best fix would be to be able to reuse the JDK code (or similar) here.
  
  Revision  Changes    Path
  1.5       +14 -10    jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicationStream.java
  
  Index: ReplicationStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicationStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ReplicationStream.java	27 Jul 2005 15:11:40 -0000	1.4
  +++ ReplicationStream.java	8 Sep 2005 15:41:11 -0000	1.5
  @@ -69,15 +69,19 @@
           throws ClassNotFoundException, IOException {
           String name = classDesc.getName();
           boolean tryRepFirst = name.startsWith("org.apache.catalina.cluster");
  -        try
  -        {
  -            if ( tryRepFirst ) return findReplicationClass(name);
  -            else return findWebappClass(name);
  -        }
  -        catch ( Exception x )
  -        {
  -            if ( tryRepFirst ) return findWebappClass(name);
  -            else return findReplicationClass(name);
  +        try {
  +            try
  +            {
  +                if ( tryRepFirst ) return findReplicationClass(name);
  +                else return findWebappClass(name);
  +            }
  +            catch ( Exception x )
  +            {
  +                if ( tryRepFirst ) return findWebappClass(name);
  +                else return findReplicationClass(name);
  +            }
  +        } catch (ClassNotFoundException e) {
  +            return super.resolveClass(classDesc);
           }
       }
       
  
  
  
  1.5       +7 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java
  
  Index: CustomObjectInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CustomObjectInputStream.java	10 Mar 2005 23:54:45 -0000	1.4
  +++ CustomObjectInputStream.java	8 Sep 2005 15:41:11 -0000	1.5
  @@ -70,7 +70,12 @@
        */
       public Class resolveClass(ObjectStreamClass classDesc)
           throws ClassNotFoundException, IOException {
  -        return Class.forName(classDesc.getName(), false, classLoader);
  +        try {
  +            return Class.forName(classDesc.getName(), false, classLoader);
  +        } catch (ClassNotFoundException e) {
  +            // Try also the superclass because of primitive types
  +            return super.resolveClass(classDesc);
  +        }
       }
   
   
  
  
  
  1.371     +4 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.370
  retrieving revision 1.371
  diff -u -r1.370 -r1.371
  --- changelog.xml	8 Sep 2005 15:00:54 -0000	1.370
  +++ changelog.xml	8 Sep 2005 15:41:11 -0000	1.371
  @@ -56,6 +56,10 @@
           <bug>36558</bug>: Clear IntrospectionUtils cache when stopping a webapp,
as it 
           could leak to keeping a reference to the classloader (remm)
         </fix>
  +      <fix>
  +        <bug>36113</bug>: Session persistence for objects with primitive types
could fail in
  +        some rare cases (remm)
  +      </fix>
       </changelog>
     </subsection>
     
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message