[jboss-cvs] JBossAS SVN: r89679 - in projects/jboss-osgi/trunk: bundles/common/src/main/java/org/jboss/osgi/common and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 2 12:41:48 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-02 12:41:48 -0400 (Tue, 02 Jun 2009)
New Revision: 89679

Added:
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/DeployerServiceDelegate.java
Removed:
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/
Modified:
   projects/jboss-osgi/trunk/bundles/common/pom.xml
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
   projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
   projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
   projects/jboss-osgi/trunk/bundles/jmx/pom.xml
   projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml
   projects/jboss-osgi/trunk/docbook/en/modules/ch02-getting-started.xml
   projects/jboss-osgi/trunk/docbook/en/modules/ch03-framework-integration.xml
Log:
More userguide - WIP

Modified: projects/jboss-osgi/trunk/bundles/common/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/pom.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/common/pom.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -53,7 +53,6 @@
             <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
             <Bundle-Activator>org.jboss.osgi.common.internal.CommonServicesActivator</Bundle-Activator>
             <Export-Package>
-              org.jboss.osgi.common.service;version=${version},
               org.jboss.osgi.common.log;version=${version}
             </Export-Package>
             <Private-Package>

Modified: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java	2009-06-02 16:41:48 UTC (rev 89679)
@@ -29,7 +29,6 @@
 import javax.management.MBeanServer;
 import javax.management.StandardMBean;
 
-import org.jboss.osgi.common.service.DeployerServiceDelegate;
 import org.jboss.osgi.spi.service.DeployerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;

Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/DeployerServiceDelegate.java (from rev 89672, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/DeployerServiceDelegate.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/DeployerServiceDelegate.java	2009-06-02 16:41:48 UTC (rev 89679)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.common.internal;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.osgi.spi.service.BundleInfo;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A {@link DeployerService} that delegates to the service that is tracked by the given {@link DeployerServiceTracker}
+ * 
+ * This delegate is registered as an MBean
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public class DeployerServiceDelegate implements DeployerService
+{
+   private BundleContext context;
+
+   public DeployerServiceDelegate(BundleContext context)
+   {
+      this.context = context;
+   }
+
+   public void deploy(BundleInfo[] bundles) throws BundleException
+   {
+      DeployerService service = getDefaultDeployerService();
+      service.deploy(bundles);
+   }
+
+   public void deploy(URL url) throws BundleException
+   {
+      DeployerService service = getDefaultDeployerService();
+      service.deploy(url);
+   }
+
+   public void undeploy(BundleInfo[] bundles) throws BundleException
+   {
+      for (BundleInfo info : bundles)
+         undeploy(info.getLocation());
+   }
+
+   public boolean undeploy(URL url) throws BundleException
+   {
+      boolean undeployed = false;
+      
+      DeployerService service = getMicrocontainerDeployerService();
+      if (service != null)
+         undeployed = service.undeploy(url);
+      
+      if (undeployed == false)
+      {
+         service = getSystemDeployerService();
+         undeployed = service.undeploy(url);
+      }
+      
+      return undeployed;
+   }
+
+   private DeployerService getDefaultDeployerService()
+   {
+      // First try the MC provider
+      DeployerService service = getMicrocontainerDeployerService();
+
+      // Fall back to the system provider
+      if (service == null)
+         service = getSystemDeployerService();
+
+      return service;
+   }
+
+   private DeployerService getMicrocontainerDeployerService()
+   {
+      DeployerService service = null;
+      try
+      {
+         String filter = "(provider=microcontainer)";
+         String serviceName = DeployerService.class.getName();
+         ServiceReference[] srefs = context.getServiceReferences(serviceName, filter);
+         if (srefs != null)
+            service = (DeployerService)context.getService(srefs[0]);
+      }
+      catch (InvalidSyntaxException ex)
+      {
+         throw new IllegalArgumentException(ex);
+      }
+      return service;
+   }
+
+   private DeployerService getSystemDeployerService()
+   {
+      DeployerService service = null;
+      try
+      {
+         String filter = "(provider=system)";
+         String serviceName = DeployerService.class.getName();
+         ServiceReference[] srefs = context.getServiceReferences(serviceName, filter);
+         if (srefs != null)
+            service = (DeployerService)context.getService(srefs[0]);
+      }
+      catch (InvalidSyntaxException ex)
+      {
+         throw new IllegalArgumentException(ex);
+      }
+      
+      if (service == null)
+         throw new IllegalStateException("Cannot obtain system DeployerService");
+      return service;
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -59,7 +59,6 @@
             <Import-Package>
                javax.management, 
                org.jboss.osgi.common.log;version="1.0",
-               org.jboss.osgi.common.service;version="1.0",
                org.jboss.osgi.spi.service;version="1.0",
                org.osgi.framework,
                org.osgi.service.log,

Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java	2009-06-02 16:41:48 UTC (rev 89679)
@@ -109,7 +109,9 @@
 
    public void scan()
    {
-      for (ScanListener listener : listeners)
+      // Use a copy so listeners can remove themselves from within the callback
+      List<ScanListener> listenerArr = new ArrayList<ScanListener>(listeners);
+      for (ScanListener listener : listenerArr)
          listener.beforeScan(this);
       
       List<BundleInfo> currScan = Arrays.asList(getBundles());
@@ -124,7 +126,7 @@
       lastScan = currScan;
       scanCount++;
 
-      for (ScanListener listener : listeners)
+      for (ScanListener listener : listenerArr)
          listener.afterScan(this);
    }
 

Modified: projects/jboss-osgi/trunk/bundles/jmx/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/pom.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/jmx/pom.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -68,7 +68,6 @@
               
               <!-- jboss-osgi --> 
               org.jboss.osgi.common.log;version="1.0",
-              org.jboss.osgi.common.service;version="1.0",
               org.jboss.osgi.spi.management;version="1.0",
               
               <!-- osgi --> 

Modified: projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -110,7 +110,6 @@
               org.jboss.joinpoint.*, 
               org.jboss.logging, 
               org.jboss.osgi.common.log;version="1.0",
-              org.jboss.osgi.common.service;version="1.0",
               org.jboss.osgi.spi;version="1.0",
               org.jboss.osgi.spi.management;version="1.0",
               org.jboss.reflect.*,            

Modified: projects/jboss-osgi/trunk/docbook/en/modules/ch02-getting-started.xml
===================================================================
--- projects/jboss-osgi/trunk/docbook/en/modules/ch02-getting-started.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/docbook/en/modules/ch02-getting-started.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -16,14 +16,12 @@
      
     <para>To run the installer execute the following command:</para>
     
-    <!-- [TODO] release update  -->
     <programlisting>
     java -jar jboss-osgi-installer-1.0.0.Beta2.jar
     </programlisting>
       
     <para>The installer first shows a welcome screen</para>
     
-    <!-- [TODO] release update  -->
     <mediaobject>
       <imageobject>
         <imagedata fileref="images/izpack-welcome.png"/> 
@@ -107,39 +105,39 @@
       </imageobject>
     </mediaobject>
     
+    <!-- [TODO] document the runtime -->
     <para>The JBossOSGi Runtime is ... [TODO]</para>
     
     <programlisting>
-[tdiesler at tddell runtime]$ bin/run.sh
-=========================================================================
-
-  JBossOSGi Bootstrap Environment
-
-  OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta2/runtime
-
-  JAVA: /usr/java/jdk1.6/bin/java
-
-  JAVA_OPTS: ...
-
-=========================================================================
-
-16:18:32,974 INFO  [FelixIntegration] OSGi Integration Felix - 1.0.0.Beta2
-16:18:33,403 INFO  [FelixIntegration] Installed bundle [1]: org.osgi.compendium
-16:18:33,412 INFO  [FelixIntegration] Installed bundle [2]: org.apache.felix.log
-16:18:33,425 INFO  [FelixIntegration] Installed bundle [3]: jboss-osgi-common
-16:18:33,435 INFO  [FelixIntegration] Installed bundle [4]: jboss-osgi-hotdeploy
-16:18:33,550 INFO  [jboss-osgi-hotdeploy] Start DeploymentScanner: [scandir=server/default/bundles,interval=2000ms]
-16:18:33,555 INFO  [OSGiBootstrap] JBossOSGi Runtime booted in 0.581sec
-...
-16:18:33,617 INFO  [jboss-osgi-common] Installed: jboss-osgi-jndi [5]
-16:18:33,627 INFO  [jboss-osgi-common] Installed: jboss-osgi-jmx [6]
-16:18:33,659 INFO  [jboss-osgi-common] Installed: jboss-osgi-common-core [7]
-...
-16:18:34,170 INFO  [jboss-osgi-jndi] JNDI started: JNP=localhost:1099, RMI=localhost:1098
-16:18:34,401 INFO  [jboss-osgi-jmx] JMXConnectorServer started: service:jmx:rmi://localhost/jndi/rmi://localhost:1098/jmxconnector
-16:18:34,543 INFO  [jboss-osgi-jmx] MBeanServerConnection bound to: jmx/invoker/RMIAdaptor
-...
-16:18:34,544 INFO  [OSGiBootstrap] JBossOSGi Runtime started in 1.57sec
+    [tdiesler at tddell runtime]$ bin/run.sh
+    =========================================================================
+    
+      JBossOSGi Bootstrap Environment
+    
+      OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta2/runtime
+    
+      JAVA: /usr/java/jdk1.6/bin/java
+    
+      JAVA_OPTS: ...
+    
+    =========================================================================
+    
+    16:18:32,974 INFO  [FelixIntegration] OSGi Integration Felix - 1.0.0.Beta2
+    16:18:33,403 INFO  [FelixIntegration] Installed bundle [1]: org.osgi.compendium
+    16:18:33,412 INFO  [FelixIntegration] Installed bundle [2]: org.apache.felix.log
+    16:18:33,425 INFO  [FelixIntegration] Installed bundle [3]: jboss-osgi-common
+    16:18:33,435 INFO  [FelixIntegration] Installed bundle [4]: jboss-osgi-hotdeploy
+    16:18:33,550 INFO  [jboss-osgi-hotdeploy] Start DeploymentScanner: [scandir=server/default/bundles,interval=2000ms]
+    16:18:33,555 INFO  [OSGiBootstrap] JBossOSGi Runtime booted in 0.581sec
+    ...
+    16:18:33,617 INFO  [jboss-osgi-common] Installed: jboss-osgi-jndi [5]
+    16:18:33,627 INFO  [jboss-osgi-common] Installed: jboss-osgi-jmx [6]
+    16:18:33,659 INFO  [jboss-osgi-common] Installed: jboss-osgi-common-core [7]
+    ...
+    16:18:34,170 INFO  [jboss-osgi-jndi] JNDI started: JNP=localhost:1099, RMI=localhost:1098
+    16:18:34,543 INFO  [jboss-osgi-jmx] MBeanServerConnection bound to: jmx/invoker/RMIAdaptor
+    ...
+    16:18:34,544 INFO  [OSGiBootstrap] JBossOSGi Runtime started in 1.57sec
     </programlisting>
     
     <emphasis role="bold">Provided Examples</emphasis>
@@ -150,7 +148,9 @@
     <itemizedlist>
       <listitem><emphasis role="bold">HTTP Service</emphasis> - Register servlets and resources with the HTTP Service</listitem>
       <listitem><emphasis role="bold">Log Service</emphasis> - Interact with a local and remote Log Service</listitem>
-      <listitem><emphasis role="bold">Microcontainer Service</emphasis> - Register an MBean through the Microcontainer</listitem>
+      <listitem><emphasis role="bold">JMX Service</emphasis> - Register an MBean through the MBeanServer service</listitem>
+      <listitem><emphasis role="bold">JNDI Service</emphasis> - Bind/Unbind objects to/from JNDI</listitem>
+      <listitem><emphasis role="bold">Microcontainer Service</emphasis> - Call a service from an MC bean</listitem>
     </itemizedlist>
     
     <programlisting>
@@ -160,22 +160,33 @@
     [INFO]    task-segment: [package]
     [INFO] ------------------------------------------------------------------------
     ...
-    build-example-jars:
+    build-test-jars:
+    # example-http (example-http.jar) 4 
+    # example-jmx (example-jmx.jar) 4 
+    # example-jndi (example-jndi.jar) 1 
     # example-log (example-log.jar) 2 
-    # example-http (example-http.jar) 4 
-    # example-microcontainer (example-microcontainer.jar) 4
+    # example-mcservice-bundleA (example-mcservice-bundleA.jar) 2 
+    # example-mcservice-bundleB (example-mcservice-bundleB.jar) 3 
     ... 
+    Running org.jboss.test.osgi.example.microcontainer.MicrocontainerTestCase
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.418 sec
+    Running org.jboss.test.osgi.example.http.HttpServiceTestCase
+    Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.476 sec
     Running org.jboss.test.osgi.example.log.LogServiceTestCase
-    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.849 sec
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.312 sec
+    Running org.jboss.test.osgi.example.jndi.JNDITestCase
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.231 sec
+    Running org.jboss.test.osgi.example.jmx.JMXTestCase
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.517 sec
     </programlisting>
 
     <emphasis role="bold">Bundle Deployment</emphasis>
 
     <para>Bundle deployment works, as you would probably expect, by dropping your OSGi Bundle into the 
-    JBossOSGi Runtime <emphasis role="bold">deploy</emphasis> folder.</para>
+    JBossOSGi Runtime <emphasis role="bold">bundles</emphasis> folder.</para>
     
     <programlisting>
-    [tdiesler at tdvaio testsuite]$ cp .../test-libs/example/example-http.jar .../runtime/server/default/deploy
+    [tdiesler at tdvaio testsuite]$ cp .../test-libs/example/example-http.jar .../runtime/server/web/bundles
     ...
     13:59:38,284 INFO  [BundleRealDeployer] Installed: example-http [9]
     13:59:38,289 INFO  [example-http] BundleEvent INSTALLED

Modified: projects/jboss-osgi/trunk/docbook/en/modules/ch03-framework-integration.xml
===================================================================
--- projects/jboss-osgi/trunk/docbook/en/modules/ch03-framework-integration.xml	2009-06-02 16:35:11 UTC (rev 89678)
+++ projects/jboss-osgi/trunk/docbook/en/modules/ch03-framework-integration.xml	2009-06-02 16:41:48 UTC (rev 89679)
@@ -17,10 +17,39 @@
       <listitem><ulink url="http://felix.apache.org/site/apache-felix-configuration-admin-service.html">Config Admin Service</ulink> - Management of configuration data for configurable components</listitem>
     </itemizedlist>
 
-    <para>The Apache Felix integration can be configured through a <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans 
-    configuration</para>
+    <para>The Apache Felix integration can be configured through properties in the <link linkend="SecRuntime">JBossOSGi Runtime</link>.
+    </para>
     
     <programlisting role="XML"><![CDATA[
+    cat conf/jboss-osgi-framework.properties 
+    
+    # The OSGiFramework implementation 
+    org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+    
+    # Properties to configure the Framework
+    org.osgi.framework.storage=${osgi.server.home}/data/osgi-store
+    org.osgi.framework.storage.clean=onFirstInit
+    
+    # Hot Deployement
+    org.jboss.osgi.hotdeploy.scandir=${osgi.server.home}/bundles
+    
+    ...
+    
+    # Bundles that need to be installed with the Framework automatically 
+    org.jboss.osgi.spi.framework.autoInstall=\
+      file://${osgi.home}/server/minimal/bundles/org.osgi.compendium.jar
+    
+    # Bundles that need to be started automatically 
+    org.jboss.osgi.spi.framework.autoStart=\
+       file://${osgi.home}/server/minimal/bundles/org.apache.felix.log.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-common.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-hotdeploy.jar
+    ]]></programlisting>
+    
+    <para>In the <ulink url="http://www.jboss.org/jbossas">JBossAS</ulink> integration we use 
+    <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans configuration.</para>
+    
+    <programlisting role="XML"><![CDATA[
     cat server/default/deployers/osgi.deployer/META-INF/osgi-deployers-jboss-beans.xml 
     
     <deployment xmlns="urn:jboss:bean-deployer:2.0">
@@ -65,7 +94,7 @@
         <td>Config Admin Service storage area</td>
       </tr>
       <tr valign="top">
-        <td>org.osgi.framework.system.packages</td>
+        <td>org.osgi.framework.system.packages.extra</td>
         <td>javax.management, javax.xml...</td>
         <td>Packages provided by the OSGi System ClassLoader</td>
       </tr>
@@ -82,10 +111,38 @@
     
     <para>JBossOSGi also provides basic integration for the <ulink url="http://www.eclipse.org/equinox">Eclpipse Equinox</ulink> OSGi Framework.</para>
     
-    <para>Equinox integration can be configured through a <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans 
-    configuration</para>
+    <para>Equinox integration can be configured through properties in the <link linkend="SecRuntime">JBossOSGi Runtime</link>.</para>
     
     <programlisting role="XML"><![CDATA[
+    cat conf/jboss-osgi-framework.properties 
+    
+    # The OSGiFramework implementation 
+    org.jboss.osgi.spi.framework.impl=org.jboss.osgi.equinox.framework.EquinoxIntegration
+    
+    # Properties to configure the Framework
+    org.osgi.framework.storage=${osgi.server.home}/data/osgi-store
+    org.osgi.framework.storage.clean=onFirstInit
+    
+    # Hot Deployement
+    org.jboss.osgi.hotdeploy.scandir=${osgi.server.home}/bundles
+    
+    ...
+    
+    # Bundles that need to be installed with the Framework automatically 
+    org.jboss.osgi.spi.framework.autoInstall=\
+      file://${osgi.home}/server/minimal/bundles/org.osgi.compendium.jar
+    
+    # Bundles that need to be started automatically 
+    org.jboss.osgi.spi.framework.autoStart=\
+       file://${osgi.home}/server/minimal/bundles/org.apache.felix.log.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-common.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-hotdeploy.jar
+    ]]></programlisting>
+    
+    <para>In the <ulink url="http://www.jboss.org/jbossas">JBossAS</ulink> integration we use 
+    <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans configuration.</para>
+    
+    <programlisting role="XML"><![CDATA[
     <deployment xmlns="urn:jboss:bean-deployer:2.0">
     
       <!-- The OSGiFramework -->
@@ -110,10 +167,38 @@
     
     <para>JBossOSGi provides basic integration for the <ulink url="http://www.knopflerfish.org">Makewave Knopflerfish</ulink> OSGi Framework.</para>
 
-    <para>Knopflerfish integration can be configured through a <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans 
-    configuration</para>
+    <para>Knopflerfish integration can be configured through properties in the <link linkend="SecRuntime">JBossOSGi Runtime</link>.</para>
     
     <programlisting role="XML"><![CDATA[
+    cat conf/jboss-osgi-framework.properties 
+    
+    # The OSGiFramework implementation 
+    org.jboss.osgi.spi.framework.impl=org.jboss.osgi.knopflerfish.framework.KnopflerfishIntegration
+    
+    # Properties to configure the Framework
+    org.osgi.framework.storage=${osgi.server.home}/data/osgi-store
+    org.osgi.framework.storage.clean=onFirstInit
+    
+    # Hot Deployement
+    org.jboss.osgi.hotdeploy.scandir=${osgi.server.home}/bundles
+    
+    ...
+    
+    # Bundles that need to be installed with the Framework automatically 
+    org.jboss.osgi.spi.framework.autoInstall=\
+      file://${osgi.home}/server/minimal/bundles/org.osgi.compendium.jar
+    
+    # Bundles that need to be started automatically 
+    org.jboss.osgi.spi.framework.autoStart=\
+       file://${osgi.home}/server/minimal/bundles/org.apache.felix.log.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-common.jar \
+       file://${osgi.home}/server/minimal/bundles/jboss-osgi-hotdeploy.jar
+    ]]></programlisting>
+    
+    <para>In the <ulink url="http://www.jboss.org/jbossas">JBossAS</ulink> integration we use 
+    <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> beans configuration.</para>
+    
+    <programlisting role="XML"><![CDATA[
     <deployment xmlns="urn:jboss:bean-deployer:2.0">
     
       <!-- The OSGiFramework -->




More information about the jboss-cvs-commits mailing list