[jboss-osgi-commits] JBoss-OSGI SVN: r88031 - in projects/jboss-osgi/trunk/bundle: deployment/src/main/java/org/jboss/osgi/deployment/internal and 4 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Wed Apr 29 18:36:30 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-04-29 18:36:30 -0400 (Wed, 29 Apr 2009)
New Revision: 88031

Added:
   projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/osgi-deployers-jboss-beans.xml
Removed:
   projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml
Modified:
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java
   projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
   projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
   projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
   projects/jboss-osgi/trunk/bundle/microcontainer/src/main/resources/META-INF/base-deployers-beans.xml
Log:
Add some more base deployers - WIP

Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java	2009-04-29 22:36:30 UTC (rev 88031)
@@ -49,12 +49,12 @@
       {
          BundleContext sysContext = framework.getSystemBundleContext();
          
-//         Bundle bundle = installBundle(sysContext, "bundles/jboss-osgi-deployment.jar", true);
-//         assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
-//         
-//         MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
-//         List<String> registeredBeans = mcService.getRegisteredBeans();
-//         System.out.println(registeredBeans);
+         Bundle bundle = installBundle(sysContext, "bundles/jboss-osgi-deployment.jar", true);
+         assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+         
+         MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
+         List<String> registeredBeans = mcService.getRegisteredBeans();
+         System.out.println(registeredBeans);
       }
       finally
       {

Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java	2009-04-29 22:36:30 UTC (rev 88031)
@@ -51,7 +51,7 @@
       
       try
       {
-         deployersURL = new File("../deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml").toURL();
+         deployersURL = new File("../deployment/src/main/resources/META-INF/osgi-deployers-jboss-beans.xml").toURL();
          service.deploy(deployersURL);
       }
       catch (Exception ex)

Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml	2009-04-29 22:36:30 UTC (rev 88031)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-  <!-- The Framework Management -->
-  <bean name="jboss.osgi:service=ManagedFramework" class="org.jboss.osgi.spi.management.ManagedFramework">
-   <property name="mbeanServer"><inject bean="jboss.osgi:service=MBeanServer"/></property>
-  </bean>
-
-  <!-- The OSGi MetaData Deployer -->
-  <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.BundleMetaDataDeployer" />
-  
-  <!-- The OSGi Bundle Structure Deployer -->
-  <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
-  
-  <!-- The OSGi Bundle Deployer -->
-  <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.BundleRealDeployer">
-    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
-  </bean>
-
-  <!-- The Bundle ClassLoader Deployer -->
-  <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDeployer">
-    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
-  </bean>
-
-  <!-- The Bundle Start/Stop Deployer -->
-  <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer">
-    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
-  </bean>
-
-  <!-- The Bundle Management Deployer -->
-  <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.BundleManagementDeployer">
-   <property name="mbeanServer"><inject bean="jboss.osgi:service=MBeanServer"/></property>
-  </bean>
-
-</deployment>
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/osgi-deployers-jboss-beans.xml (from rev 88011, projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/osgi-deployers-jboss-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/resources/META-INF/osgi-deployers-jboss-beans.xml	2009-04-29 22:36:30 UTC (rev 88031)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- The Framework Management -->
+  <bean name="jboss.osgi:service=ManagedFramework" class="org.jboss.osgi.spi.management.ManagedFramework">
+   <property name="mbeanServer"><inject bean="jboss.osgi:service=MBeanServer"/></property>
+  </bean>
+
+  <!-- The OSGi MetaData Deployer -->
+  <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.BundleMetaDataDeployer" />
+  
+  <!-- The OSGi Bundle Structure Deployer -->
+  <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+  
+  <!-- The OSGi Bundle Deployer -->
+  <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.BundleRealDeployer">
+    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
+  </bean>
+
+  <!-- The Bundle ClassLoader Deployer -->
+  <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDeployer">
+    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
+  </bean>
+
+  <!-- The Bundle Start/Stop Deployer -->
+  <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer">
+    <property name="systemContext"><inject bean="jboss.osgi:service=BundleContext" /></property>
+  </bean>
+
+  <!-- The Bundle Management Deployer -->
+  <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.BundleManagementDeployer">
+   <property name="mbeanServer"><inject bean="jboss.osgi:service=MBeanServer"/></property>
+  </bean>
+
+</deployment>
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java	2009-04-29 22:36:30 UTC (rev 88031)
@@ -53,6 +53,11 @@
    String BEAN_MAIN_DEPLOYER = "jboss.osgi:service=MainDeployer";
 
    /** 
+    * The name under which the KernelController is registered: 'jboss.osgi:service=KernelController' 
+    */
+   String BEAN_KERNEL_CONTROLLER = "jboss.osgi:service=KernelController";
+
+   /** 
     * The name under which the Kernel is registered: 'jboss.osgi:service=Kernel' 
     */
    String BEAN_KERNEL = "jboss.osgi:service=Kernel";

Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-04-29 22:36:30 UTC (rev 88031)
@@ -162,6 +162,7 @@
          KernelController controller = kernel.getController();
          ControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
          controller.install(new AbstractControllerContext(BEAN_SYSTEM_BUNDLE_CONTEXT, actions, null, context));
+         controller.install(new AbstractControllerContext(BEAN_KERNEL_CONTROLLER, actions, null, controller));
          controller.install(new AbstractControllerContext(BEAN_KERNEL, actions, null, kernel));
 
          URL deployersURL = context.getBundle().getResource("META-INF/base-deployers-beans.xml");

Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/resources/META-INF/base-deployers-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/resources/META-INF/base-deployers-beans.xml	2009-04-29 22:24:32 UTC (rev 88030)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/resources/META-INF/base-deployers-beans.xml	2009-04-29 22:36:30 UTC (rev 88031)
@@ -2,11 +2,72 @@
 
 <!--
    The base deployers
+   
+   $Id$
 -->
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-   <!-- The MainDeployer -->
-   <bean name="jboss.osgi:service=MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+  <!-- The MainDeployer -->
+  <bean name="jboss.osgi:service=MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+    <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
+    <property name="deployers"><inject bean="Deployers" /></property>
+  </bean>
+
+   <!-- ModificationType structure processor -->
+   <bean name="ModificationTypeStructureProcessor" class="org.jboss.deployers.vfs.plugins.structure.modify.ModificationTypeStructureProcessor">
+     <incallback method="addMatcher"/>
+     <uncallback method="removeMatcher"/>
    </bean>
    
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder">
+           <property name="structureProcessor"><inject bean="ModificationTypeStructureProcessor"/></property>
+         </bean>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.osgi:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+   
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <!-- Unless specified the default list of suffixes is .jar -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>.jar</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -beans.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-beans.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <!-- POJO Deployment -->
+  
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+      <property name="suffix">jboss-beans.xml</property>
+   </bean>
+   
 </deployment>
\ No newline at end of file




More information about the jboss-osgi-commits mailing list