tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Thu, 10 Mar 2005 23:54:46 GMT
markt       2005/03/10 15:54:46

  Modified:    catalina/src/share/org/apache/catalina/util
                        CustomObjectInputStream.java
               webapps/docs changelog.xml
  Log:
  Fix bug 22041. Dynamic proxies are now supported as sesison objects.
   - Implemented using the code from org.apache.geronimo.network.ResolvingObjectInputStream
   - Ported from TC4
  
  Revision  Changes    Path
  1.4       +21 -1     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CustomObjectInputStream.java	27 Feb 2004 14:58:50 -0000	1.3
  +++ CustomObjectInputStream.java	10 Mar 2005 23:54:45 -0000	1.4
  @@ -20,6 +20,7 @@
   import java.io.IOException;
   import java.io.ObjectInputStream;
   import java.io.ObjectStreamClass;
  +import java.lang.reflect.Proxy;
   
   /**
    * Custom subclass of <code>ObjectInputStream</code> that loads from the
  @@ -73,4 +74,23 @@
       }
   
   
  +    /**
  +     * Return a proxy class that implements the interfaces named in a proxy
  +     * class descriptor. Do this using the class loader assigned to this
  +     * Context.
  +     */
  +    protected Class resolveProxyClass(String[] interfaces)
  +        throws IOException, ClassNotFoundException {
  +
  +        Class[] cinterfaces = new Class[interfaces.length];
  +        for (int i = 0; i < interfaces.length; i++)
  +            cinterfaces[i] = classLoader.loadClass(interfaces[i]);
  +
  +        try {
  +            return Proxy.getProxyClass(classLoader, cinterfaces);
  +        } catch (IllegalArgumentException e) {
  +            throw new ClassNotFoundException(null, e);
  +        }
  +    }
  +
   }
  
  
  
  1.239     +3 -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.238
  retrieving revision 1.239
  diff -u -r1.238 -r1.239
  --- changelog.xml	8 Mar 2005 23:26:18 -0000	1.238
  +++ changelog.xml	10 Mar 2005 23:54:45 -0000	1.239
  @@ -57,6 +57,9 @@
         <fix>
           Add back retry logic in JDBC realm in case of a connection failure (remm)
         </fix>
  +      <fix>
  +        <bug>22041</bug>: Support dynamic proxies as session objects. (markt)
  +      </fix>
       </changelog>
      </subsection>
   </section>
  
  
  

---------------------------------------------------------------------
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