[jboss-cvs] JBossAS SVN: r96322 - projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 12 20:16:46 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-11-12 20:16:46 -0500 (Thu, 12 Nov 2009)
New Revision: 96322

Modified:
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
Log:
Framework's DeployerService delegates to SystemDeployerService which respects autoStart on the Deployment

Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java	2009-11-13 00:59:34 UTC (rev 96321)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java	2009-11-13 01:16:46 UTC (rev 96322)
@@ -39,7 +39,6 @@
 import org.jboss.virtual.VirtualFile;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
 
 /**
  * A plugin that manages bundle deployments.
@@ -94,20 +93,12 @@
 
    public void deploy(Deployment[] bundleDeps) throws BundleException
    {
-      DeploymentRegistryService registry = getDeploymentRegistry();
-      for (Deployment dep : bundleDeps)
-      {
-         getBundleManager().installBundle(dep);
-         registry.registerDeployment(dep);
-      }
+      delegate.deploy(bundleDeps);
    }
 
    public void deploy(URL url) throws BundleException
    {
-      DeploymentRegistryService registry = getDeploymentRegistry();
-      Deployment dep = createDeployment(url);
-      getBundleManager().installBundle(dep);
-      registry.registerDeployment(dep);
+      delegate.deploy(url);
    }
 
    public void undeploy(Deployment[] bundleDeps) throws BundleException
@@ -119,14 +110,4 @@
    {
       delegate.undeploy(url);
    }
-   
-   private DeploymentRegistryService getDeploymentRegistry()
-   {
-      BundleContext context = getSystemContext();
-      ServiceReference sref = context.getServiceReference(DeploymentRegistryService.class.getName());
-      if (sref == null)
-         throw new IllegalStateException("Cannot obtain DeploymentRegistryService");
-      
-      return (DeploymentRegistryService)context.getService(sref);
-   }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list