JBoss-OSGI SVN: r87573 - in projects/jboss-osgi/trunk/build: docbook/en and 6 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-20 09:13:09 -0400 (Mon, 20 Apr 2009)
New Revision: 87573
Added:
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-installpath.png
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-framework.png
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-server.png
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-verify.png
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-welcome.png
projects/jboss-osgi/trunk/build/docbook/src/
projects/jboss-osgi/trunk/build/docbook/src/main/
projects/jboss-osgi/trunk/build/docbook/src/main/resources/
projects/jboss-osgi/trunk/build/docbook/src/main/resources/bookinfo.xml
Removed:
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-installpath.jpg
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-server.jpg
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-verify.jpg
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-welcome.jpg
Modified:
projects/jboss-osgi/trunk/build/docbook/en/images/hudson-home.png
projects/jboss-osgi/trunk/build/docbook/en/images/izpack-structure.jpg
projects/jboss-osgi/trunk/build/docbook/en/master.xml
projects/jboss-osgi/trunk/build/docbook/en/modules/devguide.xml
projects/jboss-osgi/trunk/build/docbook/en/modules/frameworkintegration.xml
projects/jboss-osgi/trunk/build/docbook/en/modules/gettingstarted.xml
projects/jboss-osgi/trunk/build/docbook/pom.xml
projects/jboss-osgi/trunk/build/hudson/ant.properties.example
Log:
Update userguide
Modified: projects/jboss-osgi/trunk/build/docbook/en/images/hudson-home.png
===================================================================
(Binary files differ)
Deleted: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-installpath.jpg
===================================================================
(Binary files differ)
Added: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-installpath.png
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-installpath.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-structure.jpg
===================================================================
(Binary files differ)
Added: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-framework.png
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-framework.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-server.jpg
===================================================================
(Binary files differ)
Added: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-server.png
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-target-server.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-verify.jpg
===================================================================
(Binary files differ)
Added: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-verify.png
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-verify.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-welcome.jpg
===================================================================
(Binary files differ)
Added: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-welcome.png
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/trunk/build/docbook/en/images/izpack-welcome.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: projects/jboss-osgi/trunk/build/docbook/en/master.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/en/master.xml 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/docbook/en/master.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -2,50 +2,20 @@
$Id$
-->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"../dtd/docbookx.dtd" [
-<!ENTITY ChapIntroduction SYSTEM "modules/introduction.xml">
-<!ENTITY ChapGettingStarted SYSTEM "modules/gettingstarted.xml">
-<!ENTITY ChapFrameworkIntegration SYSTEM "modules/frameworkintegration.xml">
-<!ENTITY ChapDeveloperGuide SYSTEM "modules/devguide.xml">
-<!ENTITY ChapProvidedServices SYSTEM "modules/providedservices.xml">
-<!ENTITY ChapReferences SYSTEM "modules/references.xml">
-<!ENTITY ChapGettingSupport SYSTEM "modules/gettingsupport.xml">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN" "../dtd/docbookx.dtd">
-<!--
- Maven build steps do not include 'process-resources'
- https://jira.jboss.org/jira/browse/MPJDOCBOOK-30
--->
-<!ENTITY version "1.0.0.Alpha3">
-<!ENTITY pubdate "26-Mar-2009">
-]>
+<book lang="en" xmlns:xi="http://www.w3.org/2001/XInclude">
-<book lang="en">
- <bookinfo>
- <title>JBossOSGi - User Guide</title>
- <releaseinfo>Version: &version;</releaseinfo>
- <pubdate>Date: &pubdate;</pubdate>
-
- <!--
- <author>
- <firstname>Thomas</firstname>
- <surname>Diesler</surname>
- <email>thomas.diesler(a)jboss.com</email>
- <affiliation>
- <orgname>JBoss, a division of Red Hat</orgname>
- </affiliation>
- </author>
- -->
- </bookinfo>
+ <xi:include href="../target/docbook/resources/bookinfo.xml"/>
<toc/>
- &ChapIntroduction;
- &ChapGettingStarted;
- &ChapFrameworkIntegration;
- &ChapDeveloperGuide;
- &ChapProvidedServices;
- &ChapGettingSupport;
- &ChapReferences;
+ <xi:include href="modules/introduction.xml"/>
+ <xi:include href="modules/gettingstarted.xml"/>
+ <xi:include href="modules/frameworkintegration.xml"/>
+ <xi:include href="modules/devguide.xml"/>
+ <xi:include href="modules/providedservices.xml"/>
+ <xi:include href="modules/references.xml"/>
+ <xi:include href="modules/gettingsupport.xml"/>
</book>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/build/docbook/en/modules/devguide.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/en/modules/devguide.xml 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/docbook/en/modules/devguide.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -18,15 +18,14 @@
</imageobject>
</mediaobject>
- <para>The latest version of the <ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc">JBossOSGi SPI</ulink>
+ <para>The latest version of the <ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc">JBossOSGi SPI</ulink>
JavaDoc is published online as part of the JBossOSGi <ulink url="http://jbmuc.dyndns.org:8280/hudson">Hudson QA Environment</ulink>.</para>
<itemizedlist>
- <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.service</ulink> - A collection of SPI provided services.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.spi</ulink> - Common classes and interfaces.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.spi.framework</ulink> - OSGi framework integration and bootstrap.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.spi.junit</ulink> - JUnit test integration.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.spi.management</ulink> - Management view on deployed bundles.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc/org/jboss...">org.jboss.osgi.service</ulink> - A collection of SPI provided services.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc/org/jboss...">org.jboss.osgi.spi</ulink> - Common classes and interfaces.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc/org/jboss...">org.jboss.osgi.spi.framework</ulink> - OSGi framework integration and bootstrap.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc/org/jboss...">org.jboss.osgi.spi.management</ulink> - Management view on deployed bundles.</listitem>
</itemizedlist>
<emphasis role="bold">Bootstrapping JBossOSGi</emphasis>
@@ -249,7 +248,7 @@
<emphasis role="bold">Accessing the Management Objects</emphasis>
<para>If you work with the JBossOSGi Testsuite you get access to the Managed Objects through the JBossOSGi SPI provided
- <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org:8280/hudson/job/Container-JDK1.6/javadoc/org/jbos...">org.jboss.osgi.spi.junit</ulink>.
+ <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/javadoc/org/jboss...">org.jboss.osgi.spi.junit</ulink>.
</para>
<para>If you install JBossOSGi in an already existing JBossAS instance you also get access to the Managed Objects through the JBoss provided
Modified: projects/jboss-osgi/trunk/build/docbook/en/modules/frameworkintegration.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/en/modules/frameworkintegration.xml 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/docbook/en/modules/frameworkintegration.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -12,7 +12,7 @@
of its core services</para>
<itemizedlist>
- <listitem>Log Service - General purpose message logger</listitem>
+ <listitem><ulink url="http://felix.apache.org/site/apache-felix-log-service.html">Log Service</ulink> - General purpose message logger</listitem>
<listitem><ulink url="http://felix.apache.org/site/apache-felix-http-service.html">HTTP Service</ulink> - Http access to servlets and resources</listitem>
<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>
@@ -27,11 +27,11 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
- <property name="felixProperties">
+ <property name="properties">
...
</property>
<property name="autoStart">
- <list elementClass="java.net.URI">
+ <list elementClass="java.net.URL">
...
</list>
</property>
@@ -80,17 +80,57 @@
<sect1 xml:id="SecIntEquinox">
<title>Equinox Integration</title>
- <note>
- <title>TODO: Provide and document Equinox Integration</title>
- </note>
+ <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>
+
+ <programlisting role="XML"><![CDATA[
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- The OSGiFramework -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.equinox.framework.EquinoxIntegration">
+ <property name="properties">
+ ...
+ </property>
+ <property name="autoStart">
+ <list elementClass="java.net.URL">
+ ...
+ </list>
+ </property>
+ </bean>
+ ...
+ </deployment>
+ ]]></programlisting>
+
</sect1>
<sect1 xml:id="SecIntKnopflerfish">
<title>Knopflerfish Integration</title>
- <note>
- <title>TODO: Provide and document Knopflerfish Integration</title>
- </note>
+ <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>
+
+ <programlisting role="XML"><![CDATA[
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- The OSGiFramework -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.knopflerfish.KnopflerfishIntegration">
+ <property name="properties">
+ ...
+ </property>
+ <property name="autoStart">
+ <list elementClass="java.net.URL">
+ ...
+ </list>
+ </property>
+ </bean>
+ ...
+ </deployment>
+ ]]></programlisting>
+
</sect1>
</chapter>
Modified: projects/jboss-osgi/trunk/build/docbook/en/modules/gettingstarted.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/en/modules/gettingstarted.xml 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/docbook/en/modules/gettingstarted.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -16,15 +16,17 @@
<para>To run the installer execute the following command:</para>
+ <!-- [TODO] release update -->
<programlisting>
- java -jar jboss-osgi-installer-1.0.0.Alpha3.jar
+ java -jar jboss-osgi-installer-1.0.0.Beta1.jar
</programlisting>
<para>The installer first shows a welcome screen</para>
+ <!-- [TODO] release update -->
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack-welcome.jpg"/>
+ <imagedata fileref="images/izpack-welcome.png"/>
</imageobject>
</mediaobject>
@@ -33,7 +35,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack-installpath.jpg"/>
+ <imagedata fileref="images/izpack-installpath.png"/>
</imageobject>
</mediaobject>
@@ -51,11 +53,19 @@
<listitem><emphasis role="bold">JBossOSGi Integration</emphasis> - Integration with an existing JBossAS instance</listitem>
</itemizedlist>
+ <para>Next, you will be presented with the choice of supported OSGi Frameworks.</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/izpack-target-framework.png"/>
+ </imageobject>
+ </mediaobject>
+
<para>In case you have selected 'JBossOSGi Integration', you will be presented with the choice of supported target containers.</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack-target-server.jpg"/>
+ <imagedata fileref="images/izpack-target-server.png"/>
</imageobject>
</mediaobject>
@@ -71,7 +81,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack-verify.jpg"/>
+ <imagedata fileref="images/izpack-verify.png"/>
</imageobject>
</mediaobject>
@@ -107,7 +117,7 @@
JBoss Bootstrap Environment
- JBOSS_HOME: /usr/java/jboss-osgi-1.0.0.Alpha3/runtime
+ JBOSS_HOME: /usr/java/jboss-osgi-1.0.0.Beta1/runtime
...
@@ -115,7 +125,7 @@
14:43:43,598 INFO [ServerImpl] Starting JBoss (Microcontainer)...
...
- 14:43:52,298 INFO [FelixIntegration] OSGi Integration Felix - 1.0.0.Alpha3
+ 14:43:52,298 INFO [FelixIntegration] OSGi Integration Felix - 1.0.0.Beta1
14:43:52,692 INFO [FelixIntegration] Installed bundle: org.osgi.compendium
14:43:52,700 INFO [FelixIntegration] Installed bundle: org.jboss.osgi.service.logging
14:43:52,701 INFO [FelixIntegration] Started bundle: org.osgi.compendium
@@ -130,27 +140,48 @@
14:43:55,250 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA ...] <emphasis role="bold">Started in 11s:645ms</emphasis>
</programlisting>
+ <emphasis role="bold">Provided Examples</emphasis>
+
+ <para>JBossOSGi comes with a number of examples that you can build and deploy. Each example
+ deployment is verified by an accompaning test case</para>
+
+ <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>
+ </itemizedlist>
+ <programlisting>
+ [tdiesler@tddell example]$ mvn package
+ [INFO] ------------------------------------------------------------------------
+ [INFO] Building JBossOSGi - Testsuite Examples
+ [INFO] task-segment: [package]
+ [INFO] ------------------------------------------------------------------------
+ ...
+ build-example-jars:
+ # example-log (example-log.jar) 2
+ # example-http (example-http.jar) 4
+ # example-microcontainer (example-microcontainer.jar) 4
+ ...
+ Running org.jboss.test.osgi.example.log.LogServiceTestCase
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.849 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>
<programlisting>
- [tdiesler@tdvaio testsuite]$ cp .../test-libs/jbosgi36-bundle.jar .../runtime/server/default/deploy
+ [tdiesler@tdvaio testsuite]$ cp .../test-libs/example/example-http.jar .../runtime/server/default/deploy
...
- 15:11:50,490 INFO [OSGiDeployer] Installed: jbosgi36 [9][INSTALLED]
- 15:11:50,491 INFO [jbosgi36] BundleEvent INSTALLED
- 15:11:50,511 INFO [jbosgi36] BundleEvent RESOLVED
- 15:11:50,513 INFO [jbosgi36] ServiceEvent REGISTERED
- 15:11:50,514 INFO [jbosgi36] BundleEvent STARTED
- 15:11:50,514 INFO [BundleStartStopDeployer] Started: jbosgi36 [9][ACTIVE]
+ 13:59:38,284 INFO [BundleRealDeployer] Installed: example-http [9]
+ 13:59:38,289 INFO [example-http] BundleEvent INSTALLED
+ 13:59:38,297 INFO [example-http] BundleEvent RESOLVED
+ 13:59:38,304 INFO [example-http] ServiceEvent REGISTERED
+ 13:59:38,306 INFO [BundleStartStopDeployer] Started: example-http [9]
+ 13:59:38,306 INFO [example-http] BundleEvent STARTED
</programlisting>
-
- <note>
- <title>TODO: Provide example bundles and use them here</title>
- </note>
-
<emphasis role="bold">Managing installed Bundles</emphasis>
@@ -208,9 +239,6 @@
cp ant.properties.example ant.properties
vi ant.properties
- # JBoss remote repository
- jboss.repository=http://repository.jboss.org
-
# The JBoss settings
jboss.server.instance=default
jboss.bind.address=127.0.0.1
@@ -250,7 +278,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Alpha3
+ [echo] V1.0.0.Beta1
init-hudson:
[echo]
@@ -278,7 +306,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Alpha3
+ [echo] V1.0.0.Beta1
init-hudson:
[echo]
@@ -304,7 +332,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Alpha3
+ [echo] V1.0.0.Beta1
init-hudson:
[echo]
Modified: projects/jboss-osgi/trunk/build/docbook/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/pom.xml 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/docbook/pom.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -29,17 +29,45 @@
<!-- Plugins -->
<build>
- <!--
- Maven build steps do not include 'process-resources'
- https://jira.jboss.org/jira/browse/MPJDOCBOOK-30
- -->
<resources>
<resource>
- <directory>en</directory>
+ <directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <format>{0,date,dd-MMM-yyyy}</format>
+ <items>
+ <item>timestamp</item>
+ </items>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/docbook/resources</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!--
Maven JDocbook Plugin
http://www.jboss.org/maven-jdocbook-plugin
@@ -47,8 +75,6 @@
Broken links on project page
https://jira.jboss.org/jira/browse/MPJDOCBOOK-29
-
-
mvn jdocbook:generate
mvn jdocbook:bundle
-->
Added: projects/jboss-osgi/trunk/build/docbook/src/main/resources/bookinfo.xml
===================================================================
--- projects/jboss-osgi/trunk/build/docbook/src/main/resources/bookinfo.xml (rev 0)
+++ projects/jboss-osgi/trunk/build/docbook/src/main/resources/bookinfo.xml 2009-04-20 13:13:09 UTC (rev 87573)
@@ -0,0 +1,20 @@
+<!--
+ $Id$
+-->
+
+ <bookinfo>
+ <title>JBossOSGi - User Guide</title>
+ <releaseinfo>Version: ${version}</releaseinfo>
+ <pubdate>Date: ${buildNumber}</pubdate>
+
+ <!--
+ <author>
+ <firstname>Thomas</firstname>
+ <surname>Diesler</surname>
+ <email>thomas.diesler(a)jboss.com</email>
+ <affiliation>
+ <orgname>JBoss, a division of Red Hat</orgname>
+ </affiliation>
+ </author>
+ -->
+ </bookinfo>
Property changes on: projects/jboss-osgi/trunk/build/docbook/src/main/resources/bookinfo.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/build/hudson/ant.properties.example
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/ant.properties.example 2009-04-20 12:17:51 UTC (rev 87572)
+++ projects/jboss-osgi/trunk/build/hudson/ant.properties.example 2009-04-20 13:13:09 UTC (rev 87573)
@@ -21,7 +21,7 @@
hudson.maven.profile=$HUDSONDIR/profiles.xml.local.qa
-hudson.host=jbpm.dyndns.org
+hudson.host=jbmuc.dyndns.org
hudson.admin.port=8250
hudson.http.port=8280
16 years, 8 months
JBoss-OSGI SVN: r87557 - projects/jboss-osgi/trunk/build/hudson/apache-tomcat/conf.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-20 04:43:01 -0400 (Mon, 20 Apr 2009)
New Revision: 87557
Modified:
projects/jboss-osgi/trunk/build/hudson/apache-tomcat/conf/server.xml
Log:
Disable AJP/1.3
Modified: projects/jboss-osgi/trunk/build/hudson/apache-tomcat/conf/server.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/apache-tomcat/conf/server.xml 2009-04-20 08:15:00 UTC (rev 87556)
+++ projects/jboss-osgi/trunk/build/hudson/apache-tomcat/conf/server.xml 2009-04-20 08:43:01 UTC (rev 87557)
@@ -31,8 +31,9 @@
<Connector port="@hudson.http.port@" />
- <!-- This is here for compatibility only, not required -->
+ <!-- This is here for compatibility only, not required
<Connector port="8009" protocol="AJP/1.3" />
+ -->
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />
16 years, 8 months
JBoss-OSGI SVN: r87488 - projects/jboss-osgi/trunk/testsuite/example.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 07:01:59 -0400 (Fri, 17 Apr 2009)
New Revision: 87488
Modified:
projects/jboss-osgi/trunk/testsuite/example/pom.xml
Log:
define the jboss repository
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-04-17 10:39:42 UTC (rev 87487)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-04-17 11:01:59 UTC (rev 87488)
@@ -178,6 +178,20 @@
</plugins>
</build>
+ <!-- Repositories -->
+ <repositories>
+ <!--
+ Also define the JBoss Repository here because
+ the examples are distributed standalone
+ -->
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <!-- Profiles -->
<profiles>
<!--
16 years, 8 months
JBoss-OSGI SVN: r87487 - in projects/jboss-osgi/trunk: testsuite/functional and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 06:39:42 -0400 (Fri, 17 Apr 2009)
New Revision: 87487
Modified:
projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
Log:
[FELIX-1040] Done
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-04-17 10:38:56 UTC (rev 87486)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-04-17 10:39:42 UTC (rev 87487)
@@ -173,7 +173,7 @@
try
{
framework.stop();
- framework.waitForStop(500);
+ framework.waitForStop(5000);
log.debug("SystemBundle STOPPED");
}
catch (BundleException ex)
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-17 10:38:56 UTC (rev 87486)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-17 10:39:42 UTC (rev 87487)
@@ -293,8 +293,6 @@
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
- <!-- [FELIX-1040] Bundle may start with unresolved packages -->
- <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -327,8 +325,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- [FELIX-1040] Bundle may start with unresolved packages -->
- <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 10:38:56 UTC (rev 87486)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 10:39:42 UTC (rev 87487)
@@ -42,30 +42,41 @@
public void testVerifyUnresolved() throws Exception
{
OSGiFramework fwOne = createBootstrapProvider().getFramework();
- BundleContext ctxOne = fwOne.getSystemBundleContext();
-
- Bundle bundleA = ctxOne.installBundle(getTestArchiveURL("jbosgi37-bundleA.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
-
- bundleA.start();
+ try
+ {
+ BundleContext ctxOne = fwOne.getSystemBundleContext();
+
+ Bundle bundleA = ctxOne.installBundle(getTestArchiveURL("jbosgi37-bundleA.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ bundleA.start();
+ }
+ finally
+ {
+ fwOne.stop();
+ }
- // Stop the framework
- fwOne.stop();
-
OSGiFramework fwTwo = createBootstrapProvider().getFramework();
- BundleContext ctxTwo = fwTwo.getSystemBundleContext();
-
- Bundle bundleB = ctxTwo.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
-
try
{
- bundleB.start();
- fail("Unresolved constraint expected");
+ BundleContext ctxTwo = fwTwo.getSystemBundleContext();
+
+ Bundle bundleB = ctxTwo.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
}
- catch (BundleException ex)
+ finally
{
- // expected
+ fwTwo.stop();
}
}
}
\ No newline at end of file
16 years, 8 months
JBoss-OSGI SVN: r87484 - projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 06:18:49 -0400 (Fri, 17 Apr 2009)
New Revision: 87484
Modified:
projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
Log:
[FELIX-1040] Call Felix.waitForStop()
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-04-17 10:09:46 UTC (rev 87483)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-04-17 10:18:49 UTC (rev 87484)
@@ -35,10 +35,7 @@
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleException;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.SynchronousBundleListener;
/**
* An abstraction of an OSGi Framework
@@ -175,28 +172,18 @@
{
try
{
- BundleListener listener = new SynchronousBundleListener()
- {
- long sysBundleId = getSystemBundle().getBundleId();
- public void bundleChanged(BundleEvent event)
- {
- Bundle bundle = event.getBundle();
- long bundleId = bundle.getBundleId();
- int type = event.getType();
- if (bundleId == sysBundleId && type == BundleEvent.STOPPED)
- {
- log.debug("SystemBundle STOPPED");
- }
- }
- };
- getSystemBundleContext().addBundleListener(listener);
-
framework.stop();
+ framework.waitForStop(500);
+ log.debug("SystemBundle STOPPED");
}
catch (BundleException ex)
{
log.error("Cannot stop Felix", ex);
}
+ catch (InterruptedException ex)
+ {
+ log.error("Cannot stop Felix", ex);
+ }
}
}
}
\ No newline at end of file
16 years, 8 months
JBoss-OSGI SVN: r87483 - projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 06:09:46 -0400 (Fri, 17 Apr 2009)
New Revision: 87483
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
Log:
Remove invalid compile depenency on Felix
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 10:08:22 UTC (rev 87482)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 10:09:46 UTC (rev 87483)
@@ -23,7 +23,6 @@
//$Id$
-import org.jboss.osgi.felix.framework.FelixIntegration;
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.jboss.osgi.spi.junit.OSGiTest;
import org.osgi.framework.Bundle;
16 years, 8 months
JBoss-OSGI SVN: r87480 - in projects/jboss-osgi/trunk: runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 05:11:43 -0400 (Fri, 17 Apr 2009)
New Revision: 87480
Modified:
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
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/jboss-osgi-beans.xml
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/felix/src/main/resources/jboss-osgi-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/jboss-osgi-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
Log:
Add more control to the OSGiFramework API
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,7 +23,7 @@
//$Id$
-import java.net.URI;
+import java.net.URL;
import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
@@ -37,7 +37,7 @@
public class BundleMetaData extends AbstractManifestMetaData
{
private String symbolicName;
- private URI bundleLocation;
+ private URL bundleLocation;
// exteralizable usage
public BundleMetaData()
@@ -54,12 +54,12 @@
return symbolicName;
}
- public URI getBundleLocation()
+ public URL getBundleLocation()
{
return bundleLocation;
}
- public void setBundleLocation(URI bundleLocation)
+ public void setBundleLocation(URL bundleLocation)
{
this.bundleLocation = bundleLocation;
}
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -52,7 +52,7 @@
BundleMetaData metaData = super.parse(unit, file, root);
if (metaData != null)
{
- metaData.setBundleLocation(unit.getRoot().toURI());
+ metaData.setBundleLocation(unit.getRoot().toURL());
log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
}
return metaData;
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,7 +23,7 @@
//$Id$
-import java.net.URI;
+import java.net.URL;
import java.util.List;
import org.jboss.deployers.spi.DeploymentException;
@@ -47,7 +47,7 @@
public class BundleRealDeployer extends AbstractSimpleRealDeployer<BundleMetaData>
{
private BundleContext systemContext;
- private List<URI> skipBundles;
+ private List<URL> skipBundles;
public BundleRealDeployer()
{
@@ -61,18 +61,18 @@
this.systemContext = bundleContext;
}
- public void setSkipBundles(List<URI> skipBundles)
+ public void setSkipBundles(List<URL> skipBundles)
{
this.skipBundles = skipBundles;
}
public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
{
- URI bundleUri = metadata.getBundleLocation();
- if (bundleUri == null)
+ URL bundleURL = metadata.getBundleLocation();
+ if (bundleURL == null)
throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
- String bundlePath = bundleUri.getPath();
+ String bundlePath = bundleURL.getPath();
if (bundlePath.endsWith("/"))
bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
@@ -81,7 +81,7 @@
if (skipBundles != null)
{
boolean skipBundle = false;
- for (URI skip : skipBundles)
+ for (URL skip : skipBundles)
{
String skipPath = skip.getPath();
if (skipPath.equals(bundlePath))
@@ -92,7 +92,7 @@
}
if (skipBundle == false)
{
- Bundle bundle = systemContext.installBundle(bundleUri.toString());
+ Bundle bundle = systemContext.installBundle(bundleURL.toString());
unit.addAttachment(Bundle.class, bundle);
log.info("Installed: " + bundle);
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-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,7 +23,7 @@
//$Id$
-import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -51,38 +51,38 @@
// Provide logging
final Logger log = Logger.getLogger(EquinoxIntegration.class);
- private Map<String, Object> frameworkProperties = new HashMap<String, Object>();
- private List<URI> autoInstall = new ArrayList<URI>();
- private List<URI> autoStart = new ArrayList<URI>();
+ 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> getFrameworkProperties()
+ public Map<String, Object> getProperties()
{
- return frameworkProperties;
+ return properties;
}
- public void setFrameworkProperties(Map<String, Object> props)
+ public void setProperties(Map<String, Object> props)
{
- this.frameworkProperties = props;
+ this.properties = props;
}
- public List<URI> getAutoInstall()
+ public List<URL> getAutoInstall()
{
return autoInstall;
}
- public void setAutoInstall(List<URI> autoInstall)
+ public void setAutoInstall(List<URL> autoInstall)
{
this.autoInstall = autoInstall;
}
- public List<URI> getAutoStart()
+ public List<URL> getAutoStart()
{
return autoStart;
}
- public void setAutoStart(List<URI> autoStart)
+ public void setAutoStart(List<URL> autoStart)
{
this.autoStart = autoStart;
}
@@ -104,11 +104,11 @@
// Push configured props to FrameworkProperties
System.setProperty("osgi.framework.useSystemProperties", "false");
- Iterator<String> itKeys = frameworkProperties.keySet().iterator();
+ Iterator<String> itKeys = properties.keySet().iterator();
while (itKeys.hasNext())
{
String key = itKeys.next();
- Object value = frameworkProperties.get(key);
+ Object value = properties.get(key);
if (value instanceof String)
{
FrameworkProperties.setProperty(key, (String)value);
@@ -134,41 +134,41 @@
if (context == null)
throw new FrameworkException("Cannot obtain system context");
- Map<URI, Bundle> autoBundles = new HashMap<URI, Bundle>();
+ Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
// Add the autoStart bundles to autoInstall
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
- autoInstall.add(bundleURI);
+ autoInstall.add(bundleURL);
}
// Install autoInstall bundles
- for (URI bundleURI : autoInstall)
+ for (URL bundleURL : autoInstall)
{
try
{
- Bundle bundle = context.installBundle(bundleURI.toString());
+ Bundle bundle = context.installBundle(bundleURL.toString());
log.info("Installed bundle: " + bundle.getSymbolicName());
- autoBundles.put(bundleURI, bundle);
+ autoBundles.put(bundleURL, bundle);
}
catch (BundleException ex)
{
- log.error("Cannot install bundle: " + bundleURI, ex);
+ log.error("Cannot install bundle: " + bundleURL, ex);
}
}
// Start autoStart bundles
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
try
{
- Bundle bundle = autoBundles.get(bundleURI);
+ Bundle bundle = autoBundles.get(bundleURL);
bundle.start();
log.info("Started bundle: " + bundle.getSymbolicName());
}
catch (BundleException ex)
{
- log.error("Cannot start bundle: " + bundleURI, ex);
+ log.error("Cannot start bundle: " + bundleURL, ex);
}
}
}
Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/jboss-osgi-beans.xml 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/jboss-osgi-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -5,7 +5,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.equinox.framework.EquinoxIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
</map>
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-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -4,7 +4,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.equinox.framework.EquinoxIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
<entry><key>org.osgi.service.http.port</key><value>8090</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-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,7 +23,7 @@
//$Id$
-import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -35,7 +35,10 @@
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleException;
+import org.osgi.framework.BundleListener;
+import org.osgi.framework.SynchronousBundleListener;
/**
* An abstraction of an OSGi Framework
@@ -48,38 +51,38 @@
// Provide logging
final Logger log = Logger.getLogger(FelixIntegration.class);
- private Map<String, Object> frameworkProperties = new HashMap<String, Object>();
- private List<URI> autoInstall = new ArrayList<URI>();
- private List<URI> autoStart = new ArrayList<URI>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private List<URL> autoInstall = new ArrayList<URL>();
+ private List<URL> autoStart = new ArrayList<URL>();
private Felix framework;
- public Map<String, Object> getFrameworkProperties()
+ public Map<String, Object> getProperties()
{
- return frameworkProperties;
+ return properties;
}
- public void setFrameworkProperties(Map<String, Object> props)
+ public void setProperties(Map<String, Object> props)
{
- this.frameworkProperties = props;
+ this.properties = props;
}
- public List<URI> getAutoInstall()
+ public List<URL> getAutoInstall()
{
return autoInstall;
}
- public void setAutoInstall(List<URI> autoInstall)
+ public void setAutoInstall(List<URL> autoInstall)
{
this.autoInstall = autoInstall;
}
- public List<URI> getAutoStart()
+ public List<URL> getAutoStart()
{
return autoStart;
}
- public void setAutoStart(List<URI> autoStart)
+ public void setAutoStart(List<URL> autoStart)
{
this.autoStart = autoStart;
}
@@ -101,65 +104,67 @@
// When a Felix instance is embedded in a host application,
// the host application must inform the Felix instance that it is embedded
- frameworkProperties.put("felix.embedded.execution", "true");
+ properties.put("felix.embedded.execution", "true");
// An instance of Logger that the framework uses as its default logger
- frameworkProperties.put("felix.log.logger", new FelixLogger());
+ properties.put("felix.log.logger", new FelixLogger());
- // Init & Start the System Bundle
+ // Init the System Bundle
+ framework = new Felix(properties);
+ }
+
+ public void start()
+ {
+ // Start the System Bundle
try
{
- framework = new Felix(frameworkProperties);
framework.start();
}
catch (BundleException ex)
{
- throw new FrameworkException("Cannot initialze system bundle", ex);
+ throw new FrameworkException("Cannot start system bundle", ex);
}
- }
-
- public void start()
- {
+
// Get system bundle context
BundleContext context = framework.getBundleContext();
if (context == null)
throw new FrameworkException("Cannot obtain system context");
- Map<URI, Bundle> autoBundles = new HashMap<URI, Bundle>();
+ Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
// Add the autoStart bundles to autoInstall
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
- autoInstall.add(bundleURI);
+ autoInstall.add(bundleURL);
}
// Install autoInstall bundles
- for (URI bundleURI : autoInstall)
+ for (URL bundleURL : autoInstall)
{
try
{
- Bundle bundle = context.installBundle(bundleURI.toString());
+ Bundle bundle = context.installBundle(bundleURL.toString());
log.info("Installed bundle: " + bundle.getSymbolicName());
- autoBundles.put(bundleURI, bundle);
+ autoBundles.put(bundleURL, bundle);
}
catch (BundleException ex)
{
- log.error("Cannot install bundle: " + bundleURI, ex);
+ log.error("Cannot install bundle: " + bundleURL, ex);
}
}
// Start autoStart bundles
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
try
{
- Bundle bundle = autoBundles.get(bundleURI);
+ Bundle bundle = autoBundles.get(bundleURL);
bundle.start();
log.info("Started bundle: " + bundle.getSymbolicName());
}
catch (BundleException ex)
{
- log.error("Cannot start bundle: " + bundleURI, ex);
+ log.error("Cannot start bundle: " + bundleURL, ex);
}
}
}
@@ -170,6 +175,22 @@
{
try
{
+ BundleListener listener = new SynchronousBundleListener()
+ {
+ long sysBundleId = getSystemBundle().getBundleId();
+ public void bundleChanged(BundleEvent event)
+ {
+ Bundle bundle = event.getBundle();
+ long bundleId = bundle.getBundleId();
+ int type = event.getType();
+ if (bundleId == sysBundleId && type == BundleEvent.STOPPED)
+ {
+ log.debug("SystemBundle STOPPED");
+ }
+ }
+ };
+ getSystemBundleContext().addBundleListener(listener);
+
framework.stop();
}
catch (BundleException ex)
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -5,7 +5,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
<entry>
@@ -38,7 +38,7 @@
</map>
</property>
<property name="autoStart">
- <list elementClass="java.net.URI">
+ <list elementClass="java.net.URL">
<value>file://${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
<value>file://${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
<value>file://${test.archive.directory}/bundles/jboss-osgi-logging.jar</value>
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -4,7 +4,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage</key><value>${jboss.server.data.dir}/osgi-store</value></entry>
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
@@ -49,7 +49,7 @@
</map>
</property>
<property name="autoStart">
- <list elementClass="java.net.URI">
+ <list elementClass="java.net.URL">
<value>${jboss.server.home.url}/deploy/osgi/org.osgi.compendium.jar</value>
<value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-common.jar</value>
<value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-logging.jar</value>
Modified: 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-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/KnopflerfishIntegration.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -25,7 +25,7 @@
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
-import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -51,38 +51,38 @@
// Provide logging
final Logger log = Logger.getLogger(KnopflerfishIntegration.class);
- private Map<String, Object> frameworkProperties = new HashMap<String, Object>();
- private List<URI> autoInstall = new ArrayList<URI>();
- private List<URI> autoStart = new ArrayList<URI>();
+ 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> getFrameworkProperties()
+ public Map<String, Object> getProperties()
{
- return frameworkProperties;
+ return properties;
}
- public void setFrameworkProperties(Map<String, Object> props)
+ public void setProperties(Map<String, Object> props)
{
- this.frameworkProperties = props;
+ this.properties = props;
}
- public List<URI> getAutoInstall()
+ public List<URL> getAutoInstall()
{
return autoInstall;
}
- public void setAutoInstall(List<URI> autoInstall)
+ public void setAutoInstall(List<URL> autoInstall)
{
this.autoInstall = autoInstall;
}
- public List<URI> getAutoStart()
+ public List<URL> getAutoStart()
{
return autoStart;
}
- public void setAutoStart(List<URI> autoStart)
+ public void setAutoStart(List<URL> autoStart)
{
this.autoStart = autoStart;
}
@@ -103,11 +103,11 @@
log.info("OSGi Integration Knopflerfish - " + implVersion);
// Push configured props to FrameworkProperties
- Iterator<String> itKeys = frameworkProperties.keySet().iterator();
+ Iterator<String> itKeys = properties.keySet().iterator();
while (itKeys.hasNext())
{
String key = itKeys.next();
- Object value = frameworkProperties.get(key);
+ Object value = properties.get(key);
if (value instanceof String)
{
Framework.setProperty(key, (String)value);
@@ -160,41 +160,41 @@
if (context == null)
throw new FrameworkException("Cannot obtain system context");
- Map<URI, Bundle> autoBundles = new HashMap<URI, Bundle>();
+ Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
// Add the autoStart bundles to autoInstall
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
- autoInstall.add(bundleURI);
+ autoInstall.add(bundleURL);
}
// Install autoInstall bundles
- for (URI bundleURI : autoInstall)
+ for (URL bundleURL : autoInstall)
{
try
{
- Bundle bundle = context.installBundle(bundleURI.toString());
+ Bundle bundle = context.installBundle(bundleURL.toString());
log.info("Installed bundle: " + bundle.getSymbolicName());
- autoBundles.put(bundleURI, bundle);
+ autoBundles.put(bundleURL, bundle);
}
catch (BundleException ex)
{
- log.error("Cannot install bundle: " + bundleURI, ex);
+ log.error("Cannot install bundle: " + bundleURL, ex);
}
}
// Start autoStart bundles
- for (URI bundleURI : autoStart)
+ for (URL bundleURL : autoStart)
{
try
{
- Bundle bundle = autoBundles.get(bundleURI);
+ Bundle bundle = autoBundles.get(bundleURL);
bundle.start();
log.info("Started bundle: " + bundle.getSymbolicName());
}
catch (BundleException ex)
{
- log.error("Cannot start bundle: " + bundleURI, ex);
+ log.error("Cannot start bundle: " + bundleURL, ex);
}
}
}
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/jboss-osgi-beans.xml 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/jboss-osgi-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -5,7 +5,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.knopflerfish.KnopflerfishIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
</map>
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-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-17 09:11:43 UTC (rev 87480)
@@ -4,7 +4,7 @@
<!-- The OSGiFramework -->
<bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.knopflerfish.KnopflerfishIntegration">
- <property name="frameworkProperties">
+ <property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
<entry><key>org.osgi.service.http.port</key><value>8090</value></entry>
@@ -48,6 +48,9 @@
<!-- The OSGi MetaData Deployer -->
<bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.BundleMetaDataDeployer" />
+ <!-- The OSGi Bundle Structure Deployer -->
+ <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+
<!-- The OSGi Bundle Deployer -->
<bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.BundleRealDeployer">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext" /></property>
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,6 +23,10 @@
//$Id$
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -34,13 +38,56 @@
*/
public interface OSGiFramework
{
- /**
- * Get the System Bundle associated with this Framework
- */
- Bundle getSystemBundle();
-
- /**
- * Get the System Bundle Context associated with this Framework
- */
- BundleContext getSystemBundleContext();
+ /**
+ * Get the Framework properties
+ */
+ Map<String, Object> getProperties();
+
+ /**
+ * Set the Framework properties.
+ * This can only be done before the Framework is started.
+ */
+ void setProperties(Map<String, Object> props);
+
+ /**
+ * Get the list of bundles that get installed automatically
+ */
+ List<URL> getAutoInstall();
+
+ /**
+ * Set the list of bundles that get installed automatically.
+ * This can only be done before the Framework is started.
+ */
+ void setAutoInstall(List<URL> autoInstall);
+
+ /**
+ * Get the list of bundles that get installed and started automatically
+ */
+ List<URL> getAutoStart();
+
+ /**
+ * Set the list of bundles that get installed and started automatically.
+ * This can only be done before the Framework is started.
+ */
+ void setAutoStart(List<URL> autoStart);
+
+ /**
+ * Start the Framework
+ */
+ void start();
+
+ /**
+ * Stop the Framework
+ */
+ void stop();
+
+ /**
+ * Get the System Bundle associated with this Framework
+ */
+ Bundle getSystemBundle();
+
+ /**
+ * Get the System Bundle Context associated with this Framework
+ */
+ BundleContext getSystemBundleContext();
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,6 +23,10 @@
//$Id: MockFramework.java 84917 2009-03-02 08:18:40Z thomas.diesler(a)jboss.com $
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -44,4 +48,39 @@
{
return null;
}
+
+ public List<URL> getAutoInstall()
+ {
+ return null;
+ }
+
+ public List<URL> getAutoStart()
+ {
+ return null;
+ }
+
+ public Map<String, Object> getProperties()
+ {
+ return null;
+ }
+
+ public void setAutoInstall(List<URL> autoInstall)
+ {
+ }
+
+ public void setAutoStart(List<URL> autoStart)
+ {
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 08:57:52 UTC (rev 87479)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 09:11:43 UTC (rev 87480)
@@ -23,6 +23,7 @@
//$Id$
+import org.jboss.osgi.felix.framework.FelixIntegration;
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.jboss.osgi.spi.junit.OSGiTest;
import org.osgi.framework.Bundle;
@@ -48,6 +49,9 @@
assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
bundleA.start();
+
+ // Stop the framework
+ fwOne.stop();
OSGiFramework fwTwo = createBootstrapProvider().getFramework();
BundleContext ctxTwo = fwTwo.getSystemBundleContext();
16 years, 8 months
JBoss-OSGI SVN: r87476 - in projects/jboss-osgi/trunk/testsuite/functional: src/test/java/org/jboss/test/osgi/jbosgi39 and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 03:24:31 -0400 (Fri, 17 Apr 2009)
New Revision: 87476
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
Modified:
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
Log:
[FELIX-1040] Bundle may start with unresolved packages
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-17 06:59:03 UTC (rev 87475)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-17 07:24:31 UTC (rev 87476)
@@ -79,7 +79,7 @@
<version>${version}</version>
<scope>provided</scope>
</dependency>
-
+
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
@@ -135,7 +135,7 @@
<tasks>
<property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
<property name="tests.output.dir" value="${project.build.directory}" />
- <ant antfile="scripts/antrun-test-jars.xml"/>
+ <ant antfile="scripts/antrun-test-jars.xml" />
</tasks>
</configuration>
</execution>
@@ -293,6 +293,8 @@
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
+ <!-- [FELIX-1040] Bundle may start with unresolved packages -->
+ <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -324,8 +326,9 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- argLine>${surefire.security.args}</argLine -->
<excludes>
+ <!-- [FELIX-1040] Bundle may start with unresolved packages -->
+ <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java 2009-04-17 07:24:31 UTC (rev 87476)
@@ -0,0 +1,68 @@
+/*
+ * 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.test.osgi.jbosgi39;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * [FELIX-1040] Bundle may start with unresolved packages
+ *
+ * https://issues.apache.org/jira/browse/FELIX-1040
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 17-Apr-2009
+ */
+public class FELIX1040TestCase extends OSGiTest
+{
+ public void testVerifyUnresolved() throws Exception
+ {
+ OSGiFramework fwOne = createBootstrapProvider().getFramework();
+ BundleContext ctxOne = fwOne.getSystemBundleContext();
+
+ Bundle bundleA = ctxOne.installBundle(getTestArchiveURL("jbosgi37-bundleA.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ bundleA.start();
+
+ OSGiFramework fwTwo = createBootstrapProvider().getFramework();
+ BundleContext ctxTwo = fwTwo.getSystemBundleContext();
+
+ Bundle bundleB = ctxTwo.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 8 months
JBoss-OSGI SVN: r87475 - projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-17 02:59:03 -0400 (Fri, 17 Apr 2009)
New Revision: 87475
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
Log:
[JBOSGI-65] Uninstall jbosgi37 test bundle
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java 2009-04-17 06:39:27 UTC (rev 87474)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java 2009-04-17 06:59:03 UTC (rev 87475)
@@ -55,18 +55,24 @@
public void testNestedBundle() throws Exception
{
Bundle bundleA = installBundle(sysContext, "jbosgi37-bundleA.jar", true);
-
- assertEquals("Bundle started", Bundle.ACTIVE, bundleA.getState());
-
- List<String> relevant = new ArrayList<String>();
- for (Bundle bundle : sysContext.getBundles())
+ try
{
- String symbolicName = bundle.getSymbolicName();
- if (symbolicName.startsWith("jbosgi37"))
- relevant.add(symbolicName);
+ assertEquals("Bundle started", Bundle.ACTIVE, bundleA.getState());
+
+ List<String> relevant = new ArrayList<String>();
+ for (Bundle bundle : sysContext.getBundles())
+ {
+ String symbolicName = bundle.getSymbolicName();
+ if (symbolicName.startsWith("jbosgi37"))
+ relevant.add(symbolicName);
+ }
+
+ assertEquals("No Sub Bundle", 1, relevant.size());
+ assertEquals("jbosgi37-bundleA", relevant.get(0));
}
-
- assertEquals("No Sub Bundle", 1, relevant.size());
- assertEquals("jbosgi37-bundleA", relevant.get(0));
+ finally
+ {
+ bundleA.uninstall();
+ }
}
}
\ No newline at end of file
16 years, 8 months
JBoss-OSGI SVN: r87458 - projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-16 17:20:40 -0400 (Thu, 16 Apr 2009)
New Revision: 87458
Modified:
projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml
Log:
enable build
Modified: projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml 2009-04-16 21:13:31 UTC (rev 87457)
+++ projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml 2009-04-16 21:20:40 UTC (rev 87458)
@@ -23,7 +23,7 @@
<excludedRegions></excludedRegions>
</scm>
<canRoam>true</canRoam>
- <disabled>true</disabled>
+ <disabled>false</disabled>
<jdk>jdk1.6</jdk>
<triggers class="vector">
</triggers>
16 years, 8 months