geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1096948 [1/3] - in /geronimo/server/trunk: ./ framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ framework/configs/j2ee-system/src/main/plan/ framework/modules/geronimo-deployment/src/main/java/org/...
Date Tue, 26 Apr 2011 23:16:19 GMT
Author: djencks
Date: Tue Apr 26 23:16:16 2011
New Revision: 1096948

URL: http://svn.apache.org/viewvc?rev=1096948&view=rev
Log:
start making kernel and a few other bits into DS services

Removed:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelFactory.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernelFactory.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/ConfigurationActivator.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/KernelActivator.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/ClassLoadingRule.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/ClassLoadingRules.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/repository/ClassLoadingRuleTest.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java
Modified:
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
    geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/HighVersionFirstExportPackagesSelector.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/OSGiMetaDataBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicDependencyManager.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/DependencyNodeUtil.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/MainConfigurationBootstrapper.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/Speed.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/BootstrapTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/ConfigTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/GBeanTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/SimpleGBeanTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigurationManager.java
    geronimo/server/trunk/framework/modules/geronimo-naming/src/test/java/org/apache/geronimo/gjndi/JavaCompGBeanTest.java
    geronimo/server/trunk/framework/modules/geronimo-naming/src/test/java/org/apache/geronimo/gjndi/KernelContextGBeanTest.java
    geronimo/server/trunk/framework/modules/geronimo-naming/src/test/java/org/apache/geronimo/gjndi/binding/GBeanBindingTest.java
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/NewServerInstanceGBean.java
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-system/pom.xml
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationExtender.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/LocalServer.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/MainBridge.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/serverinfo/ServerInfoTest.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java Tue Apr 26 23:16:16 2011
@@ -286,12 +286,6 @@ public class ArchiveCarMojo
                     ZipEntry importTxtEntry = includedJarFile.getEntry("META-INF/imports.txt");
                     if (importTxtEntry != null) {
                         StringBuilder imports = new StringBuilder();
-                        if (boot) {
-                            archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, BootActivator.class.getName());
-                            imports.append("org.apache.geronimo.system.osgi,");
-                        } else {
-                            //archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, ConfigurationActivator.class.getName());
-                        }
                         archive.addManifestEntry(Constants.BUNDLE_NAME, project.getName());
                         archive.addManifestEntry(Constants.BUNDLE_VENDOR, project.getOrganization().getName());
                         ArtifactVersion version = project.getArtifact().getSelectedVersion();

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java Tue Apr 26 23:16:16 2011
@@ -48,7 +48,7 @@ import org.osgi.framework.BundleExceptio
 
 /**
  * Installs Geronimo module CAR files into a target repository to support assembly.
- *
+ * TODO disabled, probably use karaf kar support.
  * @version $Rev$ $Date$
  * @goal install-modules
  */
@@ -177,9 +177,10 @@ public class InstallModulesMojo extends 
         DownloadResults downloadPoller = new DownloadResults();
         String targetServerPath = targetServerDirectory.getAbsolutePath();
 
-        Kernel kernel = new BasicKernel("Assembly", bundleContext);
+        BasicKernel kernel = new BasicKernel();
         PluginRepositoryList pluginRepoList = new PluginRepositoryDownloader(Collections.singletonMap(localRepo, (String[]) null), true);
         try {
+            kernel.boot(bundleContext);
             PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, installedPluginsList, servers, pluginRepoList, kernel, bundleContext);
             installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
             if (overrides != null) {

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java Tue Apr 26 23:16:16 2011
@@ -34,8 +34,8 @@ import org.apache.geronimo.gbean.GBeanDa
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
@@ -44,7 +44,6 @@ import org.apache.geronimo.kernel.config
 import org.apache.geronimo.kernel.config.RecordingLifecycleMonitor;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
-import org.apache.geronimo.system.configuration.ConfigurationExtender;
 import org.apache.geronimo.system.configuration.DependencyManager;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 import org.apache.geronimo.system.repository.Maven2Repository;
@@ -54,6 +53,7 @@ import org.apache.maven.plugin.MojoExecu
 import org.apache.maven.plugin.MojoFailureException;
 import org.codehaus.plexus.util.FileUtils;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.launch.Framework;
 
@@ -179,6 +179,8 @@ public class PackageMojo extends Abstrac
      */
     protected String pluginMetadataFileName = null;
     private BundleContext bundleContext;
+    private ServiceRegistration kernelRegistration;
+    private ServiceReference kernelReference;
 
     //
     // Mojo
@@ -309,8 +311,8 @@ public class PackageMojo extends Abstrac
 
         DependencyManager dependencyManager = kernel.getGBean(DependencyManager.class);
         //Register ConfigurationExtender Listener
-        ConfigurationExtender configurationExtender = new ConfigurationExtender(configurationManager, dependencyManager, bundleContext);
-        configurationExtender.doStart();
+//        ConfigurationExtender configurationExtender = new ConfigurationExtender(configurationManager, dependencyManager, bundleContext);
+//        configurationExtender.doStart();
 
         try {
             for (String artifactName : deploymentConfigs) {
@@ -340,9 +342,10 @@ public class PackageMojo extends Abstrac
         AbstractName deployer = locateDeployer(kernel);
         invokeDeployer(kernel, deployer, targetConfigStoreAName.toString());
         //use a fresh kernel for each module
-        configurationExtender.doStop();
-        kernel.shutdown();
+//        configurationExtender.doStop();
+//        kernel.shutdown();
         kernel = null;
+        bundleContext.ungetService(kernelReference);
         bundleContext.getBundle().stop();
         bundleContext = null;
     }
@@ -366,13 +369,14 @@ public class PackageMojo extends Abstrac
         // boot one ourselves
         bundleContext = getFramework().getBundleContext();
 
-        kernel = KernelFactory.newInstance(bundleContext).createKernel(KERNEL_NAME);
-        kernel.boot();
+//        kernel = KernelFactory.newInstance(bundleContext).createKernel(KERNEL_NAME);
+//        kernel.boot();
         AbstractName sourceRepoName = bootDeployerSystem();
         Dictionary dictionary = null;
-        ServiceRegistration kernelRegistration = bundleContext.registerService(Kernel.class.getName(), kernel, dictionary);
+//        kernelRegistration = bundleContext.registerService(Kernel.class.getName(), kernel, dictionary);
+        kernelReference = bundleContext.getServiceReference(Kernel.class.getName());
 
-        return kernel;
+        return (Kernel) bundleContext.getService(kernelReference);
     }
 
     /**

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java Tue Apr 26 23:16:16 2011
@@ -177,7 +177,7 @@ public class PlanProcessorMojo
 
         Environment newEnvironment = new Environment();
         newEnvironment.setConfigId(configId);
-        newEnvironment.setDependencies(dependencies);
+//        newEnvironment.setDependencies(dependencies);
         if (boot) {
             newEnvironment.setBundleActivator(BootActivator.class.getName());
         }

Modified: geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml Tue Apr 26 23:16:16 2011
@@ -108,21 +108,21 @@ specific services - those should be prov
         </reference>
     </gbean>
     
-    <gbean name="ConfigurationExtender" class="org.apache.geronimo.system.configuration.ConfigurationExtender">
-        <reference name="ConfigurationManager">
-            <name>ConfigurationManager</name>
-        </reference>
-        <reference name="DependencyManager">
-            <name>DependencyManager</name>
-        </reference>
-    </gbean>
+    <!--<gbean name="ConfigurationExtender" class="org.apache.geronimo.system.configuration.ConfigurationExtender">-->
+        <!--<reference name="ConfigurationManager">-->
+            <!--<name>ConfigurationManager</name>-->
+        <!--</reference>-->
+        <!--<reference name="DependencyManager">-->
+            <!--<name>DependencyManager</name>-->
+        <!--</reference>-->
+    <!--</gbean>-->
 
-    <gbean name="DependencyManager" class="org.apache.geronimo.system.configuration.DependencyManager">
-        <reference name="Repositories"></reference>
-        <reference name="ArtifactResolver">
-            <name>ArtifactResolver</name>
-        </reference>
-    </gbean>
+    <!--<gbean name="DependencyManager" class="org.apache.geronimo.system.configuration.DependencyManager">-->
+        <!--<reference name="Repositories"></reference>-->
+        <!--<reference name="ArtifactResolver">-->
+            <!--<name>ArtifactResolver</name>-->
+        <!--</reference>-->
+    <!--</gbean>-->
     
     <gbean name="Logger" class="org.apache.geronimo.system.logging.OSGILogServiceWrapper">       
     </gbean>    

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Tue Apr 26 23:16:16 2011
@@ -221,10 +221,10 @@ public class DeploymentContext {
         pluginType.setName("Temporary Plugin metadata for deployment");
         PluginArtifactType instance = new PluginArtifactType();
         instance.setModuleId(ArtifactType.newArtifactType(environment.getConfigId()));
-        List<DependencyType> dependenciees = instance.getDependency();
-        for (Dependency dependency: environment.getDependencies()) {
-            dependenciees.add(DependencyType.newDependencyType(dependency));
-        }
+//        List<DependencyType> dependenciees = instance.getDependency();
+//        for (Dependency dependency: environment.getDependencies()) {
+//            dependenciees.add(DependencyType.newDependencyType(dependency));
+//        }
         pluginType.getPluginArtifact().add(instance);
         File metaInf = new File(getConfigurationDir(), "META-INF");
         metaInf.mkdirs();

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/HighVersionFirstExportPackagesSelector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/HighVersionFirstExportPackagesSelector.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/HighVersionFirstExportPackagesSelector.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/HighVersionFirstExportPackagesSelector.java Tue Apr 26 23:16:16 2011
@@ -44,32 +44,32 @@ public class HighVersionFirstExportPacka
         Map<Long, Set<ExportPackage>> bundleIdExportPackages = new HashMap<Long, Set<ExportPackage>>();
         Map<String, Version> packageNameVersionMap = new HashMap<String, Version>();
         DependencyManager dependencyManager = context.getDependencyManager();
-        for (Dependency dependency : context.getEnvironment().getDependencies()) {
-            Artifact resolvedArtifact = context.resolveArtifact(dependency.getArtifact());
-            if(resolvedArtifact == null) {
-                logger.warn("Dependency " + dependency.getArtifact() + " could not be resolved, its export packages are ignored");
-                continue;
-            }
-            Bundle dependentBundle = dependencyManager.getBundle(resolvedArtifact);
-            if (dependentBundle == null) {
-                logger.warn("Fail to resolve the bundle corresponding to the artifact " + dependency.getArtifact() + ", its export packages are ignored");
-                continue;
-            }
-            Set<ExportPackage> exportPackages = context.getEffectExportPackages(dependentBundle.getBundleId());
-            if (exportPackages.size() > 0) {
-                bundleIdExportPackages.put(dependentBundle.getBundleId(), exportPackages);
-                recordHighestPackageVersion(packageNameVersionMap, exportPackages);
-            }
-            for (Long parentDependentBundleId : context.getFullDependentBundleIds(dependentBundle)) {
-                if (!bundleIdExportPackages.containsKey(parentDependentBundleId)) {
-                    Set<ExportPackage> parentExportPackages = context.getEffectExportPackages(parentDependentBundleId);
-                    if (parentExportPackages.size() > 0) {
-                        bundleIdExportPackages.put(parentDependentBundleId, parentExportPackages);
-                        recordHighestPackageVersion(packageNameVersionMap, parentExportPackages);
-                    }
-                }
-            }
-        }
+//        for (Dependency dependency : context.getEnvironment().getDependencies()) {
+//            Artifact resolvedArtifact = context.resolveArtifact(dependency.getArtifact());
+//            if(resolvedArtifact == null) {
+//                logger.warn("Dependency " + dependency.getArtifact() + " could not be resolved, its export packages are ignored");
+//                continue;
+//            }
+//            Bundle dependentBundle = dependencyManager.getBundle(resolvedArtifact);
+//            if (dependentBundle == null) {
+//                logger.warn("Fail to resolve the bundle corresponding to the artifact " + dependency.getArtifact() + ", its export packages are ignored");
+//                continue;
+//            }
+//            Set<ExportPackage> exportPackages = context.getEffectExportPackages(dependentBundle.getBundleId());
+//            if (exportPackages.size() > 0) {
+//                bundleIdExportPackages.put(dependentBundle.getBundleId(), exportPackages);
+//                recordHighestPackageVersion(packageNameVersionMap, exportPackages);
+//            }
+//            for (Long parentDependentBundleId : context.getFullDependentBundleIds(dependentBundle)) {
+//                if (!bundleIdExportPackages.containsKey(parentDependentBundleId)) {
+//                    Set<ExportPackage> parentExportPackages = context.getEffectExportPackages(parentDependentBundleId);
+//                    if (parentExportPackages.size() > 0) {
+//                        bundleIdExportPackages.put(parentDependentBundleId, parentExportPackages);
+//                        recordHighestPackageVersion(packageNameVersionMap, parentExportPackages);
+//                    }
+//                }
+//            }
+//        }
 
         //Add framework bundle export packages
         Set<ExportPackage> systemExportPackages = context.getEffectExportPackages(0L);

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/OSGiMetaDataBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/OSGiMetaDataBuilder.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/OSGiMetaDataBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/osgi/OSGiMetaDataBuilder.java Tue Apr 26 23:16:16 2011
@@ -86,9 +86,9 @@ public class OSGiMetaDataBuilder {
 
     protected void processClassloadingRules(Environment environment) {
         //Process Hidden Class
-        for (String hiddenClassPrefix : environment.getClassLoadingRules().getHiddenRule().getClassPrefixes()) {
-            environment.addImportPackage("!" + hiddenClassPrefix);
-        }
+//        for (String hiddenClassPrefix : environment.getClassLoadingRules().getHiddenRule().getClassPrefixes()) {
+//            environment.addImportPackage("!" + hiddenClassPrefix);
+//        }
         //Non-Overridable-Classes
         /*for (String hiddenClassPrefix : environment.getClassLoadingRules().getHiddenRule().getClassPrefixes()) {
             environment.getImportPackages().add(hiddenClassPrefix);
@@ -166,8 +166,7 @@ public class OSGiMetaDataBuilder {
         }
         environment.removeDynamicImportPackages(removedDynamicImportPackages);
 
-        OSGiBuildContext osgiBuildContext = new OSGiBuildContext(environment, hiddenImportPackageNamePrefixes, hiddenImportPackageNames, dependencyManager, environment.getClassLoadingRules()
-                .isInverseClassLoading());
+        OSGiBuildContext osgiBuildContext = new OSGiBuildContext(environment, hiddenImportPackageNamePrefixes, hiddenImportPackageNames, dependencyManager, false);
         osgiBuildContext.setClientModule(clientModule);
         if (clientModule) {
             osgiBuildContext.setClientArtifactResolver(getClientArtifactResolver());

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java Tue Apr 26 23:16:16 2011
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Hashtable;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.jar.JarFile;
@@ -34,7 +33,6 @@ import org.apache.geronimo.kernel.config
 import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
-import org.apache.geronimo.kernel.config.DependencyNode;
 import org.apache.geronimo.kernel.config.LifecycleException;
 import org.apache.geronimo.kernel.config.LifecycleResults;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
@@ -380,13 +378,8 @@ public class SingleFileHotDeployerTest e
             try {
                 return new Configuration(
                         loadedConfigurationData,
-                        new DependencyNode(loadedConfigurationData.getId(),
-                                new LinkedHashSet<Artifact>(),
-                                new LinkedHashSet<Artifact>()),
-                        new ArrayList<Configuration>(),
-                        null,
-                        null,
-                        this);
+                        null
+                );
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml Tue Apr 26 23:16:16 2011
@@ -34,6 +34,11 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-osgi-registry</artifactId>
         </dependency>

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java Tue Apr 26 23:16:16 2011
@@ -312,12 +312,6 @@ public interface Kernel {
     String getShortNameFor(Object service);
 
     /**
-     * Brings the kernel online
-     * @throws Exception if the kernel can not boot
-     */
-    void boot() throws Exception;
-
-    /**
      * Returns the time this kernel was last booted.
      * @return the time this kernel was last booted; null if the kernel has not been
      */
@@ -335,11 +329,11 @@ public interface Kernel {
      */
     void unregisterShutdownHook(Runnable hook);
 
-    /**
-     * Stops the kernel
-     */
-    void shutdown();
-
+//    /**
+//     * Stops the kernel
+//     */
+//    void shutdown();
+//
     /**
      * Has the kernel been booted
      * @return true if the kernel has been booted; false otherwise

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java Tue Apr 26 23:16:16 2011
@@ -370,10 +370,6 @@ public class KernelGBean implements Kern
         return kernel.getShortNameFor(service);
     }
 
-    public void boot() throws Exception {
-        kernel.boot();
-    }
-
     public Date getBootTime() {
         return kernel.getBootTime();
     }
@@ -386,10 +382,6 @@ public class KernelGBean implements Kern
         kernel.unregisterShutdownHook(hook);
     }
 
-    public void shutdown() {
-        kernel.shutdown();
-    }
-
     public boolean isRunning() {
         return kernel.isRunning();
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicDependencyManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicDependencyManager.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicDependencyManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicDependencyManager.java Tue Apr 26 23:16:16 2011
@@ -66,7 +66,7 @@ public class BasicDependencyManager impl
      */
     private final Map parentToChildMap = new HashMap();
 
-    public BasicDependencyManager(LifecycleMonitor lifecycleMonitor) throws Exception {
+    public BasicDependencyManager(LifecycleMonitor lifecycleMonitor) {
         assert lifecycleMonitor != null;
         this.lifecycleMonitor = lifecycleMonitor;
         lifecycleMonitor.addLifecycleListener(lifecycleListener, new AbstractNameQuery(null, Collections.EMPTY_MAP, Collections.EMPTY_SET));

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java Tue Apr 26 23:16:16 2011
@@ -24,6 +24,10 @@ import java.util.LinkedList;
 import java.util.Set;
 import javax.management.ObjectName;
 
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.GBeanData;
@@ -71,6 +75,8 @@ import org.osgi.framework.BundleContext;
  *
  * @version $Rev:386276 $ $Date$
  */
+@Component
+@Service
 public class BasicKernel implements Kernel
 {
     private static final Logger log = LoggerFactory.getLogger(BasicKernel.class);
@@ -84,7 +90,7 @@ public class BasicKernel implements Kern
     /**
      * Name of this kernel
      */
-    private final String kernelName;
+    private String kernelName = "kernel";
 
     private BundleContext bundleContext;
 
@@ -101,49 +107,95 @@ public class BasicKernel implements Kern
     /**
      * The registry
      */
-    private final BasicRegistry registry;
+    private final BasicRegistry registry = new BasicRegistry();
 
     /**
      * Listeners for when the kernel shutdown
      */
     private final LinkedList shutdownHooks = new LinkedList();
 
+
     /**
-     * This manager is used by the kernel to manage dependencies between gbeans
+     * Monitors the lifecycle of all gbeans.
      */
-    private DependencyManager dependencyManager;
+    private BasicLifecycleMonitor lifecycleMonitor = new BasicLifecycleMonitor(this);;
+    private LifecycleMonitor publicLifecycleMonitor = new LifecycleMonitorFlyweight(lifecycleMonitor);;
 
     /**
-     * Monitors the lifecycle of all gbeans.
+     * This manager is used by the kernel to manage dependencies between gbeans
      */
-    private BasicLifecycleMonitor lifecycleMonitor;
-    private LifecycleMonitor publicLifecycleMonitor;
+    private DependencyManager dependencyManager = new BasicDependencyManager(publicLifecycleMonitor);
 
     /**
      * This factory gbean proxies, and tracks all proxies in the system
      */
-    private ProxyManager proxyManager;
+    private ProxyManager proxyManager = new BasicProxyManager(this);;
 
     private static final Naming INSTANCE = new Jsr77Naming();
 
     /**
-     * Construct a Kernel with the specified name.
+     * Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager,
+     * and the registration of ConfigurationStore
      *
-     * @param kernelName the name of the kernel
-     * @param bundleContext bundle context kernel is configured in.
+     * @throws java.lang.Exception if the boot fails
      */
-    public BasicKernel(String kernelName, BundleContext bundleContext) {
-        if (kernelName.indexOf(':') >= 0 || kernelName.indexOf('*') >= 0 || kernelName.indexOf('?') >= 0) {
-            throw new IllegalArgumentException("Kernel name may not contain a ':', '*' or '?' character");
-        }
-        if (bundleContext == null) {
-            throw new NullPointerException("bundleContext required");
+    @Activate
+    public void boot(BundleContext bundleContext) throws Exception {
+        if (running) {
+            return;
         }
-        this.kernelName = kernelName;
         this.bundleContext = bundleContext;
-        this.registry = new BasicRegistry();
+        bootTime = new Date();
+        log.debug("Starting boot");
+
+        // todo cleanup when boot fails
+        KernelRegistry.registerKernel(this);
+
+        registry.start(this);
+
+//        lifecycleMonitor = new BasicLifecycleMonitor(this);
+//        publicLifecycleMonitor = new LifecycleMonitorFlyweight(lifecycleMonitor);
+//        dependencyManager = new BasicDependencyManager(publicLifecycleMonitor);
+//        proxyManager = new BasicProxyManager(this);
+
+        // load and start the kernel gbean
+        GBeanData kernelGBeanData = new GBeanData(KERNEL_NAME, KernelGBean.GBEAN_INFO);
+        loadGBean(kernelGBeanData, bundleContext);
+        startGBean(KERNEL_NAME);
+
+        running = true;
+        log.debug("Booted");
     }
 
+    /**
+     * Shut down this kernel instance, unregistering the MBeans and releasing
+     * the MBeanServer.
+     */
+    @Deactivate
+    public void shutdown() {
+        if (!running) {
+            return;
+        }
+        running = false;
+        log.debug("Starting kernel shutdown");
+
+        notifyShutdownHooks();
+
+        registry.stop();
+
+        dependencyManager.close();
+        dependencyManager = null;
+
+        synchronized (this) {
+            notify();
+        }
+
+        KernelRegistry.unregisterKernel(this);
+
+        log.debug("Kernel shutdown complete");
+    }
+
+
     public String getKernelName() {
         return kernelName;
     }
@@ -593,38 +645,6 @@ public class BasicKernel implements Kern
         return null;
     }
 
-    /**
-     * Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager,
-     * and the registration of ConfigurationStore
-     *
-     * @throws java.lang.Exception if the boot fails
-     */
-    public void boot() throws Exception {
-        if (running) {
-            return;
-        }
-        bootTime = new Date();
-        log.debug("Starting boot");
-
-        // todo cleanup when boot fails
-        KernelRegistry.registerKernel(this);
-
-        registry.start(this);
-
-        lifecycleMonitor = new BasicLifecycleMonitor(this);
-        publicLifecycleMonitor = new LifecycleMonitorFlyweight(lifecycleMonitor);
-        dependencyManager = new BasicDependencyManager(publicLifecycleMonitor);
-        proxyManager = new BasicProxyManager(this);
-
-        // load and start the kernel gbean
-        GBeanData kernelGBeanData = new GBeanData(KERNEL_NAME, KernelGBean.GBEAN_INFO);
-        loadGBean(kernelGBeanData, bundleContext);
-        startGBean(KERNEL_NAME);
-
-        running = true;
-        log.debug("Booted");
-    }
-
     public Date getBootTime() {
         return bootTime;
     }
@@ -642,33 +662,6 @@ public class BasicKernel implements Kern
         }
     }
 
-    /**
-     * Shut down this kernel instance, unregistering the MBeans and releasing
-     * the MBeanServer.
-     */
-    public void shutdown() {
-        if (!running) {
-            return;
-        }
-        running = false;
-        log.debug("Starting kernel shutdown");
-
-        notifyShutdownHooks();
-
-        registry.stop();
-
-        dependencyManager.close();
-        dependencyManager = null;
-
-        synchronized (this) {
-            notify();
-        }
-
-        KernelRegistry.unregisterKernel(this);
-
-        log.debug("Kernel shutdown complete");
-    }
-
     private void notifyShutdownHooks() {
         while (!shutdownHooks.isEmpty()) {
             Runnable hook;

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java Tue Apr 26 23:16:16 2011
@@ -47,6 +47,7 @@ import org.apache.xbean.osgi.bundle.util
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
+import org.osgi.framework.ServiceReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.osgi.framework.Bundle;
@@ -125,21 +126,6 @@ public class Configuration implements GB
     private final AbstractName abstractName;
 
     /**
-     * Used to resolve dependecies and paths
-     */
-    private final ConfigurationResolver configurationResolver;
-
-    /**
-     * Contains ids of class and service dependencies for parent configurations
-     */
-    private final DependencyNode dependencyNode;
-
-    /**
-     * All service parents depth first
-     */
-    private final List<Configuration> allServiceParents;
-
-    /**
      * The GBeanData objects by ObjectName
      */
     private final Map<AbstractName, GBeanData> gbeans = new LinkedHashMap<AbstractName, GBeanData>();
@@ -173,24 +159,20 @@ public class Configuration implements GB
 
     private Kernel kernel;
 
+    private List<ServiceReference> bundleReferences = new ArrayList<ServiceReference>();
     /**
      * Creates a configuration.
      *
 //     * @param classLoaderHolder Classloaders for this configuration
+     *
+     *
      * @param configurationData the module type, environment and classpath of the configuration
-     * @param dependencyNode Class and Service parent ids
-     * @param allServiceParents ordered list of transitive closure of service parents for gbean searches
      * @param attributeStore Customization info for gbeans
-     * @param configurationResolver (there should be a better way) Where this configuration is actually located in file system
      * @throws InvalidConfigException if this configuration turns out to have a problem.
      */
     public Configuration(
             @ParamAttribute(name = "configurationData") ConfigurationData configurationData,
-            @ParamAttribute(name = "dependencyNode") DependencyNode dependencyNode,
-            @ParamAttribute(name = "allServiceParents") List<Configuration> allServiceParents,
-            @ParamAttribute(name = "attributeStore") ManageableAttributeStore attributeStore,
-            @ParamAttribute(name = "configurationResolver") ConfigurationResolver configurationResolver,
-            @ParamAttribute(name = "configurationManager") ConfigurationManager configurationManager) throws InvalidConfigException {
+            @ParamAttribute(name = "attributeStore") ManageableAttributeStore attributeStore) throws InvalidConfigException {
         if (configurationData == null) {
             throw new NullPointerException("configurationData is null");
         }
@@ -200,15 +182,12 @@ public class Configuration implements GB
         this.configurationData = configurationData;
         this.naming = configurationData.getNaming();
         this.attributeStore = attributeStore;
-        this.dependencyNode = dependencyNode;
-        this.allServiceParents = allServiceParents;
-        this.configurationResolver = configurationResolver;
-        this.abstractName = getConfigurationAbstractName(dependencyNode.getId());
+        this.abstractName = getConfigurationAbstractName(configurationData.getId());
         this.bundle = configurationData.getBundle();
 
-        if (configurationData.isUseEnvironment() && configurationManager != null) {
+        if (!configurationData.getEnvironment().getBundleFilters().isEmpty()) {
             try {
-                List<Bundle> bundles = getParentBundles(configurationData, configurationResolver, configurationManager);
+                List<Bundle> bundles = getParentBundles(configurationData);
                 this.bundle = new DelegatingBundle(bundles);
             } catch (Exception e) {
                 log.debug("Failed to identify bundle parents for " + configurationData.getId(), e);
@@ -219,7 +198,7 @@ public class Configuration implements GB
             // Deserialize the GBeans in the configurationData
             Collection<GBeanData> gbeans = configurationData.getGBeans(bundle);
             if (attributeStore != null) {
-                gbeans = attributeStore.applyOverrides(dependencyNode.getId(), gbeans, bundle);
+                gbeans = attributeStore.applyOverrides(configurationData.getId(), gbeans, bundle);
             }
             for (GBeanData gbeanData : gbeans) {
                 this.gbeans.put(gbeanData.getAbstractName(), gbeanData);
@@ -237,22 +216,18 @@ public class Configuration implements GB
         }
     }
 
-    private List<Bundle> getParentBundles(ConfigurationData configurationData,
-                                          ConfigurationResolver configurationResolver,
-                                          ConfigurationManager configurationManager)
+    private List<Bundle> getParentBundles(ConfigurationData configurationData)
                                           throws MissingDependencyException, InvalidConfigException {
         List<Bundle> bundles = new ArrayList<Bundle>();
         bundles.add(configurationData.getBundle());
-
-        LinkedHashSet<Artifact> parents = configurationManager.resolveParentIds(configurationData);
-        for (Artifact parent : parents) {
-            String location = getBundleLocation(configurationResolver, parent);
-            Bundle bundle = getBundleByLocation(configurationData.getBundle().getBundleContext(), location);
-            if (bundle != null) {
-                bundles.add(bundle);
-            }
+        BundleContext bundleContext = configurationData.getBundle().getBundleContext();
+        List<String> bundleFilters = configurationData.getEnvironment().getBundleFilters();
+        for (String bundleFilter: bundleFilters) {
+            ServiceReference sr = bundleContext.getServiceReference(bundleFilter);
+            bundleReferences.add(sr);
+            Bundle bundle = (Bundle) bundleContext.getService(sr);
+            bundles.add(bundle);
         }
-
         return bundles;
     }
 
@@ -295,7 +270,7 @@ public class Configuration implements GB
      * @return the unique Id
      */
     public Artifact getId() {
-        return dependencyNode.getId();
+        return configurationData.getId();
     }
 
     /**
@@ -315,39 +290,12 @@ public class Configuration implements GB
         return abstractName;
     }
 
-//    public ClassLoaderHolder getClassLoaderHolder() {
-//        return classLoaderHolder;
-//    }
-
-    /**
-     * Gets the parent configurations used for class loading.
-     * @return the parents of this configuration used for class loading
-     */
-//    public List<Configuration> getClassParents() {
-//        return classParents;
-//    }
-
-    /**
-     * Gets the parent configurations used for service resolution.
-     *
-     * @return the parents of this configuration used for service resolution
-     */
-//    public List<Configuration> getServiceParents() {
-//        return serviceParents;
-//    }
     public DependencyNode getDependencyNode() {
-        return dependencyNode;
+        return null;
+//        return dependencyNode;
     }
 
     /**
-     * Gets the artifact dependencies of this configuration.
-     * @return the artifact dependencies of this configuration
-     */
-//    public LinkedHashSet<Artifact> getDependencies() {
-//        return dependencies;
-//    }
-
-    /**
      * Gets the declaration of the environment in which this configuration runs.
      *
      * @return the environment of this configuration
@@ -374,9 +322,9 @@ public class Configuration implements GB
      * Provide a way to locate where this configuration is for web apps and persistence units
      * @return the ConfigurationResolver for this configuration
      */
-    public ConfigurationResolver getConfigurationResolver() {
-        return configurationResolver;
-    }
+//    public ConfigurationResolver getConfigurationResolver() {
+//        return configurationResolver;
+//    }
 
     /**
      * Gets the type of the configuration (WAR, RAR et cetera)

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Tue Apr 26 23:16:16 2011
@@ -193,10 +193,10 @@ public final class ConfigurationUtil {
             artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository);
         } else {
             // a bootstrap configuration can not have any dependencies
-            List dependencies = configurationData.getEnvironment().getDependencies();
-            if (!dependencies.isEmpty()) {
-                configurationData.getEnvironment().setDependencies(Collections.EMPTY_SET);
-            }
+//            List dependencies = configurationData.getEnvironment().getDependencies();
+//            if (!dependencies.isEmpty()) {
+//                configurationData.getEnvironment().setDependencies(Collections.EMPTY_SET);
+//            }
         }
         ConfigurationResolver configurationResolver = new ConfigurationResolver(configurationData, repositories, artifactResolver);
 
@@ -425,7 +425,7 @@ public final class ConfigurationUtil {
         gbeanData.addDependency(configurationName);
     }
 
-    static void startConfigurationGBeans(AbstractName configurationName, Configuration configuration, Kernel kernel) throws InvalidConfigException {
+    public static void startConfigurationGBeans(AbstractName configurationName, Configuration configuration, Kernel kernel) throws InvalidConfigException {
         List<GBeanData> gbeans = new ArrayList<GBeanData>(configuration.getGBeans().values());
         Collections.sort(gbeans, new GBeanData.PriorityComparator());
 

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/DependencyNodeUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/DependencyNodeUtil.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/DependencyNodeUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/DependencyNodeUtil.java Tue Apr 26 23:16:16 2011
@@ -103,25 +103,25 @@ public class DependencyNodeUtil {
         Artifact id = environment.getConfigId();
         LinkedHashSet<Artifact> classParents = new LinkedHashSet<Artifact>();
         LinkedHashSet<Artifact> serviceParents = new LinkedHashSet<Artifact>();
-        for (Dependency dependency: environment.getDependencies()) {
-            try {
-                Artifact parent = artifactResolver.resolveInClassLoader(dependency.getArtifact());
-                if (configurationFilter.isConfiguration(parent)) {
-                    if (dependency.getImportType() == ImportType.ALL || dependency.getImportType() == ImportType.SERVICES) {
-                        serviceParents.add(parent);
-                    }
-                    if (dependency.getImportType() == ImportType.ALL || dependency.getImportType() == ImportType.CLASSES) {
-                        classParents.add(parent);
-                    }
-                } else {
-                    if (dependency.getImportType() == ImportType.SERVICES) {
-                        throw new MissingDependencyException("Not a configuration but import type services only", parent, id);
-                    }
-                }
-            } catch (MissingDependencyException e) {
-                throw (MissingDependencyException)new MissingDependencyException("Attempting to resolve environment: " + environment, dependency.getArtifact(), id).initCause(e);
-            }
-        }
+//        for (Dependency dependency: environment.getDependencies()) {
+//            try {
+//                Artifact parent = artifactResolver.resolveInClassLoader(dependency.getArtifact());
+//                if (configurationFilter.isConfiguration(parent)) {
+//                    if (dependency.getImportType() == ImportType.ALL || dependency.getImportType() == ImportType.SERVICES) {
+//                        serviceParents.add(parent);
+//                    }
+//                    if (dependency.getImportType() == ImportType.ALL || dependency.getImportType() == ImportType.CLASSES) {
+//                        classParents.add(parent);
+//                    }
+//                } else {
+//                    if (dependency.getImportType() == ImportType.SERVICES) {
+//                        throw new MissingDependencyException("Not a configuration but import type services only", parent, id);
+//                    }
+//                }
+//            } catch (MissingDependencyException e) {
+//                throw (MissingDependencyException)new MissingDependencyException("Attempting to resolve environment: " + environment, dependency.getArtifact(), id).initCause(e);
+//            }
+//        }
         return new DependencyNode(id, classParents, serviceParents);
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java Tue Apr 26 23:16:16 2011
@@ -201,7 +201,7 @@ public class KernelConfigurationManager 
 
             // declare the dependencies as loaded
             if (artifactManager != null) {
-                artifactManager.loadArtifacts(configurationId, configuration.getDependencyNode().getParents());
+                artifactManager.loadArtifacts(configurationId, new LinkedHashSet<Artifact>());
             }
             Map<Artifact, Configuration> moreLoadedConfigurations = new LinkedHashMap<Artifact, Configuration>(loadedConfigurations);
             moreLoadedConfigurations.put(dependencyNode.getId(), configuration);

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java Tue Apr 26 23:16:16 2011
@@ -392,7 +392,7 @@ public class SimpleConfigurationManager 
     protected Configuration doStart(ConfigurationData configurationData, Set<Artifact> resolvedParentIds, Map<Artifact, Configuration> loadedConfigurations, ConfigurationResolver configurationResolver) throws Exception {
         DependencyNode dependencyNode = buildDependencyNode(configurationData);
         List<Configuration> allServiceParents = buildAllServiceParents(loadedConfigurations, dependencyNode);
-        Configuration configuration = new Configuration(configurationData, dependencyNode, allServiceParents, null, configurationResolver, this);
+        Configuration configuration = new Configuration(configurationData, null);
         configuration.doStart();
         //TODO why???
         resolvedParentIds.add(configuration.getId());
@@ -566,28 +566,28 @@ public class SimpleConfigurationManager 
         Environment environment = configurationData.getEnvironment();
 
         LinkedHashSet<Artifact> parentIds = new LinkedHashSet<Artifact>();
-        List<Dependency> dependencies = new ArrayList<Dependency>(environment.getDependencies());
-        for (ListIterator<Dependency> iterator = dependencies.listIterator(); iterator.hasNext();) {
-            Dependency dependency = iterator.next();
-            Artifact resolvedArtifact = artifactResolver.resolveInClassLoader(dependency.getArtifact());
-//            if (isConfiguration(resolvedArtifact)) {
-            parentIds.add(resolvedArtifact);
-
-            // update the dependency list to contain the resolved artifact
-            dependency = new Dependency(resolvedArtifact, dependency.getImportType());
-            iterator.set(dependency);
-//            } else if (dependency.getImportType() == ImportType.SERVICES) {
-//                 Service depdendencies require that the depdencency be a configuration
-//                throw new InvalidConfigException("Dependency does not have services: " + resolvedArtifact);
-//            }
-        }
-
-        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
-            LinkedHashSet<Artifact> childParentIds = resolveParentIds(childConfigurationData);
-            // remove this configuration's id from the parent Ids since it will cause an infinite loop
-            childParentIds.remove(configurationData.getId());
-            parentIds.addAll(childParentIds);
-        }
+//        List<Dependency> dependencies = new ArrayList<Dependency>(environment.getDependencies());
+//        for (ListIterator<Dependency> iterator = dependencies.listIterator(); iterator.hasNext();) {
+//            Dependency dependency = iterator.next();
+//            Artifact resolvedArtifact = artifactResolver.resolveInClassLoader(dependency.getArtifact());
+////            if (isConfiguration(resolvedArtifact)) {
+//            parentIds.add(resolvedArtifact);
+//
+//            // update the dependency list to contain the resolved artifact
+//            dependency = new Dependency(resolvedArtifact, dependency.getImportType());
+//            iterator.set(dependency);
+////            } else if (dependency.getImportType() == ImportType.SERVICES) {
+////                 Service depdendencies require that the depdencency be a configuration
+////                throw new InvalidConfigException("Dependency does not have services: " + resolvedArtifact);
+////            }
+//        }
+//
+//        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
+//            LinkedHashSet<Artifact> childParentIds = resolveParentIds(childConfigurationData);
+//            // remove this configuration's id from the parent Ids since it will cause an infinite loop
+//            childParentIds.remove(configurationData.getId());
+//            parentIds.addAll(childParentIds);
+//        }
         return parentIds;
     }
 
@@ -699,16 +699,16 @@ public class SimpleConfigurationManager 
 
     protected Set<Artifact> getParentArtifacts(ConfigurationData configurationData) {
         LinkedHashSet<Artifact> parentIds = new LinkedHashSet<Artifact>();
-        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
-            parentIds.add(dependency.getArtifact());
-        }
-
-        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
-            Set<Artifact> childParentIds = getParentArtifacts(childConfigurationData);
-            // remove this configuration's id from the parent Ids since it will cause an infinite loop
-            childParentIds.remove(configurationData.getId());
-            parentIds.addAll(childParentIds);
-        }
+//        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
+//            parentIds.add(dependency.getArtifact());
+//        }
+//
+//        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
+//            Set<Artifact> childParentIds = getParentArtifacts(childConfigurationData);
+//            // remove this configuration's id from the parent Ids since it will cause an infinite loop
+//            childParentIds.remove(configurationData.getId());
+//            parentIds.addAll(childParentIds);
+//        }
         return parentIds;
     }
 
@@ -1026,18 +1026,18 @@ public class SimpleConfigurationManager 
     }
 
     private boolean hasHardDependency(Artifact configurationId, ConfigurationData configurationData) {
-        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
-            Artifact artifact = dependency.getArtifact();
-            if (artifact.getVersion() != null && artifact.matches(configurationId)) {
-                return true;
-            }
-        }
-
-        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
-            if (hasHardDependency(configurationId, childConfigurationData)) {
-                return true;
-            }
-        }
+//        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
+//            Artifact artifact = dependency.getArtifact();
+//            if (artifact.getVersion() != null && artifact.matches(configurationId)) {
+//                return true;
+//            }
+//        }
+//
+//        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
+//            if (hasHardDependency(configurationId, childConfigurationData)) {
+//                return true;
+//            }
+//        }
         return false;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java Tue Apr 26 23:16:16 2011
@@ -24,14 +24,11 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 
-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.ParamAttribute;
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.config.DependencyNodeUtil;
 
 /**
  * @version $Rev$ $Date$
@@ -196,51 +193,52 @@ public class DefaultArtifactResolver imp
         if (matches(configuration.getId(), working)) {
             return configuration.getId();
         }
+        return getArtifactVersion(artifactManager.getLoadedArtifacts(configuration.getId()), working);
 
-        Environment environment = configuration.getEnvironment();
-        if (environment.getClassLoadingRules().isInverseClassLoading()) {
-            // Search dependencies of the configuration before searching the parents
-//                Artifact artifact = getArtifactVersion(configuration.getDependencies(), working);
-            Artifact artifact = getArtifactVersion(artifactManager.getLoadedArtifacts(configuration.getId()), working);
-            if (artifact != null) {
-                return artifact;
-            }
-
-            // wasn't declared in the dependencies, so search the parents of the configuration
-            artifact = searchOneParent(configuration, working);
-            if (artifact != null) {
-                return artifact;
-            }
-
-        } else {
-            // Search the parents before the dependencies of the configuration
-            Artifact artifact = searchOneParent(configuration, working);
-
-            if (artifact != null) {
-                return artifact;
-            }
-
-            // wasn't declared in a parent check the dependencies of the configuration
-//                Artifact artifact = getArtifactVersion(configuration.getDependencies(), working);
-            artifact = getArtifactVersion(artifactManager.getLoadedArtifacts(configuration.getId()), working);
-            if (artifact != null) {
-                return artifact;
-            }
-        }
-        return null;
+//        Environment environment = configuration.getEnvironment();
+//        if (environment.getClassLoadingRules().isInverseClassLoading()) {
+//            // Search dependencies of the configuration before searching the parents
+////                Artifact artifact = getArtifactVersion(configuration.getDependencies(), working);
+//            Artifact artifact = getArtifactVersion(artifactManager.getLoadedArtifacts(configuration.getId()), working);
+//            if (artifact != null) {
+//                return artifact;
+//            }
+//
+//            // wasn't declared in the dependencies, so search the parents of the configuration
+//            artifact = searchOneParent(configuration, working);
+//            if (artifact != null) {
+//                return artifact;
+//            }
+//
+//        } else {
+//            // Search the parents before the dependencies of the configuration
+//            Artifact artifact = searchOneParent(configuration, working);
+//
+//            if (artifact != null) {
+//                return artifact;
+//            }
+//
+//            // wasn't declared in a parent check the dependencies of the configuration
+////                Artifact artifact = getArtifactVersion(configuration.getDependencies(), working);
+//            artifact = getArtifactVersion(artifactManager.getLoadedArtifacts(configuration.getId()), working);
+//            if (artifact != null) {
+//                return artifact;
+//            }
+//        }
+//        return null;
     }
 
     private Artifact searchOneParent(Configuration configuration, Artifact working) {
-        LinkedHashSet<Artifact> parentIds = configuration.getDependencyNode().getClassParents();
-        if (!parentIds.isEmpty()) {
-            for (Artifact parentId: parentIds) {
-                Configuration parent = getConfiguration(parentId);
-                Artifact artifact = searchParent(parent, working);
-                if (artifact != null) {
-                    return artifact;
-                }
-            }
-        }
+//        LinkedHashSet<Artifact> parentIds = configuration.getDependencyNode().getClassParents();
+//        if (!parentIds.isEmpty()) {
+//            for (Artifact parentId: parentIds) {
+//                Configuration parent = getConfiguration(parentId);
+//                Artifact artifact = searchParent(parent, working);
+//                if (artifact != null) {
+//                    return artifact;
+//                }
+//            }
+//        }
         return null;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java Tue Apr 26 23:16:16 2011
@@ -27,6 +27,7 @@ import java.util.List;
 import org.apache.geronimo.kernel.config.Manifest;
 import org.apache.geronimo.kernel.config.ManifestException;
 import org.osgi.framework.Constants;
+import sun.tools.tree.ThisExpression;
 
 /**
  * holds the data from the EnvironmentType xml while it is being resolved, transitively closed, etc.
@@ -34,40 +35,35 @@ import org.osgi.framework.Constants;
  * @version $Rev$ $Date$
  */
 public class Environment implements Serializable {
-    private static final long serialVersionUID = 7075760873629376317L;
+
+    private static final long serialVersionUID = -7664363036619171222L;
 
     private Artifact configId;
-    private final LinkedHashSet<Dependency> dependencies = new LinkedHashSet<Dependency>();
     private final LinkedHashSet<String> bundleClassPath = new LinkedHashSet<String>();
     private final LinkedHashSet<String> imports = new LinkedHashSet<String>();
     private final LinkedHashSet<String> exports = new LinkedHashSet<String>();
     private final LinkedHashSet<String> requireBundles = new LinkedHashSet<String>();
     private final LinkedHashSet<String> dynamicImports = new LinkedHashSet<String>();
+    private final LinkedHashSet<String> bundleFilters = new LinkedHashSet<String>();
     private String bundleActivator;
-    private final ClassLoadingRules classLoadingRules;
-    private boolean suppressDefaultEnvironment;
 
     public Environment() {
-        classLoadingRules = new ClassLoadingRules();
     }
 
     public Environment(Artifact configId) {
         this.configId = configId;
 
-        classLoadingRules = new ClassLoadingRules();
     }
 
     public Environment(Environment environment) {
         configId = environment.getConfigId();
-        dependencies.addAll(environment.dependencies);
+        bundleFilters.addAll(environment.bundleFilters);
         bundleClassPath.addAll(environment.bundleClassPath);
         imports.addAll(environment.imports);
         exports.addAll(environment.exports);
         requireBundles.addAll(environment.requireBundles);
         dynamicImports.addAll(environment.dynamicImports);
         bundleActivator = environment.bundleActivator;
-        suppressDefaultEnvironment = environment.isSuppressDefaultEnvironment();
-        classLoadingRules = environment.classLoadingRules;
     }
 
     public Artifact getConfigId() {
@@ -78,44 +74,12 @@ public class Environment implements Seri
         this.configId = configId;
     }
 
-    /**
-     * Gets a List (with elements of type Dependency) of the configuration and
-     * JAR dependencies of this configuration.
-     *
-     * @return immutable copy of the current dependencies
-     * @see Dependency
-     */
-    public List<Dependency> getDependencies() {
-        return Collections.unmodifiableList(new ArrayList<Dependency>(dependencies));
-    }
-
-    public void addDependency(Artifact artifact, ImportType importType) {
-        this.dependencies.add(new Dependency(artifact, importType));
-    }
-
-    public void addDependency(Dependency dependency) {
-        this.dependencies.add(dependency);
-    }
-
-    public void addDependencies(Collection<Dependency> dependencies) {
-        this.dependencies.addAll(dependencies);
-    }
-
-    public void setDependencies(Collection<Dependency> dependencies) {
-        this.dependencies.clear();
-        addDependencies(dependencies);
-    }
-
-    public ClassLoadingRules getClassLoadingRules() {
-        return classLoadingRules;
-    }
-
-    public boolean isSuppressDefaultEnvironment() {
-        return suppressDefaultEnvironment;
+    public List<String> getBundleFilters() {
+        return Collections.unmodifiableList(new ArrayList<String>(bundleFilters));
     }
 
-    public void setSuppressDefaultEnvironment(boolean suppressDefaultEnvironment) {
-        this.suppressDefaultEnvironment = suppressDefaultEnvironment;
+    public void addBundleFilter(String bundleFilter){
+        this.bundleFilters.add(bundleFilter);
     }
 
     public void addToBundleClassPath(Collection<String> bundleClassPath) {

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/MainConfigurationBootstrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/MainConfigurationBootstrapper.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/MainConfigurationBootstrapper.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/MainConfigurationBootstrapper.java Tue Apr 26 23:16:16 2011
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.osgi.framework.BundleContext;
 
@@ -59,9 +59,9 @@ public class MainConfigurationBootstrapp
             loadPersistentConfigurations();
             return getMain();
         } catch (Exception e) {
-            if (null != kernel) {
-                kernel.shutdown();
-            }
+//            if (null != kernel) {
+//                kernel.shutdown();
+//            }
             e.printStackTrace();
             System.exit(1);
             throw new AssertionError();
@@ -69,12 +69,13 @@ public class MainConfigurationBootstrapp
     }
     
     public void bootKernel(BundleContext bundleContext) throws Exception {
-        kernel = KernelFactory.newInstance(bundleContext).createKernel("MainBootstrapper");
-        kernel.boot();
+        kernel = new BasicKernel();
+//        kernel = KernelFactory.newInstance(bundleContext).createKernel("MainBootstrapper");
+//        kernel.boot();
 
         Runtime.getRuntime().addShutdownHook(new Thread("MainBootstrapper shutdown thread") {
             public void run() {
-                kernel.shutdown();
+                ((BasicKernel)kernel).shutdown();
             }
         });
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/Speed.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/Speed.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/Speed.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/Speed.java Tue Apr 26 23:16:16 2011
@@ -21,8 +21,8 @@ import java.lang.reflect.Method;
 import net.sf.cglib.reflect.FastClass;
 import org.apache.geronimo.gbean.runtime.RawInvoker;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.MockGBean;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.testsupport.TestSupport;
 
@@ -93,8 +93,8 @@ public class Speed extends TestSupport {
         printResults("FastClass", end, start, iterations);
 
         // start a kernel
-        Kernel kernel = KernelFactory.newInstance(getBundleContext()).createKernel("speed");
-        kernel.boot();
+        Kernel kernel = new BasicKernel();
+//        kernel.boot();
         AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
         GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
         mockGBean.setAttribute("Name", "bar");
@@ -222,8 +222,8 @@ public class Speed extends TestSupport {
         printResults("FastClass", end, start, iterations);
 
         // start a kernel
-        Kernel kernel = KernelFactory.newInstance(getBundleContext()).createKernel("speed");
-        kernel.boot();
+        Kernel kernel = new BasicKernel();
+//        kernel.boot();
         AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
         GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
         mockGBean.setAttribute("Name", "bar");

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java Tue Apr 26 23:16:16 2011
@@ -23,10 +23,10 @@ import org.apache.geronimo.gbean.GBeanDa
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.InvalidConfigurationException;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.MockGBean;
-import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.osgi.MockBundleContext;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -50,7 +50,7 @@ public class GBeanAttributeTest extends 
 
     private GAttributeInfo persistentPrimitiveAttributeInfo = null;
     private GAttributeInfo attributeInfo = null;
-    private Kernel kernel;
+    private BasicKernel kernel;
 
     public final void testGBeanAttributeEncryption() {
         GBeanInfo ginfo = gbeanInstance.getGBeanInfo();
@@ -335,8 +335,8 @@ public class GBeanAttributeTest extends 
 
     protected void setUp() throws Exception {
         super.setUp();
-        kernel = KernelFactory.newInstance(bundleContext).createKernel("test");
-        kernel.boot();
+        kernel = new BasicKernel();
+//        kernel.boot();
 
         AbstractName name = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
         gbeanInstance = new GBeanInstance(new GBeanData(name, MockGBean.getGBeanInfo()),

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java Tue Apr 26 23:16:16 2011
@@ -21,8 +21,8 @@ import org.apache.geronimo.gbean.Abstrac
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.MockGBean;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.osgi.MockBundleContext;
 import org.apache.geronimo.kernel.repository.Artifact;
@@ -50,12 +50,12 @@ public class GBeanDependencyTest extends
 
     protected void setUp() throws Exception {
         super.setUp();
-        kernel = KernelFactory.newInstance(bundleContext).createKernel("test");
-        kernel.boot();
+        kernel = new BasicKernel();
+//        kernel.boot();
     }
 
     protected void tearDown() throws Exception {
-        kernel.shutdown();
+//        kernel.shutdown();
         super.tearDown();
     }
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/BootstrapTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/BootstrapTest.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/BootstrapTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/BootstrapTest.java Tue Apr 26 23:16:16 2011
@@ -20,6 +20,7 @@ package org.apache.geronimo.kernel;
 import java.io.File;
 
 import junit.framework.TestCase;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.osgi.MockBundleContext;
 
 /**
@@ -30,12 +31,7 @@ public class BootstrapTest extends TestC
     private File kernelState;
 
     public void testCreate() throws Exception {
-        Kernel kernel = KernelFactory.newInstance(bundleContext).createKernel("test.kernel");
-        assertEquals("No kernel should be registered", null, KernelRegistry.getKernel("test.kernel"));
-        kernel.boot();
-        assertEquals("test.kernel kernel should be registered", kernel, KernelRegistry.getKernel("test.kernel"));
-        kernel.shutdown();
-        assertEquals("No kernel should be registered", null, KernelRegistry.getKernel("test.kernel"));
+        Kernel kernel = new BasicKernel();
     }
 
     protected void setUp() throws Exception {

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/ConfigTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/ConfigTest.java?rev=1096948&r1=1096947&r2=1096948&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/ConfigTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/ConfigTest.java Tue Apr 26 23:16:16 2011
@@ -21,6 +21,7 @@ import junit.framework.TestCase;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.kernel.basic.BasicKernel;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
@@ -38,7 +39,7 @@ import org.osgi.framework.BundleContext;
  */
 public class ConfigTest extends TestCase {
     private BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), null, null, null);
-    private Kernel kernel;
+    private BasicKernel kernel;
     private AbstractName gbeanName1;
     private AbstractName gbeanName2;
     private ConfigurationData configurationData;
@@ -181,8 +182,8 @@ public class ConfigTest extends TestCase
     protected void setUp() throws Exception {
         System.setProperty("geronimo.build.car", "true");
         super.setUp();
-        kernel = KernelFactory.newInstance(bundleContext).createKernel("test");
-        kernel.boot();
+        kernel = new BasicKernel();
+//        kernel.boot();
 
         ConfigurationData bootstrap = new ConfigurationData(new Artifact("bootstrap", "bootstrap", "", "car"), kernel.getNaming());
 



Mime
View raw message