geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r209990 - in /geronimo/trunk/modules: assembly/ assembly/src/plan/ classloader-server/ kernel/src/java/org/apache/geronimo/kernel/config/ system/src/java/org/apache/geronimo/system/rmi/ system/src/test/org/apache/geronimo/system/rmi/
Date Sun, 10 Jul 2005 04:24:55 GMT
Author: gdamour
Date: Sat Jul  9 21:24:52 2005
New Revision: 209990

URL: http://svn.apache.org/viewcvs?rev=209990&view=rev
Log:
o get ride of the geronimo-classloader-server module.


o Configuration.getConfigurationClassLoader now returns a ClassLoader.


Removed:
    geronimo/trunk/modules/assembly/src/plan/j2ee-remote-classloading-deployer-plan.xml
    geronimo/trunk/modules/classloader-server/
Modified:
    geronimo/trunk/modules/assembly/maven.xml
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImpl.java
    geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImplTest.java

Modified: geronimo/trunk/modules/assembly/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/maven.xml?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml (original)
+++ geronimo/trunk/modules/assembly/maven.xml Sat Jul  9 21:24:52 2005
@@ -531,18 +531,6 @@
             </ant:java>
 
             <!-- build the remote class loading deployer configuration "org/apache/geronimo/RemoteClassLoadingDeployer"-->
-            <ant:echo>Building remote class loading deployer configuration</ant:echo>
-            <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
-                <ant:jvmarg value="-ea"/>
-                <ant:arg value="--user"/>
-                <ant:arg value="system"/>
-                <ant:arg value="--password"/>
-                <ant:arg value="manager"/>
-                <ant:arg value="distribute"/>
-                <ant:arg value="target/plan/j2ee-remote-classloading-deployer-plan.xml"/>
-            </ant:java>
-
-            <!-- build the remote class loading deployer configuration "org/apache/geronimo/RemoteClassLoadingDeployer"-->
             <ant:echo>Building juddi-server configuration</ant:echo>
             <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
                 <ant:jvmarg value="-ea"/>

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?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- 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
Sat Jul  9 21:24:52 2005
@@ -434,7 +434,7 @@
         return gbeanState;
     }
 
-    public ConfigurationClassLoader getConfigurationClassLoader() {
+    public ClassLoader getConfigurationClassLoader() {
         return configurationClassLoader;
     }
 
@@ -519,7 +519,7 @@
         infoFactory.addAttribute("dependencies", List.class, true);
         infoFactory.addAttribute("gBeanState", byte[].class, true);
         infoFactory.addAttribute("baseURL", URL.class, true);
-        infoFactory.addAttribute("configurationClassLoader", ConfigurationClassLoader.class,
false);
+        infoFactory.addAttribute("configurationClassLoader", ClassLoader.class, false);
 
         infoFactory.addReference("Parent", ConfigurationParent.class);
         infoFactory.addReference("Repositories", Repository.class, "GBean");

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java
Sat Jul  9 21:24:52 2005
@@ -34,7 +34,6 @@
  */
 public class ConfigurationClassLoader extends URLClassLoader {
     private final URI id;
-    private URL[] urls;
     
     public ConfigurationClassLoader(URI id, URL[] urls, ClassLoader parent) {
         super(urls, parent);
@@ -43,14 +42,6 @@
     
     public URI getID() {
         return id;
-    }
-
-    public URL[] getClassLoaderServerURLs() {
-        return urls;
-    }
-    
-    public void setClassLoaderServerURLs(URL[] urls) {
-        this.urls = urls;
     }
 
     public void destroy() {

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImpl.java?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImpl.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImpl.java
Sat Jul  9 21:24:52 2005
@@ -27,8 +27,6 @@
 import java.rmi.server.RMIClassLoader;
 import java.rmi.server.RMIClassLoaderSpi;
 
-import org.apache.geronimo.kernel.config.ConfigurationClassLoader;
-
 /**
  * An implementation of {@link RMIClassLoaderSpi} which provides normilzation
  * of codebase URLs and delegates to the default {@link RMIClassLoaderSpi}.
@@ -72,9 +70,6 @@
     
     public String getClassAnnotation(Class type) {
         Object obj = type.getClassLoader();
-        if (obj instanceof ConfigurationClassLoader) {
-            obj = new ConfigurationClassLoaderAdapter((ConfigurationClassLoader) obj);
-        }
         if (obj instanceof ClassLoaderServerAware) {
             ClassLoaderServerAware classLoader = (ClassLoaderServerAware) obj;
             URL urls[] = classLoader.getClassLoaderServerURLs();
@@ -168,17 +163,5 @@
     
     public interface ClassLoaderServerAware {
         public URL[] getClassLoaderServerURLs();
-    }
-    
-    private static class ConfigurationClassLoaderAdapter implements ClassLoaderServerAware
{
-        private final ConfigurationClassLoader cl;
-        
-        private ConfigurationClassLoaderAdapter(ConfigurationClassLoader cl) {
-            this.cl = cl;
-        }
-
-        public URL[] getClassLoaderServerURLs() {
-            return cl.getClassLoaderServerURLs();
-        }
     }
 }

Modified: geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImplTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImplTest.java?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImplTest.java
(original)
+++ geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/rmi/RMIClassLoaderSpiImplTest.java
Sat Jul  9 21:24:52 2005
@@ -18,7 +18,6 @@
 package org.apache.geronimo.system.rmi;
 
 import java.net.MalformedURLException;
-import java.net.URI;
 import java.net.URL;
 
 import java.io.ByteArrayOutputStream;
@@ -26,8 +25,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.geronimo.kernel.config.ConfigurationClassLoader;
-
 import junit.framework.TestCase;
 
 /**
@@ -71,41 +68,6 @@
                      normalizedBaseURL + "/Apache%20Group/Apache2", normal);
     }
     
-    public void testGetClassAnnotationWithConfigurationCL() throws Exception {
-        final ClassLoader delegate = getClass().getClassLoader();
-        ConfigurationClassLoader cl = new ConfigurationClassLoader(new URI("test"), new URL[]
{new URL("http://localhost:8080/")}, delegate) {
-            public Class loadClass(String name) throws ClassNotFoundException {
-                if (name.startsWith("java")) {
-                    return delegate.loadClass(name);
-                }
-                String resourceName = name.replace('.', '/') + ".class";
-                InputStream in = delegate.getResourceAsStream(resourceName);
-                byte[] buffer = new byte[1024];
-                ByteArrayOutputStream out = new ByteArrayOutputStream();
-                int read = 0;
-                try {
-                    while (0 < (read = in.read(buffer))) {
-                        out.write(buffer, 0, read);
-                    }
-                } catch (IOException e) {
-                    fail();
-                    return null;
-                }
-                return defineClass(name, out.toByteArray(), 0, out.size());
-            }  
-        };
-        String url1 = "http://localhost:8090/Tester1";
-        String url2 = "http://localhost:8090/Tester2";
-        cl.setClassLoaderServerURLs(new URL[] {new URL(url1), new URL(url2)});
-
-        Class clazz = cl.loadClass(RMIClassLoaderSpiImplTest.class.getName());
-        
-        RMIClassLoaderSpiImpl impl = new RMIClassLoaderSpiImpl();
-        String annotations = impl.getClassAnnotation(clazz);
-        assertEquals(url1 + " " + url2, annotations);
-    }
-    
-
     public void testGetClassAnnotationWithClassLoaderServerAware() throws Exception {
         String url1 = "http://localhost:8090/Tester1";
         String url2 = "http://localhost:8090/Tester2";



Mime
View raw message