[jboss-osgi-commits] JBoss-OSGI SVN: r100130 - in projects/jboss-osgi: trunk/distribution/installer/src/main/resources/jbossas and 1 other directory.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Fri Jan 29 11:04:54 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-01-29 11:04:52 -0500 (Fri, 29 Jan 2010)
New Revision: 100130

Modified:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
Log:
Add switch to disableMDRUsage

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java	2010-01-29 16:03:53 UTC (rev 100129)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java	2010-01-29 16:04:52 UTC (rev 100130)
@@ -78,21 +78,30 @@
    private Kernel kernel;
    /** The previous context tracker */
    private ContextTracker previousTracker;
+   /** Enable MDR usage */
+   private boolean enableMDRUsage = true;
    
    public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
    {
       super(bundleManager);
    }
 
+   public void setEnableMDRUsage(boolean mdrUsage)
+   {
+      this.enableMDRUsage = mdrUsage;
+   }
+
    public void start()
    {
       kernel = getBundleManager().getKernel();
-      applyMDRUsage(true);
+      if (enableMDRUsage == true)
+         applyMDRUsage(true);
    }
 
    public void stop()
    {
-      applyMDRUsage(false);
+      if (enableMDRUsage == true)
+         applyMDRUsage(false);
    }
 
    public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)

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	2010-01-29 16:03:53 UTC (rev 100129)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2010-01-29 16:04:52 UTC (rev 100130)
@@ -96,6 +96,7 @@
     </property>
   </bean>
   -->
+
   <bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
     <constructor>
       <parameter><inject bean="OSGiBundleManager" /></parameter>
@@ -107,6 +108,7 @@
   </bean>
   <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+    <property name="enableMDRUsage">false</property>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -159,7 +161,6 @@
   ********************************
   -->
   
-  <!-- The deployment registry -->
   <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
 
   <bean name="OSGiDeployersWrapper" class="org.jboss.osgi.framework.deployers.OSGiDeployersWrapper" >
@@ -169,7 +170,6 @@
     </constructor>
   </bean>
 
-  <!-- OSGI Deployment -->
   <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
   <bean name="OSGiBundleStateAddDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateAddDeployer">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -215,7 +215,7 @@
   *                              *
   ********************************
   -->
-
+  
   <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>



More information about the jboss-osgi-commits mailing list