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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Nov 1 06:50:13 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-11-01 06:50:12 -0500 (Sun, 01 Nov 2009)
New Revision: 95891

Added:
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jta-service-jboss-beans.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/microcontainer-service-jboss-beans.xml
Removed:
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManagerLifecycle.java
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-equinox.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
Log:
User separate beans xml descriptors for jta, microcontainer services

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-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -108,9 +108,9 @@
 
     <!--
       ********************************
-      * 
-      * JBossOSGi Distribution 
-      *
+      *                              *
+      * JBossOSGi Distribution       *
+      *                              *
       ********************************
     -->
 
@@ -160,9 +160,9 @@
 
     <!--
       ********************************
-      * 
-      * JBossOSGi Runtime 
-      *
+      *                              *
+      * JBossOSGi Runtime            *
+      *                              *
       ********************************
     -->
 
@@ -337,9 +337,9 @@
 
     <!--
       ********************************* 
-      * 
-      * JBossAS Integration 
-      * 
+      *                               *
+      * JBossAS Integration           *
+      *                               *
       *********************************
     -->
 
@@ -386,6 +386,9 @@
         <include name="pax-web-jetty-bundle.jar" />
         <include name="org.apache.felix.log.jar" />
       </fileset>
+      <fileset dir="@{deploy.artifacts.dir}/resources/jbossas" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
+        <include name="jta-service-jboss-beans.xml" />
+      </fileset>
 
       <!-- Felix Integration -->
 
@@ -404,6 +407,9 @@
         override="true">
         <include name="org.osgi.compendium.jar" />
       </fileset>
+      <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/resources/jbossas" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
+        <include name="microcontainer-service-jboss-beans.xml" />
+      </fileset>
 
       <!-- Equinox Integration -->
 
@@ -420,6 +426,9 @@
         <include name="org.apache.felix.metatype.jar" />
         <include name="org.eclipse.osgi.services.jar" />
       </fileset>
+      <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/resources/jbossas" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
+        <include name="microcontainer-service-jboss-beans.xml" />
+      </fileset>
 
       <!-- JBossMC Integration -->
 

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml	2009-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -78,28 +78,6 @@
   <!-- 
   ********************************
   *                              *  
-  *  Services                    *
-  *                              *
-  ********************************
-  -->
-
-  <!-- Microcontainer Service -->
-  <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.integration.jbossas.MicrocontainerServiceBean">
-   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
-   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
-   <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
-  </bean>
-
-  <!-- Transaction Service -->
-  <bean name="jboss.osgi:service=Transaction" class="org.jboss.osgi.integration.jbossas.TransactionServiceBean">
-   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
-   <property name="transactionManager"><inject bean="RealTransactionManager"/></property>
-   <property name="userTransaction"><inject bean="DefaultUserTransactionprovider"/></property>
-  </bean>
-  
-  <!-- 
-  ********************************
-  *                              *  
   *  Deployers                   *
   *                              *
   ********************************

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml	2009-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -101,28 +101,6 @@
   <!-- 
   ********************************
   *                              *  
-  *  Services                    *
-  *                              *
-  ********************************
-  -->
-
-  <!-- Microcontainer Service -->
-  <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.integration.jbossas.MicrocontainerServiceBean">
-   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
-   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
-   <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
-  </bean>
-
-  <!-- Transaction Service -->
-  <bean name="jboss.osgi:service=Transaction" class="org.jboss.osgi.integration.jbossas.TransactionServiceBean">
-   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
-   <property name="transactionManager"><inject bean="RealTransactionManager"/></property>
-   <property name="userTransaction"><inject bean="DefaultUserTransactionprovider"/></property>
-  </bean>
-  
-  <!-- 
-  ********************************
-  *                              *  
   *  Deployers                   *
   *                              *
   ********************************

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-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -5,7 +5,7 @@
   <!-- 
   ********************************
   *                              *  
-  *  OSGi Framework              *
+  *  OSGi Bundle Manager         *
   *                              *
   ********************************
   -->
@@ -73,7 +73,7 @@
   <!-- 
   ********************************
   *                              *  
-  *  OSGi Framework Plugins      *
+  *  OSGi Manager Plugins        *
   *                              *
   ********************************
   -->
@@ -104,7 +104,7 @@
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  
+
   <!-- 
   ********************************
   *                              *  
@@ -131,6 +131,18 @@
     <uncallback method="removeInterceptor" />
   </bean>
   
+  <!-- 
+  ********************************
+  *                              *  
+  *  Framework                   *
+  *                              *
+  ********************************
+  -->
+
+  <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
+    <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+  </bean>
+  
   <!--
   ********************************
   *                              *  
@@ -184,33 +196,4 @@
     <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
   </bean>
 
-  <!--
-  ********************************
-  *                              *  
-  *  OSGi Lifecycle              *
-  *                              *
-  ********************************
-  -->
-
-  <!-- [TODO] use dependencies instead of bean order -->
-   
-  <bean name="OSGiBundleManagerLifecycle" class="org.jboss.osgi.framework.bundle.OSGiBundleManagerLifecycle">
-    <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
-  </bean>
-
-
-  <!-- 
-  ********************************
-  *                              *  
-  *  Generic OSGi Services       *
-  *                              *
-  ********************************
-  -->
-  
-  <bean name="OSGiTransactionService" class="org.jboss.osgi.integration.jbossas.TransactionServiceBean">
-   <property name="bundleContext"><inject bean="OSGiBundleManager" property="systemContext"/></property>
-   <property name="transactionManager"><inject bean="RealTransactionManager"/></property>
-   <property name="userTransaction"><inject bean="DefaultUserTransactionprovider"/></property>
-  </bean>
-
 </deployment>
\ No newline at end of file

Added: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jta-service-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jta-service-jboss-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jta-service-jboss-beans.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  $Id$
+-->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- 
+  ********************************
+  *                              *  
+  *  Services                    *
+  *                              *
+  ********************************
+  -->
+
+  <!-- Microcontainer Service -->
+  <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.integration.jbossas.MicrocontainerServiceBean">
+   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
+   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+   <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+  </bean>
+
+  <!-- Transaction Service -->
+  <bean name="jboss.osgi:service=Transaction" class="org.jboss.osgi.integration.jbossas.TransactionServiceBean">
+   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
+   <property name="transactionManager"><inject bean="RealTransactionManager"/></property>
+   <property name="userTransaction"><inject bean="DefaultUserTransactionprovider"/></property>
+  </bean>
+
+</deployment>


Property changes on: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jta-service-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/microcontainer-service-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/microcontainer-service-jboss-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/microcontainer-service-jboss-beans.xml	2009-11-01 11:50:12 UTC (rev 95891)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  $Id$
+-->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- 
+  ********************************
+  *                              *  
+  *  Services                    *
+  *                              *
+  ********************************
+  -->
+
+  <!-- Microcontainer Service -->
+  <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.integration.jbossas.MicrocontainerServiceBean">
+   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
+   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+   <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+  </bean>
+
+  <!-- Transaction Service -->
+  <bean name="jboss.osgi:service=Transaction" class="org.jboss.osgi.integration.jbossas.TransactionServiceBean">
+   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext"/></property>
+   <property name="transactionManager"><inject bean="RealTransactionManager"/></property>
+   <property name="userTransaction"><inject bean="DefaultUserTransactionprovider"/></property>
+  </bean>
+
+</deployment>


Property changes on: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/microcontainer-service-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManagerLifecycle.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManagerLifecycle.java	2009-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManagerLifecycle.java	2009-11-01 11:50:12 UTC (rev 95891)
@@ -1,53 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.osgi.framework.bundle;
-
-// $Id: $
-
-import org.osgi.framework.BundleException;
-
-/**
- * A bean that starts/stops the bundle manager.
- * 
- * @author Thomas.Diesler at jboss.com
- * @version $Revision: 1.1 $
- */
-public class OSGiBundleManagerLifecycle
-{
-   private OSGiBundleManager bundleManager;
-
-   public OSGiBundleManagerLifecycle(OSGiBundleManager bundleManager)
-   {
-      this.bundleManager = bundleManager;
-   }
-   
-   public void start() throws BundleException
-   {
-      bundleManager.startFramework();
-   }
-   
-   public void stop() throws BundleException
-   {
-      bundleManager.stopFramework();
-   }
-   
-}

Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java	2009-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java	2009-11-01 11:50:12 UTC (rev 95891)
@@ -29,7 +29,6 @@
 import org.jboss.logging.Logger;
 import org.jboss.osgi.framework.bundle.OSGiBundleManager;
 import org.jboss.osgi.framework.bundle.OSGiBundleWrapper;
-import org.jboss.osgi.framework.bundle.OSGiSystemState;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.launch.Framework;
@@ -47,9 +46,9 @@
    
    private OSGiBundleManager bundleManager;
    
-   public OSGiFramework(OSGiBundleManager bundleManager, OSGiSystemState bundleState)
+   public OSGiFramework(OSGiBundleManager bundleManager)
    {
-      super(bundleState);
+      super(bundleManager.getBundleById(0));
       this.bundleManager = bundleManager;
    }
 

Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java	2009-11-01 10:29:15 UTC (rev 95890)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java	2009-11-01 11:50:12 UTC (rev 95891)
@@ -42,7 +42,6 @@
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.logging.Logger;
 import org.jboss.osgi.framework.bundle.OSGiBundleManager;
-import org.jboss.osgi.framework.bundle.OSGiSystemState;
 import org.osgi.framework.launch.Framework;
 import org.osgi.framework.launch.FrameworkFactory;
 
@@ -100,9 +99,7 @@
          throw new IllegalStateException("Cannot obtain installed bean: " + OSGiBundleManager.BEAN_BUNDLE_MANAGER);
 
       OSGiBundleManager manager = (OSGiBundleManager)managerContext.getTarget();
-      OSGiSystemState sysBundle = (OSGiSystemState)manager.getBundleById(0);
-      
-      return new OSGiFramework(manager, sysBundle);
+      return new OSGiFramework(manager);
    }
 
    private KernelController preinstallKernelBeans(Kernel kernel)




More information about the jboss-cvs-commits mailing list