geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r817124 - in /geronimo/sandbox/djencks/osgi/framework: buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ configs/ configs/jee-specs/ configs/jsr88-cli/ configs/jsr88-cli/src/main/history/ configs/plugin/ conf...
Date Mon, 21 Sep 2009 00:20:26 GMT
Author: djencks
Date: Mon Sep 21 00:20:25 2009
New Revision: 817124

URL: http://svn.apache.org/viewvc?rev=817124&view=rev
Log:
Clean up, mostly remove old classloading code

Removed:
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentBundle.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentBundleClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentBundleContext.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/AbstractResourceHandle.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/AbstractUrlResourceLocation.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/DirectoryResourceHandle.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/DirectoryResourceLocation.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/JarFileClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/JarFileUrlConnection.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/JarResourceHandle.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/JarResourceLocation.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/ResourceEnumeration.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/ResourceFinder.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/ResourceHandle.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/ResourceLocation.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UnionEnumeration.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ChildrenConfigurationClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ClassLoaderHolder.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/JarFileClassLoaderFactory.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/classloading/
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/ClassLoaderDumper.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/ClassLoaderRegistry.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/classloader/UrlResourceFinderTest.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/ChildrenConfigurationClassLoaderTest.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/classloading/
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/sharedlib/SharedLib.java
Modified:
    geronimo/sandbox/djencks/osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
    geronimo/sandbox/djencks/osgi/framework/configs/jee-specs/pom.xml
    geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/pom.xml
    geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/src/main/history/dependencies.xml
    geronimo/sandbox/djencks/osgi/framework/configs/plugin/pom.xml
    geronimo/sandbox/djencks/osgi/framework/configs/plugin/src/main/history/dependencies.xml
    geronimo/sandbox/djencks/osgi/framework/configs/pom.xml
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ClassLoading.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerCollection.java

Modified: geronimo/sandbox/djencks/osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
Mon Sep 21 00:20:25 2009
@@ -21,7 +21,6 @@
 
 import java.io.File;
 import java.net.URI;
-import java.net.URL;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -47,8 +46,6 @@
 import org.apache.geronimo.kernel.config.LifecycleException;
 import org.apache.geronimo.kernel.config.RecordingLifecycleMonitor;
 import org.apache.geronimo.system.configuration.DependencyManager;
-import org.apache.geronimo.kernel.config.classloading.MavenDependencyResolver;
-import org.apache.geronimo.kernel.config.classloading.OneClassLoaderPerJarClassLoaderBuilder;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -269,9 +266,6 @@
         // Generate expanded so we can use Maven to generate the archive
         boot.setExpanded(true);
 
-        File targetFile = new File(targetDir.toURI().resolve(pluginMetadataFileName));
-        URL artifactURL = targetFile.toURI().toURL();
-        new MavenDependencyResolver().resolve(artifactURL, OneClassLoaderPerJarClassLoaderBuilder.GLOBAL_CL_REGISTER,
mavenToGeronimoArtifact(getProject().getArtifact()));
         boot.bootstrap();
     }
 
@@ -353,7 +347,6 @@
         if (kernel != null) {
             return kernel;
         }
-        OneClassLoaderPerJarClassLoaderBuilder.GLOBAL_CL_REGISTER.cleanClassLoaderRegistry();
         getLog().debug("Creating kernel...");
 
         // check the registry in case someone else created one
@@ -461,10 +454,6 @@
 
         ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, bundleContext);
 
-        File targetFile = new File(targetDir.toURI().resolve(pluginMetadataFileName));
-        URL artifactURL = targetFile.toURI().toURL();
-        new MavenDependencyResolver().resolve(artifactURL, OneClassLoaderPerJarClassLoaderBuilder.GLOBAL_CL_REGISTER,
mavenToGeronimoArtifact(getProject().getArtifact()));
-
         return repoGBean.getAbstractName();
     }
 

Modified: geronimo/sandbox/djencks/osgi/framework/configs/jee-specs/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/jee-specs/pom.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/jee-specs/pom.xml (original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/jee-specs/pom.xml Mon Sep 21 00:20:25
2009
@@ -18,7 +18,8 @@
 
 <!-- $Rev$ $Date$ -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -35,14 +36,12 @@
     <description>The JavaEE spec jars in a single classloader.</description>
 
     <dependencies>
-        <!-- geronimo-javaee-deployment_1.1MR3_spec is intentionally missing, it must
be available earlier in the classpath
-        Hopefully we can eliminate this restriction in the future. -->
 
         <!-- activation is needed in root cl to run jaxb -->
-        <!--<dependency>-->
-        <!--<groupId>org.apache.geronimo.specs</groupId>-->
-        <!--<artifactId>geronimo-activation_1.1_spec</artifactId>-->
-        <!--</dependency>-->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-activation_1.1_spec</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
@@ -84,6 +83,11 @@
             <artifactId>geronimo-jaspic_1.0_spec</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
+        </dependency>
+
         <!-- NOTA BENE: use the org.apache.geronimo.javamail/geronimo-javamail_1.4_mail
uber jar
        containing both the spec and the providers in order that users can actually use mail
        without advanced degrees in geronimo classloading.  DO NOT add or replace this with
@@ -211,7 +215,9 @@
                     <deploymentConfigs>
                         <deploymentConfig>${gbeanDeployerBootstrap}</deploymentConfig>
                     </deploymentConfigs>
-                    <deployerName>org.apache.geronimo.framework/geronimo-gbean-deployer-bootstrap/${geronimoVersion}/car?j2eeType=Deployer,name=Deployer</deployerName>
+                    <deployerName>
+                        org.apache.geronimo.framework/geronimo-gbean-deployer-bootstrap/${geronimoVersion}/car?j2eeType=Deployer,name=Deployer
+                    </deployerName>
 
                     <category>JavaEE</category>
 

Modified: geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/pom.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/pom.xml (original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/pom.xml Mon Sep 21 00:20:25
2009
@@ -86,10 +86,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.plugins.classloaders</groupId>
+            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
-            <version>${version}</version>
-            <type>car</type>
         </dependency>
 
         <dependency>

Modified: geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/src/main/history/dependencies.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/src/main/history/dependencies.xml
(original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/jsr88-cli/src/main/history/dependencies.xml
Mon Sep 21 00:20:25 2009
@@ -117,11 +117,6 @@
         <type>jar</type>
     </dependency>
     <dependency>
-        <groupId>org.apache.geronimo.plugins.classloaders</groupId>
-        <artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
-        <type>car</type>
-    </dependency>
-    <dependency>
         <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-activation_1.1_spec</artifactId>
         <type>jar</type>

Modified: geronimo/sandbox/djencks/osgi/framework/configs/plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/plugin/pom.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/plugin/pom.xml (original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/plugin/pom.xml Mon Sep 21 00:20:25 2009
@@ -88,10 +88,8 @@
 
 
         <dependency>
-            <groupId>org.apache.geronimo.plugins.classloaders</groupId>
+            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
-            <version>${version}</version>
-            <type>car</type>
         </dependency>
         
         <dependency>

Modified: geronimo/sandbox/djencks/osgi/framework/configs/plugin/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/plugin/src/main/history/dependencies.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/plugin/src/main/history/dependencies.xml
(original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/plugin/src/main/history/dependencies.xml
Mon Sep 21 00:20:25 2009
@@ -37,8 +37,8 @@
         <type>car</type>
     </dependency>
     <dependency>
-        <groupId>org.apache.geronimo.plugins.classloaders</groupId>
+        <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
-        <type>car</type>
+        <type>jar</type>
     </dependency>
 </plugin-artifact>

Modified: geronimo/sandbox/djencks/osgi/framework/configs/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/configs/pom.xml?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/configs/pom.xml (original)
+++ geronimo/sandbox/djencks/osgi/framework/configs/pom.xml Mon Sep 21 00:20:25 2009
@@ -55,7 +55,7 @@
         <module>gshell-remote</module>
         <module>gshell-geronimo</module>
         <module>jmx-security</module>
-        <module>geronimo-javaee-deployment_1.1MR3_spec</module>
+        <!--<module>geronimo-javaee-deployment_1.1MR3_spec</module>-->
         <module>geronimo-boilerplate</module>
     </modules>
     

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
Mon Sep 21 00:20:25 2009
@@ -339,8 +339,7 @@
 
         public Configuration getConfiguration(Artifact configurationId) {
             try {
-//                JarFileClassLoader classLoader = new JarFileClassLoader(loadedConfigurationData.getId(),
null, getClass().getClassLoader());
-                return new Configuration(//new ClassLoaderHolder(classLoader, classLoader),
+                return new Configuration(
                         loadedConfigurationData,
                         new DependencyNode(loadedConfigurationData.getId(),
                                 new LinkedHashSet<Artifact>(),

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ClassLoading.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ClassLoading.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ClassLoading.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ClassLoading.java
Mon Sep 21 00:20:25 2009
@@ -18,15 +18,14 @@
 package org.apache.geronimo.kernel;
 
 import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
-import java.util.Set;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
-import java.util.Arrays;
 import java.util.List;
-import java.util.ArrayList;
+import java.util.Set;
 
-import org.apache.geronimo.kernel.config.MultiParentClassLoader;
 import org.osgi.framework.Bundle;
 
 /**
@@ -208,11 +207,6 @@
             return getArrayClass(arrayType, count);
         }
 
-        // We're out of options, just toss an exception over the wall.
-        if (classLoader instanceof MultiParentClassLoader) {
-            MultiParentClassLoader cl = (MultiParentClassLoader) classLoader;
-            throw new ClassNotFoundException("Could not load class " + className + " from
classloader: " + cl.getId() + ", destroyed state: " + cl.isDestroyed());
-        }
         throw new ClassNotFoundException("Could not load class " + className + " from unknown
classloader; " + classLoader);
     }
 
@@ -323,10 +317,6 @@
         }
 
         // We're out of options, just toss an exception over the wall.
-//        if (classLoader instanceof MultiParentClassLoader) {
-//            MultiParentClassLoader cl = (MultiParentClassLoader) classLoader;
-//            throw new ClassNotFoundException("Could not load class " + className + " from
classloader: " + cl.getId() + ", destroyed state: " + cl.isDestroyed());
-//        }
         throw new ClassNotFoundException("Could not load class " + className + " from unknown
classloader; " + bundle);
     }
 

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
Mon Sep 21 00:20:25 2009
@@ -121,11 +121,6 @@
     private final AbstractName abstractName;
 
     /**
-     * Supplies classloader(s) for this configuration
-     */
-//    private final ClassLoaderHolder classLoaderHolder;
-
-    /**
      * Used to resolve dependecies and paths
      */
     private final ConfigurationResolver configurationResolver;

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
Mon Sep 21 00:20:25 2009
@@ -203,11 +203,6 @@
 
         DependencyNode dependencyNode = new DependencyNode(configId, new LinkedHashSet<Artifact>(),
new LinkedHashSet<Artifact>());
         gbeanData.setAttribute("dependencyNode", dependencyNode);
-        JarFileClassLoaderFactory classLoaderFactory = new JarFileClassLoaderFactory();
-        gbeanData.setAttribute("classLoaderHolder", classLoaderFactory.buildClassLoaders(Collections.<Configuration>emptyList(),
-                configurationData.getEnvironment(),
-                new LinkedHashSet<String>(configurationData.getClassPath()),
-                configurationResolver));//buildClassLoaders(configurationData,  loadedConfigurations,
dependencyNode));
         gbeanData.setAttribute("allServiceParents", Collections.<Configuration>emptyList());
 
 

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
Mon Sep 21 00:20:25 2009
@@ -151,7 +151,6 @@
         gbeanData.setAttribute("configurationResolver", configurationResolver);
         try {
             dependencyNode = buildDependencyNode(configurationData);
-//            ClassLoaderHolder classLoaderHolder = buildClassLoaders(configurationData,
loadedConfigurations, dependencyNode, configurationResolver);
 
             gbeanData.setAttribute("dependencyNode", dependencyNode);
 //            gbeanData.setAttribute("classLoaderHolder", classLoaderHolder);

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
Mon Sep 21 00:20:25 2009
@@ -30,8 +30,6 @@
 
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
@@ -48,7 +46,6 @@
 import org.slf4j.LoggerFactory;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
 
 /**
  * @version $Rev$ $Date$
@@ -439,12 +436,6 @@
         return allServiceParents;
     }
 
-//    protected ClassLoaderHolder buildClassLoaders(ConfigurationData configurationData,
Map<Artifact, Configuration> loadedConfigurations, DependencyNode dependencyNode, ConfigurationResolver
configurationResolver) throws InvalidConfigException, MissingDependencyException, MalformedURLException,
NoSuchConfigException {
-//        Collection<Configuration> parents = findParentConfigurations(dependencyNode.getClassParents(),
loadedConfigurations);
-//        LinkedHashSet<String> classPath = new LinkedHashSet<String>(configurationData.getClassPath());
-//        ClassLoaderHolder classLoaderHolder = classLoaderFactory.buildClassLoaders(parents,
configurationData.getEnvironment(), classPath, configurationResolver);
-//        return classLoaderHolder;
-//    }
 
     protected DependencyNode buildDependencyNode(ConfigurationData configurationData) throws
MissingDependencyException {
         DependencyNode dependencyNode = DependencyNodeUtil.toDependencyNode(configurationData.getEnvironment(),
artifactResolver, this);

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
Mon Sep 21 00:20:25 2009
@@ -38,5 +38,9 @@
     public Class<?> loadClass(String s) throws ClassNotFoundException {
         return bundle.loadClass(s);
     }
-    
+
+    @Override
+    public String toString() {
+        return "[BundleClassLoader] " + bundle;
+    }
 }

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerCollection.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerCollection.java?rev=817124&r1=817123&r2=817124&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerCollection.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerCollection.java
Mon Sep 21 00:20:25 2009
@@ -16,16 +16,11 @@
  */
 package org.apache.geronimo.transformer;
 
-import java.lang.ClassLoader;
 import java.lang.instrument.ClassFileTransformer;
 import java.lang.instrument.IllegalClassFormatException;
 import java.security.ProtectionDomain;
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.apache.geronimo.kernel.config.MultiParentClassLoader;
+import java.util.List;
 
 /**
  * TransformerCollection is the control point for all ClassFileTransformations within the
a Geronimo server.
@@ -41,7 +36,7 @@
  */
 public class TransformerCollection implements ClassFileTransformer {
 
-    private final List<TransformerWrapper> transformers = new ArrayList<TransformerWrapper>();
+    private final List<ClassFileTransformer> transformers = new ArrayList<ClassFileTransformer>();
     
     // hack to force load of ArrayList$Itr class. This avoids a potential Classloader deadlock
during startup
     // see GERONIMO-3687
@@ -64,38 +59,40 @@
     }
 
     public void addTransformer(ClassFileTransformer classFileTransformer) {
-        transformers.add(new TransformerWrapper(classFileTransformer));
+        transformers.add(classFileTransformer);
     }
 
     public void removeTransformer(ClassFileTransformer classFileTransformer) {
-        for (TransformerWrapper wrapper : transformers) {
-            if (wrapper.delegate == classFileTransformer) {
-                transformers.remove(wrapper);
-                return;
-            }
-        }
+        transformers.remove(classFileTransformer);
+//        for (TransformerWrapper wrapper : transformers) {
+//            if (wrapper.delegate == classFileTransformer) {
+//                transformers.remove(wrapper);
+//                return;
+//            }
+//        }
     }
 
     /**
+     * OSGI TODO do we need something like this in osgi?
      * Private wrapper class for ClassFileTransformers. Purpose of the wrapper class is to
avoid potential ClassLoader deadlocks.
      */
-    private class TransformerWrapper implements ClassFileTransformer {
-
-        private final ClassFileTransformer delegate;
-        private final Set<ClassLoader> ancestorClassLoaders;
-
-        TransformerWrapper(ClassFileTransformer transformer) {
-            this.delegate = transformer;
-            this.ancestorClassLoaders = MultiParentClassLoader.getAncestors(delegate.getClass().getClassLoader());
-        }
-
-        public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
{
-            // if the loader is a parent of the delegate ClassFileTransformer, ignore this
transform. This avoids potential ClassLoader deadlocks
-            if (ancestorClassLoaders.contains(loader)) {
-                return null;
-            }
-            return delegate.transform(loader, className, classBeingRedefined, protectionDomain,
classfileBuffer);
-        }
-    }
+//    private class TransformerWrapper implements ClassFileTransformer {
+//
+//        private final ClassFileTransformer delegate;
+//        private final Set<ClassLoader> ancestorClassLoaders;
+//
+//        TransformerWrapper(ClassFileTransformer transformer) {
+//            this.delegate = transformer;
+//            this.ancestorClassLoaders = MultiParentClassLoader.getAncestors(delegate.getClass().getClassLoader());
+//        }
+//
+//        public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
{
+//            // if the loader is a parent of the delegate ClassFileTransformer, ignore this
transform. This avoids potential ClassLoader deadlocks
+//            if (ancestorClassLoaders.contains(loader)) {
+//                return null;
+//            }
+//            return delegate.transform(loader, className, classBeingRedefined, protectionDomain,
classfileBuffer);
+//        }
+//    }
 
 }



Mime
View raw message