[jboss-cvs] JBossAS SVN: r88430 - in projects/jboss-osgi/trunk: build/distribution/runtime/conf and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 8 09:28:39 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-05-08 09:28:39 -0400 (Fri, 08 May 2009)
New Revision: 88430
Added:
projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-knopflerfish.properties
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java
Removed:
projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-framework.properties
projects/jboss-osgi/trunk/build/distribution/scripts/antrun-runtime.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java
Modified:
projects/jboss-osgi/trunk/build/distribution/pom.xml
projects/jboss-osgi/trunk/build/distribution/scripts/antrun-installer.xml
projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/test/java/org/jboss/test/osgi/knopflerfish/SystemBundleTestCase.java
Log:
Switch to new runtime
Modified: projects/jboss-osgi/trunk/build/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -260,20 +260,6 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>runtime</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="jboss501.home" value="${jboss501.home}" />
- <property name="project.version" value="${project.version}" />
- <ant antfile="scripts/antrun-runtime.xml" target="build-runtime" />
- </tasks>
- </configuration>
- </execution>
- <execution>
<id>izpack</id>
<phase>package</phase>
<goals>
Added: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-equinox.properties (rev 0)
+++ projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-equinox.properties 2009-05-08 13:28:39 UTC (rev 88430)
@@ -0,0 +1,78 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# 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.home}/data/osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# HTTP Service Port
+org.osgi.service.http.port=8090
+
+# Config Admin Service
+felix.cm.dir=${osgi.home}/data/osgi-configadmin
+
+# JMX bundle properties
+org.jboss.osgi.jmx.host=${jboss.bind.address}
+org.jboss.osgi.jmx.rmi.port=1098
+
+# JNDI bundle properties
+org.jboss.osgi.jndi.host=${jboss.bind.address}
+org.jboss.osgi.jndi.rmi.port=1098
+org.jboss.osgi.jndi.port=1099
+
+# Remote Logging
+org.jboss.osgi.service.remote.log.sender=true
+org.jboss.osgi.service.remote.log.host=${jboss.bind.address}
+org.jboss.osgi.service.remote.log.port=5400
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.net.protocol, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.logging, \
+ org.jboss.osgi.spi.management, \
+ org.jboss.virtual, \
+ org.jboss.virtual.plugins.registry, \
+ org.jboss.virtual.plugins.context.jar, \
+ org.jboss.virtual.plugins.vfs.helpers, \
+ org.jboss.virtual.protocol, \
+ org.apache.log4j, \
+ org.jboss.util, \
+ org.jboss.util.id, \
+ org.jboss.util.threadpool, \
+ org.jboss.util.propertyeditor
+
+# These are needed by jboss-remoting
+# org.apache.log4j, \
+# org.jboss.util, \
+# org.jboss.util.id, \
+# org.jboss.util.threadpool, \
+# org.jboss.util.propertyeditor
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${osgi.home}/bundles/org.eclipse.osgi.services.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${osgi.home}/bundles/org.apache.felix.log.jar \
+ file://${osgi.home}/bundles/apache-xerces-bundle.jar \
+ file://${osgi.home}/bundles/jboss-common-core-bundle.jar \
+ file://${osgi.home}/bundles/jaxb-bundle.jar \
+ file://${osgi.home}/bundles/jbossxb-bundle.jar \
+ file://${osgi.home}/bundles/jboss-osgi-common.jar \
+ file://${osgi.home}/bundles/jboss-osgi-logging.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jndi.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jmx.jar \
+ file://${osgi.home}/bundles/jboss-osgi-microcontainer.jar \
+ file://${osgi.home}/bundles/org.apache.felix.metatype.jar \
+ file://${osgi.home}/bundles/org.apache.felix.configadmin.jar \
+ file://${osgi.home}/bundles/org.apache.felix.http.jetty.jar \
+ file://${osgi.home}/bundles/jboss-osgi-webconsole.jar
Property changes on: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-equinox.properties
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-felix.properties (from rev 88426, projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-framework.properties)
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-felix.properties (rev 0)
+++ projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-felix.properties 2009-05-08 13:28:39 UTC (rev 88430)
@@ -0,0 +1,78 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id: $
+#
+
+# 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.home}/data/osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# HTTP Service Port
+org.osgi.service.http.port=8090
+
+# Config Admin Service
+felix.cm.dir=${osgi.home}/data/osgi-configadmin
+
+# JMX bundle properties
+org.jboss.osgi.jmx.host=${jboss.bind.address}
+org.jboss.osgi.jmx.rmi.port=1098
+
+# JNDI bundle properties
+org.jboss.osgi.jndi.host=${jboss.bind.address}
+org.jboss.osgi.jndi.rmi.port=1098
+org.jboss.osgi.jndi.port=1099
+
+# Remote Logging
+org.jboss.osgi.service.remote.log.sender=true
+org.jboss.osgi.service.remote.log.host=${jboss.bind.address}
+org.jboss.osgi.service.remote.log.port=5400
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.net.protocol, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.logging, \
+ org.jboss.osgi.spi.management, \
+ org.jboss.virtual, \
+ org.jboss.virtual.plugins.registry, \
+ org.jboss.virtual.plugins.context.jar, \
+ org.jboss.virtual.plugins.vfs.helpers, \
+ org.jboss.virtual.protocol, \
+ org.apache.log4j, \
+ org.jboss.util, \
+ org.jboss.util.id, \
+ org.jboss.util.threadpool, \
+ org.jboss.util.propertyeditor
+
+# These are needed by jboss-remoting
+# org.apache.log4j, \
+# org.jboss.util, \
+# org.jboss.util.id, \
+# org.jboss.util.threadpool, \
+# org.jboss.util.propertyeditor
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${osgi.home}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${osgi.home}/bundles/org.apache.felix.log.jar \
+ file://${osgi.home}/bundles/apache-xerces-bundle.jar \
+ file://${osgi.home}/bundles/jboss-common-core-bundle.jar \
+ file://${osgi.home}/bundles/jaxb-bundle.jar \
+ file://${osgi.home}/bundles/jbossxb-bundle.jar \
+ file://${osgi.home}/bundles/jboss-osgi-common.jar \
+ file://${osgi.home}/bundles/jboss-osgi-logging.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jndi.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jmx.jar \
+ file://${osgi.home}/bundles/jboss-osgi-microcontainer.jar \
+ file://${osgi.home}/bundles/org.apache.felix.metatype.jar \
+ file://${osgi.home}/bundles/org.apache.felix.configadmin.jar \
+ file://${osgi.home}/bundles/org.apache.felix.http.jetty.jar \
+ file://${osgi.home}/bundles/jboss-osgi-webconsole.jar
Deleted: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-framework.properties 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-framework.properties 2009-05-08 13:28:39 UTC (rev 88430)
@@ -1,78 +0,0 @@
-#
-# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
-#
-# $Id: $
-#
-
-# 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.home}/data/osgi-store
-org.osgi.framework.storage.clean=onFirstInit
-
-# HTTP Service Port
-org.osgi.service.http.port=8090
-
-# Config Admin Service
-felix.cm.dir=${osgi.home}/data/osgi-configadmin
-
-# JMX bundle properties
-org.jboss.osgi.jmx.host=${jboss.bind.address}
-org.jboss.osgi.jmx.rmi.port=1098
-
-# JNDI bundle properties
-org.jboss.osgi.jndi.host=${jboss.bind.address}
-org.jboss.osgi.jndi.rmi.port=1098
-org.jboss.osgi.jndi.port=1099
-
-# Remote Logging
-org.jboss.osgi.service.remote.log.sender=true
-org.jboss.osgi.service.remote.log.host=${jboss.bind.address}
-org.jboss.osgi.service.remote.log.port=5400
-
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
- org.jboss.logging, \
- org.jboss.net.protocol, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.logging, \
- org.jboss.osgi.spi.management, \
- org.jboss.virtual, \
- org.jboss.virtual.plugins.registry, \
- org.jboss.virtual.plugins.context.jar, \
- org.jboss.virtual.plugins.vfs.helpers, \
- org.jboss.virtual.protocol, \
- org.apache.log4j, \
- org.jboss.util, \
- org.jboss.util.id, \
- org.jboss.util.threadpool, \
- org.jboss.util.propertyeditor
-
-# These are needed by jboss-remoting
-# org.apache.log4j, \
-# org.jboss.util, \
-# org.jboss.util.id, \
-# org.jboss.util.threadpool, \
-# org.jboss.util.propertyeditor
-
-# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${osgi.home}/bundles/org.osgi.compendium.jar
-
-# Bundles that need to be started automatically
-org.jboss.osgi.spi.framework.autoStart=\
- file://${osgi.home}/bundles/org.apache.felix.log.jar \
- file://${osgi.home}/bundles/apache-xerces-bundle.jar \
- file://${osgi.home}/bundles/jboss-common-core-bundle.jar \
- file://${osgi.home}/bundles/jaxb-bundle.jar \
- file://${osgi.home}/bundles/jbossxb-bundle.jar \
- file://${osgi.home}/bundles/jboss-osgi-common.jar \
- file://${osgi.home}/bundles/jboss-osgi-logging.jar \
- file://${osgi.home}/bundles/jboss-osgi-jndi.jar \
- file://${osgi.home}/bundles/jboss-osgi-jmx.jar \
- file://${osgi.home}/bundles/jboss-osgi-microcontainer.jar \
- file://${osgi.home}/bundles/org.apache.felix.metatype.jar \
- file://${osgi.home}/bundles/org.apache.felix.configadmin.jar \
- file://${osgi.home}/bundles/org.apache.felix.http.jetty.jar \
- file://${osgi.home}/bundles/jboss-osgi-webconsole.jar
Added: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-knopflerfish.properties
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-knopflerfish.properties (rev 0)
+++ projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-knopflerfish.properties 2009-05-08 13:28:39 UTC (rev 88430)
@@ -0,0 +1,78 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# 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.home}/data/osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# HTTP Service Port
+org.osgi.service.http.port=8090
+
+# Config Admin Service
+felix.cm.dir=${osgi.home}/data/osgi-configadmin
+
+# JMX bundle properties
+org.jboss.osgi.jmx.host=${jboss.bind.address}
+org.jboss.osgi.jmx.rmi.port=1098
+
+# JNDI bundle properties
+org.jboss.osgi.jndi.host=${jboss.bind.address}
+org.jboss.osgi.jndi.rmi.port=1098
+org.jboss.osgi.jndi.port=1099
+
+# Remote Logging
+org.jboss.osgi.service.remote.log.sender=true
+org.jboss.osgi.service.remote.log.host=${jboss.bind.address}
+org.jboss.osgi.service.remote.log.port=5400
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.net.protocol, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.logging, \
+ org.jboss.osgi.spi.management, \
+ org.jboss.virtual, \
+ org.jboss.virtual.plugins.registry, \
+ org.jboss.virtual.plugins.context.jar, \
+ org.jboss.virtual.plugins.vfs.helpers, \
+ org.jboss.virtual.protocol, \
+ org.apache.log4j, \
+ org.jboss.util, \
+ org.jboss.util.id, \
+ org.jboss.util.threadpool, \
+ org.jboss.util.propertyeditor
+
+# These are needed by jboss-remoting
+# org.apache.log4j, \
+# org.jboss.util, \
+# org.jboss.util.id, \
+# org.jboss.util.threadpool, \
+# org.jboss.util.propertyeditor
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${osgi.home}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${osgi.home}/bundles/org.apache.felix.log.jar \
+ file://${osgi.home}/bundles/apache-xerces-bundle.jar \
+ file://${osgi.home}/bundles/jboss-common-core-bundle.jar \
+ file://${osgi.home}/bundles/jaxb-bundle.jar \
+ file://${osgi.home}/bundles/jbossxb-bundle.jar \
+ file://${osgi.home}/bundles/jboss-osgi-common.jar \
+ file://${osgi.home}/bundles/jboss-osgi-logging.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jndi.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jmx.jar \
+ file://${osgi.home}/bundles/jboss-osgi-microcontainer.jar \
+ file://${osgi.home}/bundles/org.apache.felix.metatype.jar \
+ file://${osgi.home}/bundles/org.apache.felix.configadmin.jar \
+ file://${osgi.home}/bundles/org.apache.felix.http.jetty.jar \
+ file://${osgi.home}/bundles/jboss-osgi-webconsole.jar
Property changes on: projects/jboss-osgi/trunk/build/distribution/runtime/conf/jboss-osgi-knopflerfish.properties
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/build/distribution/scripts/antrun-installer.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/scripts/antrun-installer.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/build/distribution/scripts/antrun-installer.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -22,14 +22,12 @@
<property name="deploy.artifacts.dir" value="${output.dir}/deploy-artifacts" />
<property name="deploy.artifacts.lib" value="${deploy.artifacts.dir}/lib" />
<property name="deploy.artifacts.resources" value="${deploy.artifacts.dir}/resources" />
- <property name="jboss.runtime.dir" value="${output.dir}/jboss-osgi-runtime-${product.version}" />
<property name="runtime.dir" value="${basedir}/runtime" />
<!-- ================================================================== -->
<!-- Initialization -->
<!-- ================================================================== -->
<target name="init">
- <available property="runtime.available" file="${jboss.runtime.dir}/bin/run.sh" type="file" />
</target>
<!-- ================================================================== -->
Deleted: projects/jboss-osgi/trunk/build/distribution/scripts/antrun-runtime.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/scripts/antrun-runtime.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/build/distribution/scripts/antrun-runtime.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -1,222 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-<project default="build-runtime" basedir="..">
-
- <!-- ================================================================== -->
- <!-- Setup -->
- <!-- ================================================================== -->
- <property name="output.dir" value="${basedir}/target" />
- <property name="jboss.overwrite.dir" value="${basedir}/src/main/etc/jboss501" />
-
- <property name="jboss.source.dir" value="${jboss501.home}" />
- <property name="jboss.source.server.dir" value="${jboss.source.dir}/server/default" />
-
- <property name="jboss.target.name" value="jboss-osgi-runtime-${project.version}" />
- <property name="jboss.target.dir" value="${output.dir}/${jboss.target.name}" />
- <property name="jboss.target.server.dir" value="${jboss.target.dir}/server/default" />
-
- <!-- ================================================================== -->
- <!-- Initialization -->
- <!-- ================================================================== -->
- <target name="init">
- <available property="jboss.source.dir.available" file="${jboss.source.dir}" type="dir"/>
- <mkdir dir="${jboss.target.dir}"/>
- </target>
-
-
- <!-- ================================================================== -->
- <!-- Distribution -->
- <!-- ================================================================== -->
- <target name="check-runtime-available" depends="init" unless="jboss.source.dir.available">
- <echo/>
- <echo>***************************************</echo>
- <echo>* *</echo>
- <echo>* Building Installer without Runtime! *</echo>
- <echo>* Please define: ${jboss501.home} *</echo>
- <echo>* *</echo>
- <echo>***************************************</echo>
- </target>
-
- <target name="build-runtime" depends="check-runtime-available" if="jboss.source.dir.available">
-
- <echo/>
- <echo message="JBoss Source: ${jboss.source.dir}"/>
- <echo message="JBoss Target: ${jboss.target.dir}"/>
- <echo/>
-
- <mkdir dir="${jboss.target.server.dir}/lib"/>
-
- <!-- BIN -->
- <copy todir="${jboss.target.dir}">
- <fileset dir="${jboss.source.dir}">
- <include name="bin/run.*"/>
- </fileset>
- </copy>
- <chmod perm="+x">
- <fileset dir="${jboss.target.dir}/bin">
- <include name="*.sh"/>
- </fileset>
- </chmod>
-
- <!-- COMMON/LIB -->
- <copy todir="${jboss.target.dir}">
- <fileset dir="${jboss.source.dir}">
- <include name="common/lib/commons-logging.jar"/>
- <include name="common/lib/jboss-bindingservice.jar"/>
- <include name="common/lib/jboss-integration.jar"/>
- <include name="common/lib/jboss-javaee.jar"/>
- <include name="common/lib/jboss-jsr88.jar"/>
- <include name="common/lib/jboss-metadata.jar"/>
- <include name="common/lib/jboss-remoting.jar"/>
- <include name="common/lib/jboss-security-spi.jar"/>
- <include name="common/lib/jboss-serialization.jar"/>
- <include name="common/lib/jbossjta-integration.jar"/>
- <include name="common/lib/jbossjta.jar"/>
- <include name="common/lib/jbosssx.jar"/>
- <include name="common/lib/jbossts-common.jar"/>
- <include name="common/lib/jboss.jar"/>
- <include name="common/lib/jmx-adaptor-plugin.jar"/>
- <include name="common/lib/jnpserver.jar"/>
- <include name="common/lib/log4j.jar"/>
- </fileset>
- </copy>
-
- <!-- LIB -->
- <copy todir="${jboss.target.dir}">
- <fileset dir="${jboss.source.dir}">
- <include name="lib/endorsed/activation.jar"/>
- <include name="lib/endorsed/jaxb-api.jar"/>
- <include name="lib/endorsed/resolver.jar"/>
- <include name="lib/endorsed/serializer.jar"/>
- <include name="lib/endorsed/stax-api.jar"/>
- <include name="lib/endorsed/xalan.jar"/>
- <include name="lib/endorsed/xercesImpl.jar"/>
- <include name="lib/concurrent.jar"/>
- <include name="lib/dom4j.jar"/>
- <include name="lib/javassist.jar"/>
- <include name="lib/jaxb-impl.jar"/>
- <include name="lib/jboss-aop-asintegration-core.jar"/>
- <include name="lib/jboss-aop-asintegration-jmx.jar"/>
- <include name="lib/jboss-aop-asintegration-mc.jar"/>
- <include name="lib/jboss-aop-jboss5.jar"/>
- <include name="lib/jboss-aop-mc-int.jar"/>
- <include name="lib/jboss-aop.jar"/>
- <include name="lib/jboss-bootstrap.jar"/>
- <include name="lib/jboss-classloader.jar"/>
- <include name="lib/jboss-classloading-spi.jar"/>
- <include name="lib/jboss-classloading-vfs.jar"/>
- <include name="lib/jboss-classloading.jar"/>
- <include name="lib/jboss-common-core.jar"/>
- <include name="lib/jboss-dependency.jar"/>
- <include name="lib/jboss-deployers-client-spi.jar"/>
- <include name="lib/jboss-deployers-client.jar"/>
- <include name="lib/jboss-deployers-core-spi.jar"/>
- <include name="lib/jboss-deployers-core.jar"/>
- <include name="lib/jboss-deployers-impl.jar"/>
- <include name="lib/jboss-deployers-spi.jar"/>
- <include name="lib/jboss-deployers-structure-spi.jar"/>
- <include name="lib/jboss-deployers-vfs-spi.jar"/>
- <include name="lib/jboss-deployers-vfs.jar"/>
- <include name="lib/jboss-j2se.jar"/>
- <include name="lib/jboss-jmx.jar"/>
- <include name="lib/jboss-kernel.jar"/>
- <include name="lib/jboss-logging-jdk.jar"/>
- <include name="lib/jboss-logging-log4j.jar"/>
- <include name="lib/jboss-logging-spi.jar"/>
- <include name="lib/jboss-managed.jar"/>
- <include name="lib/jboss-mbeans.jar"/>
- <include name="lib/jboss-mdr.jar"/>
- <include name="lib/jboss-metatype.jar"/>
- <include name="lib/jboss-profileservice-spi.jar"/>
- <include name="lib/jboss-reflect.jar"/>
- <include name="lib/jboss-system-jmx.jar"/>
- <include name="lib/jboss-system.jar"/>
- <include name="lib/jboss-vfs.jar"/>
- <include name="lib/jboss-xml-binding.jar"/>
- <include name="lib/log4j-boot.jar"/>
- <include name="lib/trove.jar"/>
- <include name="lib/wstx.jar"/>
- </fileset>
- </copy>
-
- <!-- CONF -->
- <copy todir="${jboss.target.server.dir}">
- <fileset dir="${jboss.source.server.dir}">
- <include name="conf/bootstrap/aop.xml"/>
- <include name="conf/bootstrap/bindings.xml"/>
- <include name="conf/bootstrap/classloader.xml"/>
- <include name="conf/bootstrap/deployers.xml"/>
- <include name="conf/bootstrap/jmx.xml"/>
- <include name="conf/bootstrap/profile.xml"/>
- <include name="conf/bootstrap/vfs.xml"/>
- <include name="conf/xmdesc/ClientUserTransaction-xmbean.xml"/>
- <include name="conf/xmdesc/Log4jService-xmbean.xml"/>
- <include name="conf/xmdesc/NamingBean-xmbean.xml"/>
- <include name="conf/xmdesc/NamingService-xmbean.xml"/>
- <include name="conf/xmdesc/org.jboss.deployment.JARDeployer-xmbean.xml"/>
- <include name="conf/xmdesc/org.jboss.deployment.MainDeployer-xmbean.xml"/>
- <include name="conf/java.policy"/>
- <include name="conf/jbossjta-properties.xml"/>
- <include name="conf/jndi.properties"/>
- </fileset>
- <fileset dir="${jboss.overwrite.dir}/server">
- <include name="conf/bootstrap.xml"/>
- <include name="conf/jboss-log4j.xml"/>
- <include name="conf/jboss-service.xml"/>
- </fileset>
- </copy>
-
- <!-- DEPLOY -->
- <copy todir="${jboss.target.server.dir}">
- <fileset dir="${jboss.source.server.dir}">
- <include name="deploy/jmx-remoting.sar/META-INF/jboss-service.xml"/>
- <include name="deploy/jmx-remoting.sar/jbossas-jmx-remoting.jar"/>
- <include name="deploy/hdscanner-jboss-beans.xml"/>
- <include name="deploy/jmx-invoker-service.xml"/>
- <include name="deploy/legacy-invokers-service.xml"/>
- <include name="deploy/remoting-jboss-beans.xml"/>
- <include name="deploy/transaction-jboss-beans.xml"/>
- <include name="deploy/transaction-service.xml"/>
- <include name="deploy/vfs-jboss-beans.xml"/>
- </fileset>
- </copy>
-
- <!-- DEPLOYERS
- <copy todir="${jboss.target.server.dir}">
- <fileset dir="${jboss.source.server.dir}">
- </fileset>
- </copy>
- -->
-
- <!-- OSGi
- <copy todir="${jboss.target.server.dir}">
- <fileset dir="${jboss.source.server.dir}">
- <include name="deploy/osgi/**"/>
- <include name="deployers/osgi.deployer/**"/>
- </fileset>
- </copy>
- -->
-
- <!-- ZIP the Runtime distribution -->
- <zip destfile="${jboss.target.dir}.zip" basedir="${output.dir}" includes="${jboss.target.name}/**"/>
-
- </target>
-
- <!-- ================================================================== -->
- <!-- Miscelaneous -->
- <!-- ================================================================== -->
- <target name="clean" depends="init">
- <delete dir="${jboss.target.dir}"/>
- </target>
-
-</project>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -67,10 +67,6 @@
<name>jbossSelection</name>
<value>jboss600</value>
</condition>
- <condition type="variable" id="installRuntime">
- <name>runtime.available</name>
- <value>true</value>
- </condition>
</conditions>
<!-- Panels -->
@@ -151,33 +147,32 @@
********************************
-->
- <pack name="JBossOSGi Runtime" required="no" preselected="yes" condition="installRuntime">
+ <pack name="JBossOSGi Runtime" required="no" preselected="yes">
- <description>Standalone JBossOSGi Runtime based on JBossAS</description>
+ <description>Standalone JBossOSGi Runtime</description>
- <!-- START: EXPERIMENTAL RUNTIME ****************************************************************** -->
-
<!-- JBossOSGi Bin -->
- <fileset dir="@{runtime.dir}/bin" targetdir="$INSTALL_PATH/runtime-new/bin" override="true"/>
- <executable targetfile="$INSTALL_PATH/runtime-new/bin/run.sh" stage="never" keep="true"/>
+ <fileset dir="@{runtime.dir}/bin" targetdir="$INSTALL_PATH/runtime/bin" override="true"/>
+ <executable targetfile="$INSTALL_PATH/runtime/bin/run.sh" stage="never" keep="true"/>
<!-- JBossOSGi conf -->
- <fileset dir="@{runtime.dir}/conf" targetdir="$INSTALL_PATH/runtime-new/conf" override="true"/>
+ <fileset dir="@{runtime.dir}/conf" targetdir="$INSTALL_PATH/runtime/conf" override="true">
+ <include name="org.jboss.osgi.spi.framework.OSGiBootstrapProvider" />
+ <include name="log4j.xml" />
+ </fileset>
<!-- JBossOSGi Lib -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime-new/lib" override="true">
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
<include name="jboss-common-core.jar" />
<include name="jboss-logging-spi.jar" />
<include name="jboss-logging-log4j.jar" />
- <include name="jboss-osgi-runtime-felix.jar" />
<include name="jboss-osgi-spi.jar" />
<include name="jboss-vfs.jar" />
<include name="log4j.jar" />
- <include name="org.apache.felix.framework.jar" />
</fileset>
<!-- JBossOSGi Bundles -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime-new/bundles" override="true">
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/bundles" override="true">
<include name="apache-xerces-bundle.jar" />
<include name="jaxb-bundle.jar" />
<include name="jbossxb-bundle.jar" />
@@ -192,71 +187,43 @@
<include name="org.apache.felix.http.jetty.jar" />
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
- <include name="org.osgi.compendium.jar" />
</fileset>
- <!-- END: EXPERIMENTAL RUNTIME ****************************************************************** -->
-
- <!-- JBossOSGi Runtime -->
- <fileset dir="@{jboss.runtime.dir}" targetdir="$INSTALL_PATH/runtime" override="true"/>
- <executable targetfile="$INSTALL_PATH/runtime/bin/run.sh" stage="never" keep="true"/>
-
- <!-- JBossOSGi Runtime deployers/osgi.deployer -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer" override="true">
- <include name="jboss-osgi-runtime-deployer.jar" />
- <include name="jboss-osgi-spi.jar" />
- </fileset>
-
- <!-- JBossOSGi Runtime deploy/osgi -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deploy/osgi" override="true">
- <include name="org.apache.felix.configadmin.jar" />
- <include name="org.apache.felix.http.jetty.jar" />
- <include name="org.apache.felix.log.jar" />
- <include name="org.apache.felix.metatype.jar" />
- <include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-logging.jar" />
- <include name="jboss-osgi-webconsole.jar" />
- </fileset>
-
<!-- Felix Integration -->
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer" override="true">
+ <!-- condition="isFelix" -->
+ <singlefile src="@{runtime.dir}/conf/jboss-osgi-felix.properties" target="$INSTALL_PATH/runtime/conf/jboss-osgi-framework.properties" override="true"/>
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
<include name="jboss-osgi-runtime-felix.jar" />
<include name="org.apache.felix.framework.jar" />
- <include name="org.osgi.core.jar" />
</fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/resources/jboss-osgi-runtime-felix" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer/META-INF" override="true">
- <include name="osgi-deployers-jboss-beans.xml" />
- </fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deploy/osgi" override="true">
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/bundles" override="true">
<include name="org.osgi.compendium.jar" />
</fileset>
- <!-- Equinox Integration -->
+ <!-- Equinox Integration
- <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer" override="true">
+ <singlefile condition="isEquinox" src="@{runtime.dir}/conf/jboss-osgi-equinox.properties" target="$INSTALL_PATH/runtime/conf/jboss-osgi-framework.properties" override="true"/>
+ <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
<include name="jboss-osgi-runtime-equinox.jar" />
<include name="org.eclipse.osgi.jar" />
</fileset>
- <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/resources/jboss-osgi-runtime-equinox" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer/META-INF" override="true">
- <include name="osgi-deployers-jboss-beans.xml" />
- </fileset>
- <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deploy/osgi" override="true">
+ <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/bundles" override="true">
<include name="org.eclipse.osgi.services.jar" />
</fileset>
+ -->
- <!-- Knopflerfish Integration -->
+ <!-- Knopflerfish Integration
- <fileset condition="isKnopflerfish" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer" override="true">
+ <singlefile condition="isKnopflerfish" src="@{runtime.dir}/conf/jboss-osgi-knopflerfish.properties" target="$INSTALL_PATH/runtime/conf/jboss-osgi-framework.properties" override="true"/>
+ <fileset condition="isKnopflerfish" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
<include name="jboss-osgi-runtime-knopflerfish.jar" />
<include name="org.knopflerfish.framework.jar" />
</fileset>
- <fileset condition="isKnopflerfish" dir="@{deploy.artifacts.dir}/resources/jboss-osgi-runtime-knopflerfish" targetdir="$INSTALL_PATH/runtime/server/default/deployers/osgi.deployer/META-INF" override="true">
- <include name="osgi-deployers-jboss-beans.xml" />
- </fileset>
- <fileset condition="isKnopflerfish" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/default/deploy/osgi" override="true">
+ <fileset condition="isKnopflerfish" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/bundles" override="true">
<include name="org.osgi.compendium.jar" />
</fileset>
+ -->
</pack>
Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java 2009-05-08 13:28:39 UTC (rev 88430)
@@ -89,6 +89,7 @@
public Bundle getBundle()
{
+ assertFrameworkStart();
return framework.getBundle(0);
}
@@ -127,6 +128,19 @@
framework.launch();
}
+ private void assertFrameworkCreate()
+ {
+ if (framework == null)
+ create();
+ }
+
+ private void assertFrameworkStart()
+ {
+ assertFrameworkCreate();
+ if ((framework.getBundle(0).getState() & Bundle.ACTIVE) == 0)
+ start();
+ }
+
public void start()
{
// Get system bundle context
Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -12,17 +12,14 @@
<entry><key>osgi.install.area</key><value>${jboss.server.data.dir}/equinox</value></entry>
<entry><key>felix.cm.dir</key><value>${jboss.server.data.dir}/osgi-configadmin</value></entry>
<entry>
- <key>org.osgi.framework.system.packages</key>
+ <key>org.osgi.framework.system.packages.extra</key>
<value>
- javax.management,
- javax.xml.parsers,
org.jboss.logging,
org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
org.osgi.service.startlevel; version=1.1,
- org.xml.sax
</value>
</entry>
<!--
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-05-08 13:28:39 UTC (rev 88430)
@@ -93,7 +93,6 @@
public BundleContext getBundleContext()
{
- assertFrameworkStart();
return getBundle().getBundleContext();
}
Deleted: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java 2009-05-08 13:28:39 UTC (rev 88430)
@@ -1,209 +0,0 @@
-/*
- * 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.knopflerfish;
-
-//$Id$
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.knopflerfish.framework.Framework;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * The OSGiFramework for Makewave Knopflerfish
- *
- * @author thomas.diesler at jboss.com
- * @since 06-Apr-2009
- */
-public class KnopflerfishIntegration implements OSGiFramework
-{
- // Provide logging
- final Logger log = Logger.getLogger(KnopflerfishIntegration.class);
-
- private Map<String, Object> properties = new HashMap<String, Object>();
- private List<URL> autoInstall = new ArrayList<URL>();
- private List<URL> autoStart = new ArrayList<URL>();
-
- private Framework framework;
-
- public Map<String, Object> getProperties()
- {
- return properties;
- }
-
- public void setProperties(Map<String, Object> props)
- {
- this.properties = props;
- }
-
- public List<URL> getAutoInstall()
- {
- return autoInstall;
- }
-
- public void setAutoInstall(List<URL> autoInstall)
- {
- this.autoInstall = autoInstall;
- }
-
- public List<URL> getAutoStart()
- {
- return autoStart;
- }
-
- public void setAutoStart(List<URL> autoStart)
- {
- this.autoStart = autoStart;
- }
-
- public Bundle getBundle()
- {
- return framework.getSystemBundleContext().getBundle();
- }
-
- public BundleContext getBundleContext()
- {
- return getBundle().getBundleContext();
- }
-
- public void create()
- {
- String implVersion = getClass().getPackage().getImplementationVersion();
- log.info("OSGi Integration Knopflerfish - " + implVersion);
-
- // Push configured props to FrameworkProperties
- Iterator<String> itKeys = properties.keySet().iterator();
- while (itKeys.hasNext())
- {
- String key = itKeys.next();
- Object value = properties.get(key);
- if (value instanceof String)
- {
- Framework.setProperty(key, (String)value);
- }
- }
-
- // Prevent a NPE when the config area is not set
- if (Framework.getProperty("org.osgi.framework.dir") == null)
- {
- String userHome = Framework.getProperty("user.home");
- Framework.setProperty("org.osgi.framework.dir", userHome + "/knopflerfish");
- }
-
- // Cannot disable REGISTERSERVICEURLHANDLER
- // https://sourceforge.net/tracker/?func=detail&aid=2737425&group_id=82798&atid=567241
- //
- // java.lang.Error: factory already defined
- // at java.net.URL.setURLStreamHandlerFactory(URL.java:1076)
- // at org.knopflerfish.framework.Framework.<init>(Framework.java:353)
- PrintStream sysOut = System.out;
- System.setOut(new PrintStream(new ByteArrayOutputStream()));
- PrintStream sysErr = System.err;
- System.setErr(new PrintStream(new ByteArrayOutputStream()));
-
- // Init & Start the Framework
- try
- {
- framework = new Framework(null);
- framework.launch(0);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new FrameworkException("Cannot initialze system bundle", ex);
- }
- finally
- {
- System.setOut(sysOut);
- System.setErr(sysErr);
- }
- }
-
- public void start()
- {
- // Get system bundle context
- BundleContext context = getBundleContext();
- if (context == null)
- throw new FrameworkException("Cannot obtain system context");
-
- Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
-
- // Add the autoStart bundles to autoInstall
- for (URL bundleURL : autoStart)
- {
- autoInstall.add(bundleURL);
- }
-
- // Install autoInstall bundles
- for (URL bundleURL : autoInstall)
- {
- try
- {
- Bundle bundle = context.installBundle(bundleURL.toString());
- log.info("Installed bundle: " + bundle.getSymbolicName());
- autoBundles.put(bundleURL, bundle);
- }
- catch (BundleException ex)
- {
- log.error("Cannot install bundle: " + bundleURL, ex);
- }
- }
-
- // Start autoStart bundles
- for (URL bundleURL : autoStart)
- {
- try
- {
- Bundle bundle = autoBundles.get(bundleURL);
- bundle.start();
- log.info("Started bundle: " + bundle.getSymbolicName());
- }
- catch (BundleException ex)
- {
- log.error("Cannot start bundle: " + bundleURL, ex);
- }
- }
- }
-
- public void stop()
- {
- if (framework != null)
- {
- framework.shutdown();
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java (from rev 88424, projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java)
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java 2009-05-08 13:28:39 UTC (rev 88430)
@@ -0,0 +1,223 @@
+/*
+ * 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.knopflerfish.framework;
+
+//$Id$
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.osgi.spi.FrameworkException;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.knopflerfish.framework.Framework;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * The OSGiFramework for Makewave Knopflerfish
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 06-Apr-2009
+ */
+public class KnopflerfishIntegration implements OSGiFramework
+{
+ // Provide logging
+ final Logger log = Logger.getLogger(KnopflerfishIntegration.class);
+
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private List<URL> autoInstall = new ArrayList<URL>();
+ private List<URL> autoStart = new ArrayList<URL>();
+
+ private Framework framework;
+
+ public Map<String, Object> getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ this.properties = props;
+ }
+
+ public List<URL> getAutoInstall()
+ {
+ return autoInstall;
+ }
+
+ public void setAutoInstall(List<URL> autoInstall)
+ {
+ this.autoInstall = autoInstall;
+ }
+
+ public List<URL> getAutoStart()
+ {
+ return autoStart;
+ }
+
+ public void setAutoStart(List<URL> autoStart)
+ {
+ this.autoStart = autoStart;
+ }
+
+ public Bundle getBundle()
+ {
+ assertFrameworkStart();
+ return framework.getSystemBundleContext().getBundle();
+ }
+
+ public BundleContext getBundleContext()
+ {
+ return getBundle().getBundleContext();
+ }
+
+ private void assertFrameworkCreate()
+ {
+ if (framework == null)
+ create();
+ }
+
+ private void assertFrameworkStart()
+ {
+ assertFrameworkCreate();
+ if ((framework.getSystemBundleContext().getBundle().getState() & Bundle.ACTIVE) == 0)
+ start();
+ }
+
+ public void create()
+ {
+ String implVersion = getClass().getPackage().getImplementationVersion();
+ log.info("OSGi Integration Knopflerfish - " + implVersion);
+
+ // Push configured props to FrameworkProperties
+ Iterator<String> itKeys = properties.keySet().iterator();
+ while (itKeys.hasNext())
+ {
+ String key = itKeys.next();
+ Object value = properties.get(key);
+ if (value instanceof String)
+ {
+ Framework.setProperty(key, (String)value);
+ }
+ }
+
+ // Prevent a NPE when the config area is not set
+ if (Framework.getProperty("org.osgi.framework.dir") == null)
+ {
+ String userHome = Framework.getProperty("user.home");
+ Framework.setProperty("org.osgi.framework.dir", userHome + "/knopflerfish");
+ }
+
+ // Cannot disable REGISTERSERVICEURLHANDLER
+ // https://sourceforge.net/tracker/?func=detail&aid=2737425&group_id=82798&atid=567241
+ //
+ // java.lang.Error: factory already defined
+ // at java.net.URL.setURLStreamHandlerFactory(URL.java:1076)
+ // at org.knopflerfish.framework.Framework.<init>(Framework.java:353)
+ PrintStream sysOut = System.out;
+ System.setOut(new PrintStream(new ByteArrayOutputStream()));
+ PrintStream sysErr = System.err;
+ System.setErr(new PrintStream(new ByteArrayOutputStream()));
+
+ // Init & Start the Framework
+ try
+ {
+ framework = new Framework(null);
+ framework.launch(0);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new FrameworkException("Cannot initialze system bundle", ex);
+ }
+ finally
+ {
+ System.setOut(sysOut);
+ System.setErr(sysErr);
+ }
+ }
+
+ public void start()
+ {
+ // Get system bundle context
+ BundleContext context = getBundleContext();
+ if (context == null)
+ throw new FrameworkException("Cannot obtain system context");
+
+ Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
+
+ // Add the autoStart bundles to autoInstall
+ for (URL bundleURL : autoStart)
+ {
+ autoInstall.add(bundleURL);
+ }
+
+ // Install autoInstall bundles
+ for (URL bundleURL : autoInstall)
+ {
+ try
+ {
+ Bundle bundle = context.installBundle(bundleURL.toString());
+ log.info("Installed bundle: " + bundle.getSymbolicName());
+ autoBundles.put(bundleURL, bundle);
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot install bundle: " + bundleURL, ex);
+ }
+ }
+
+ // Start autoStart bundles
+ for (URL bundleURL : autoStart)
+ {
+ try
+ {
+ Bundle bundle = autoBundles.get(bundleURL);
+ bundle.start();
+ log.info("Started bundle: " + bundle.getSymbolicName());
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot start bundle: " + bundleURL, ex);
+ }
+ }
+ }
+
+ public void stop()
+ {
+ if (framework != null)
+ {
+ framework.shutdown();
+ }
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-08 13:28:39 UTC (rev 88430)
@@ -3,7 +3,7 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- The OSGiFramework -->
- <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.knopflerfish.KnopflerfishIntegration">
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.knopflerfish.framework.KnopflerfishIntegration">
<property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
@@ -11,17 +11,14 @@
<entry><key>org.osgi.framework.dir</key><value>${jboss.server.data.dir}/knopflerfish</value></entry>
<entry><key>felix.cm.dir</key><value>${jboss.server.data.dir}/osgi-configadmin</value></entry>
<entry>
- <key>org.osgi.framework.system.packages</key>
+ <key>org.osgi.framework.system.packages.extra</key>
<value>
- javax.management,
- javax.xml.parsers,
org.jboss.logging,
org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
org.osgi.service.startlevel; version=1.1,
- org.xml.sax
</value>
</entry>
<!--
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/test/java/org/jboss/test/osgi/knopflerfish/SystemBundleTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/test/java/org/jboss/test/osgi/knopflerfish/SystemBundleTestCase.java 2009-05-08 13:28:23 UTC (rev 88429)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/test/java/org/jboss/test/osgi/knopflerfish/SystemBundleTestCase.java 2009-05-08 13:28:39 UTC (rev 88430)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.knopflerfish.KnopflerfishIntegration;
+import org.jboss.osgi.knopflerfish.framework.KnopflerfishIntegration;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.jboss.osgi.spi.framework.OSGiFramework;
More information about the jboss-cvs-commits
mailing list