[jboss-cvs] JBossAS SVN: r95217 - in projects/jboss-osgi/trunk: distribution/installer/src/main/resources/jbossas and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 20 18:23:14 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-20 18:23:13 -0400 (Tue, 20 Oct 2009)
New Revision: 95217

Modified:
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
Log:
Fix deployment service in runtime

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2009-10-20 22:23:13 UTC (rev 95217)
@@ -254,6 +254,7 @@
       <singlefile condition="isFelix" src="@{runtime.dir}/server/conf/jboss-osgi-felix-all.properties" target="$INSTALL_PATH/runtime/server/all/conf/jboss-osgi-extra.properties"
         override="true" />
       <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
+        <include name="jboss-osgi-deployment.jar" />
         <include name="jboss-osgi-runtime-felix.jar" />
         <include name="org.apache.felix.framework.jar" />
       </fileset>
@@ -314,6 +315,7 @@
         <include name="jboss-mdr.jar" />
         <include name="jboss-metatype.jar" />
         <include name="jboss-osgi-deployers.jar" />
+        <include name="jboss-osgi-deployment.jar" />
         <include name="jboss-osgi-framework.jar" />
         <include name="jboss-reflect.jar" />
         <include name="jbossxb.jar" />

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2009-10-20 22:23:13 UTC (rev 95217)
@@ -126,7 +126,7 @@
   <bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorPluginImpl">
+  <bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorServiceImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties	2009-10-20 22:23:13 UTC (rev 95217)
@@ -93,6 +93,5 @@
 # Bundles that need to be started automatically 
 org.jboss.osgi.spi.framework.autoStart=\
    file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
-   file://${osgi.home}/server/minimal/deploy/org.apache.felix.eventadmin.jar \
    file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
    file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar 
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties	2009-10-20 22:23:13 UTC (rev 95217)
@@ -21,7 +21,6 @@
 # Bundles that need to be started automatically 
 org.jboss.osgi.spi.framework.autoStart=\
    file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
-   file://${osgi.home}/server/minimal/deploy/org.apache.felix.eventadmin.jar \
    file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
    file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar
    

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml	2009-10-20 22:23:13 UTC (rev 95217)
@@ -84,7 +84,6 @@
     <property name="autoStart">
      <list elementClass="java.net.URL">
       <value>${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar</value>
-      <value>${osgi.home}/server/minimal/deploy/org.apache.felix.eventadmin.jar</value>
       <value>${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar</value>
       <value>${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar</value>
      </list>
@@ -120,7 +119,7 @@
   <bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorPluginImpl">
+  <bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorServiceImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   

Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java	2009-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java	2009-10-20 22:23:13 UTC (rev 95217)
@@ -88,6 +88,7 @@
          allPackages.add("org.jboss.osgi.deployment.common");
          allPackages.add("org.jboss.osgi.deployment.deployer");
          allPackages.add("org.jboss.osgi.deployment.interceptor");
+         allPackages.add("org.jboss.osgi.deployment.scanner");
          allPackages.add("org.jboss.osgi.microcontainer");
          allPackages.add("org.jboss.virtual");
          

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-10-20 22:17:49 UTC (rev 95216)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java	2009-10-20 22:23:13 UTC (rev 95217)
@@ -32,7 +32,6 @@
 import org.jboss.osgi.framework.bundle.OSGiBundleManager;
 import org.jboss.osgi.framework.plugins.DeployerServicePlugin;
 import org.jboss.osgi.framework.plugins.internal.AbstractServicePluginImpl;
-import org.jboss.osgi.spi.NotImplementedException;
 import org.jboss.osgi.spi.util.BundleInfo;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -90,13 +89,50 @@
          bundle.uninstall();
    }
    
-   public void deploy(Deployment[] bundleDeps) throws BundleException
+   public void deploy(Deployment[] depArr) throws BundleException
    {
-      throw new NotImplementedException();
+      for (Deployment dep : depArr)
+      {
+         try
+         {
+            Bundle bundle = bundleManager.install(dep.getRoot());
+            dep.addAttachment(Bundle.class, bundle);
+         }
+         catch (Exception ex)
+         {
+            log.warn("Cannot install bundle: " + dep.getLocation(), ex);
+         }
+      }
+      
+      for (Deployment dep : depArr)
+      {
+         try
+         {
+            Bundle bundle = dep.getAttachment(Bundle.class);
+            if (bundle != null)
+               bundle.start();
+         }
+         catch (Exception ex)
+         {
+            log.warn("Cannot start bundle: " + dep.getLocation(), ex);
+         }
+      }
    }
 
-   public void undeploy(Deployment[] bundleDeps) throws BundleException
+   public void undeploy(Deployment[] depArr) throws BundleException
    {
-      throw new NotImplementedException();
+      for (Deployment dep : depArr)
+      {
+         try
+         {
+            Bundle bundle = dep.getAttachment(Bundle.class);
+            if (bundle != null)
+               bundle.uninstall();
+         }
+         catch (Exception ex)
+         {
+            log.warn("Cannot uninstall bundle: " + dep.getLocation(), ex);
+         }
+      }
    }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list