geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r151197 - in geronimo/trunk/modules: kernel/src/java/org/apache/geronimo/kernel/ kernel/src/java/org/apache/geronimo/kernel/config/ naming/src/java/org/apache/geronimo/naming/reference/ security/src/java/org/apache/geronimo/security/remoting/jmx/
Date Thu, 03 Feb 2005 18:13:10 GMT
Author: djencks
Date: Thu Feb  3 10:13:09 2005
New Revision: 151197

URL: http://svn.apache.org/viewcvs?view=rev&rev=151197
Log:
Use the working ObjectInputStream w/classloader

Added:
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java
      - copied, changed from r151130, geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ObjectInputStreamExt.java
Removed:
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ObjectInputStreamExt.java
Modified:
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/reference/DeserializingReference.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java

Copied: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java
(from r151130, geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ObjectInputStreamExt.java)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java?view=diff&rev=151197&p1=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ObjectInputStreamExt.java&r1=151130&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java&r2=151197
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ObjectInputStreamExt.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java
Thu Feb  3 10:13:09 2005
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.security.remoting.jmx;
+package org.apache.geronimo.kernel;
 
 import java.io.IOException;
 import java.io.InputStream;

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?view=diff&r1=151196&r2=151197
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
Thu Feb  3 10:13:09 2005
@@ -49,6 +49,8 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.ClassLoading;
+import org.apache.geronimo.kernel.ObjectInputStreamExt;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -368,24 +370,6 @@
         return configurationClassLoader;
     }
 
-    private static class ConfigInputStream extends ObjectInputStream {
-        private final ClassLoader cl;
-
-        public ConfigInputStream(InputStream in, ClassLoader cl) throws IOException {
-            super(in);
-            this.cl = cl;
-        }
-
-        protected Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException
{
-            try {
-                return cl.loadClass(desc.getName());
-            } catch (ClassNotFoundException e) {
-                // let the parent try
-                return super.resolveClass(desc);
-            }
-        }
-    }
-
     /**
      * Load GBeans from the supplied byte array using the supplied ClassLoader
      *
@@ -397,7 +381,7 @@
     private static Collection loadGBeans(byte[] gbeanState, ClassLoader cl) throws InvalidConfigException
{
         Map gbeans = new HashMap();
         try {
-            ObjectInputStream ois = new ConfigInputStream(new ByteArrayInputStream(gbeanState),
cl);
+            ObjectInputStream ois = new ObjectInputStreamExt(new ByteArrayInputStream(gbeanState),
cl);
             try {
                 while (true) {
                     GBeanData gbeanData = new GBeanData();

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/reference/DeserializingReference.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/reference/DeserializingReference.java?view=diff&r1=151196&r2=151197
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/reference/DeserializingReference.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/reference/DeserializingReference.java
Thu Feb  3 10:13:09 2005
@@ -17,12 +17,10 @@
 package org.apache.geronimo.naming.reference;
 
 import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-import java.io.InputStream;
 import java.io.IOException;
-import java.io.ObjectStreamClass;
+import java.io.ObjectInputStream;
 
-import org.apache.geronimo.kernel.ClassLoading;
+import org.apache.geronimo.kernel.ObjectInputStreamExt;
 
 /**
  * @version $Rev:  $ $Date:  $
@@ -44,7 +42,7 @@
         super.setClassLoader(classLoader);
         ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
         try {
-            ObjectInputStream is = new ConfigInputStream(bais, classLoader);
+            ObjectInputStream is = new ObjectInputStreamExt(bais, classLoader);
             try {
                 content = is.readObject();
             } finally {
@@ -57,16 +55,4 @@
         }
     }
 
-    private static class ConfigInputStream extends ObjectInputStream {
-        private final ClassLoader classLoader;
-
-        public ConfigInputStream(InputStream in, ClassLoader classLoader) throws IOException
{
-            super(in);
-            this.classLoader = classLoader;
-        }
-
-        protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException
{
-            return ClassLoading.loadClass(classDesc.getName(), classLoader);
-        }
-    }
 }

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java?view=diff&r1=151196&r2=151197
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
Thu Feb  3 10:13:09 2005
@@ -36,6 +36,7 @@
 import org.apache.geronimo.core.service.Interceptor;
 import org.apache.geronimo.core.service.Invocation;
 import org.apache.geronimo.core.service.InvocationResult;
+import org.apache.geronimo.kernel.ObjectInputStreamExt;
 
 /**
  * @version $Rev: 71492 $ $Date: 2004-11-14 21:31:50 -0800 (Sun, 14 Nov 2004) $



Mime
View raw message