JBoss-OSGI SVN: r97512 - in projects/jboss-osgi/trunk: distribution/docbook/en/modules and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-07 12:01:24 -0500 (Mon, 07 Dec 2009)
New Revision: 97512
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBean.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBeanImpl.java
Modified:
projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-equinox.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-felix.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-jbossmc.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/jbossosgi-spi.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/jmx-agent-view.png
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch010-introduction.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch040-framework-integration.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml
projects/jboss-osgi/trunk/distribution/docbook/src/main/graphics/jbossosgi-runtime.odp
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
More work on user guide and JBOSGI-58
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-equinox.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-felix.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-jbossmc.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/jbossosgi-spi.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/jmx-agent-view.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch010-introduction.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch010-introduction.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch010-introduction.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -66,7 +66,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-layers.png"/>
+ <imagedata align="center" fileref="images/osgi-layers.png"/>
</imageobject>
</mediaobject>
@@ -90,7 +90,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-delegation.png"/>
+ <imagedata align="center" fileref="images/osgi-delegation.png"/>
</imageobject>
</mediaobject>
@@ -124,7 +124,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-classloader.png"/>
+ <imagedata align="center" fileref="images/osgi-classloader.png"/>
</imageobject>
</mediaobject>
@@ -138,7 +138,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-version-constraint.png"/>
+ <imagedata align="center" fileref="images/osgi-version-constraint.png"/>
</imageobject>
</mediaobject>
@@ -164,7 +164,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-life-cycle.png"/>
+ <imagedata align="center" fileref="images/osgi-life-cycle.png"/>
</imageobject>
</mediaobject>
@@ -192,7 +192,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-service-registration.png"/>
+ <imagedata align="center" fileref="images/osgi-service-registration.png"/>
</imageobject>
</mediaobject>
</sect1>
@@ -221,7 +221,7 @@
<para>The Configuration Admin service allows an Operator to set the configuration information of deployed bundles.</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/osgi-config-service.png" contentwidth="450"/>
+ <imagedata align="center" fileref="images/osgi-config-service.png"/>
</imageobject>
</mediaobject>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -12,7 +12,7 @@
<title>Download the Distribution</title>
<para>JBoss OSGi is distributed as an <ulink url="http://izpack.org">IzPack</ulink> installer archive.
- The installer is available from the JBoss OSGi <ulink url="https://sourceforge.net/project/showfiles.php?group_id=22866&package_...">download area</ulink>.</para>
+ The installer is available from the JBoss OSGi <ulink url="http://sourceforge.net/projects/jboss/files/JBossOSGi">download area</ulink>.</para>
</sect1>
<sect1 xml:id="SecInstall">
@@ -28,7 +28,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack01-welcome.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack01-welcome.png"/>
</imageobject>
</mediaobject>
@@ -37,7 +37,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack05-installpath.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack05-installpath.png"/>
</imageobject>
</mediaobject>
@@ -45,21 +45,21 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack10-packs.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack10-packs.png"/>
</imageobject>
</mediaobject>
<itemizedlist>
<listitem><emphasis role="bold">JBoss OSGi Distribution</emphasis> - Documentation, Binary Artifacts and Sources</listitem>
<listitem><emphasis role="bold">JBoss OSGi Runtime</emphasis> - Standalone JBoss OSGi Runtime</listitem>
- <listitem><emphasis role="bold">JBoss OSGi Integration</emphasis> - Integration with an existing JBossAS instance</listitem>
+ <listitem><emphasis role="bold">JBossAS 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/izpack15-target-framework.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack15-target-framework.png"/>
</imageobject>
</mediaobject>
@@ -67,7 +67,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack20-target-container.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack20-target-container.png"/>
</imageobject>
</mediaobject>
@@ -80,7 +80,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack25-jboss-home.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack25-jboss-home.png"/>
</imageobject>
</mediaobject>
@@ -88,7 +88,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack30-verify.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack30-verify.png"/>
</imageobject>
</mediaobject>
@@ -97,7 +97,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/izpack35-done.png"/>
+ <imagedata align="center" width="90%" fileref="images/izpack35-done.png"/>
</imageobject>
</mediaobject>
</sect1>
@@ -127,12 +127,12 @@
</itemizedlist>
<programlisting>
- [tdiesler@tddell runtime]$ bin/run.sh
+ $ bin/run.sh
=========================================================================
JBoss OSGi Bootstrap Environment
- OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta5/runtime
+ OSGI_HOME: /home/hudson/jboss-osgi-1.0.0.Beta5/runtime
JAVA: /usr/java/jdk1.6/bin/java
@@ -151,7 +151,7 @@
16:20:30,789 INFO [FrameworkEventsPluginImpl] Bundle STARTED: Bundle{jboss-osgi-jmx-1.0.2}
16:20:30,806 INFO [FrameworkEventsPluginImpl] Bundle STARTED: Bundle{jboss-osgi-common-core-2.2.13.GA}
...
- <emphasis role="bold">16:20:30,824 INFO [DeploymentScannerImpl] JBossOSGi Runtime started in 1.64sec</emphasis>
+ 16:20:30,824 INFO [DeploymentScannerImpl] <emphasis role="bold">JBossOSGi Runtime started in 1.64sec</emphasis>
</programlisting>
</sect1>
@@ -165,6 +165,7 @@
<listitem><emphasis role="bold">BlueprintTestCase</emphasis> - A simple Blueprint Container test</listitem>
<listitem><emphasis role="bold">DOMParserTestCase</emphasis> - A test that uses a DOM parser to read an XML document</listitem>
<listitem><emphasis role="bold">HttpServiceTestCase</emphasis> - Register servlets and resources with the HTTP Service</listitem>
+ <listitem><emphasis role="bold">InterceptorTestCase</emphasis> - Intercept and process bundle metadata</listitem>
<listitem><emphasis role="bold">JAXBTestCase</emphasis> - A test that uses JAXB to read an XML document</listitem>
<listitem><emphasis role="bold">JMXTestCase</emphasis> - Register an MBean through the JMX Service</listitem>
<listitem><emphasis role="bold">JNDITestCase</emphasis> - Bind objects to the Naming Service</listitem>
@@ -185,7 +186,7 @@
JBoss OSGi Runtime <emphasis role="bold">deploy</emphasis> folder.</para>
<programlisting>
- [tdiesler@tdvaio testsuite]$ cp .../test-libs/example/example-http.jar .../runtime/server/web/deploy
+ $ cp .../test-libs/example/example-http.jar .../runtime/server/web/deploy
...
13:59:38,284 INFO [BundleRealDeployer] Installed: example-http [9]
13:59:38,289 INFO [example-http] BundleEvent INSTALLED
@@ -208,7 +209,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/webconsole.png" contentwidth="450"/>
+ <imagedata align="center" width="90%" fileref="images/webconsole.png"/>
</imageobject>
</mediaobject>
@@ -233,19 +234,19 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/hudson-matrix-felix.png" contentwidth="450"/>
+ <imagedata fileref="images/hudson-matrix-felix.png"/>
</imageobject>
</mediaobject>
<mediaobject>
<imageobject>
- <imagedata fileref="images/hudson-matrix-equinox.png" contentwidth="450"/>
+ <imagedata fileref="images/hudson-matrix-equinox.png"/>
</imageobject>
</mediaobject>
<mediaobject>
<imageobject>
- <imagedata fileref="images/hudson-matrix-jbossmc.png" contentwidth="450"/>
+ <imagedata fileref="images/hudson-matrix-jbossmc.png"/>
</imageobject>
</mediaobject>
@@ -261,35 +262,38 @@
</itemizedlist>
<programlisting>
- cd build/hudson
- cp ant.properties.example ant.properties
- vi ant.properties
+ $ cd build/hudson
+ $ cp ant.properties.example ant.properties
+ $ vi ant.properties
# The JBoss settings
jboss.server.instance=default
jboss.bind.address=127.0.0.1
# JDK settings
- java.home.jdk15=/usr/java/jdk1.5.0_17
- java.home.jdk16=/usr/java/jdk1.6.0_11
+ java.home.jdk15=/usr/java/jdk1.5.0_22
+ java.home.jdk16=/usr/java/jdk1.6.0_17
# Hudson QA Environment
hudson.username=chageme
hudson.password=chageme
- hudson.maven.path=/usr/java/apache-maven-2.0.9
+ hudson.maven.name=apache-maven-2.2.1
+ hudson.maven.path=/usr/java/apache-maven-2.2.1
- hudson.root=/home/tdiesler/workspace/hudson/jboss-osgi
+ hudson.root=/home/hudson/workspace/hudson/jboss-osgi
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
- #hudson.jboss501.zip=file:///home/tdiesler/Download/java/jboss/jboss-5.0.1.GA.zip
+ #hudson.jboss501.zip=file:///home/hudson/Download/java/jboss/jboss-5.0.1.GA.zip
+ #hudson.jboss510.zip=file:///home/hudson/download/java/jboss/jboss-5.1.0.GA.zip
hudson.mail.recipients=
+ hudson.mail.admin=yourname(a)yourdomain.com
hudson.smtp.host=localhost
# Hudson (1.290)
@@ -300,7 +304,7 @@
<emphasis role="bold">Run Hudson Setup</emphasis>
<programlisting>
- [tdiesler@tdvaio hudson]$ ant hudson-setup
+ $ ant hudson-setup
Buildfile: build.xml
init:
@@ -308,8 +312,8 @@
init-hudson:
[echo]
- [echo] hudson.root = /home/tdiesler/workspace/hudson/jboss-osgi
- [echo] hudson.home = /home/tdiesler/workspace/hudson/jboss-osgi/hudson-home
+ [echo] hudson.root = /home/hudson/workspace/hudson/jboss-osgi
+ [echo] hudson.home = /home/hudson/workspace/hudson/jboss-osgi/hudson-home
[echo]
...
@@ -328,7 +332,7 @@
<emphasis role="bold">Run Hudson Start</emphasis>
<programlisting>
- [tdiesler@tdvaio hudson]$ ant hudson-start
+ $ ant hudson-start
Buildfile: build.xml
init:
@@ -336,8 +340,8 @@
init-hudson:
[echo]
- [echo] hudson.root = /home/tdiesler/workspace/hudson/jboss-osgi
- [echo] hudson.home = /home/tdiesler/workspace/hudson/jboss-osgi/hudson-home
+ [echo] hudson.root = /home/hudson/workspace/hudson/jboss-osgi
+ [echo] hudson.home = /home/hudson/workspace/hudson/jboss-osgi/hudson-home
[echo]
hudson-start:
@@ -354,7 +358,7 @@
<emphasis role="bold">Run Hudson Stop</emphasis>
<programlisting>
- [tdiesler@tdvaio hudson]$ ant hudson-stop
+ $ ant hudson-stop
Buildfile: build.xml
init:
@@ -362,8 +366,8 @@
init-hudson:
[echo]
- [echo] hudson.root = /home/tdiesler/workspace/hudson/jboss-osgi
- [echo] hudson.home = /home/tdiesler/workspace/hudson/jboss-osgi/hudson-home
+ [echo] hudson.root = /home/hudson/workspace/hudson/jboss-osgi
+ [echo] hudson.home = /home/hudson/workspace/hudson/jboss-osgi/hudson-home
[echo]
hudson-stop:
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -14,7 +14,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossosgi-runtime.png"/>
+ <imagedata align="center" width="90%" fileref="images/jbossosgi-runtime.png"/>
</imageobject>
</mediaobject>
@@ -130,7 +130,7 @@
<para>A runtime profile can be started using the <emphasis role="bold">-c comand line option</emphasis>.</para>
<programlisting>
- [tdiesler@tddell runtime]$ bin/run.sh -c minimal
+ $ bin/run.sh -c minimal
=========================================================================
JBossOSGi Bootstrap Environment
@@ -151,7 +151,7 @@
12:10:50,042 INFO [jboss-osgi-hotdeploy] Start DeploymentScanner: [scandir=.../server/minimal/deploy,interval=2000ms]
12:10:50,047 INFO [FrameworkEventsPluginImpl] Bundle STARTED: Bundle{jboss-osgi-hotdeploy:1.0.2}
12:10:50,050 INFO [FrameworkEventsPluginImpl] Bundle STARTED: Bundle{system.bundle:0.0.0}
- <emphasis role="bold">12:10:50,076 INFO [OSGiBootstrap] JBossOSGi Runtime booted in 1.357sec</emphasis>
+ 12:10:50,076 INFO [OSGiBootstrap] <emphasis role="bold">JBossOSGi Runtime booted in 1.357sec</emphasis>
</programlisting>
<emphasis role="bold">Minimal Profile</emphasis>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch040-framework-integration.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch040-framework-integration.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch040-framework-integration.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -8,9 +8,9 @@
<sect1 xml:id="SecIntegrationJBossMC">
<title>JBossMC Framework Integration</title>
- <para>Starting from 1.0.0.Beta5 JBoss OSGi provides integration for our native <ulink url="http://www.jboss.org/jbossmc/">Microcontainer based</ulink>
+ <para>Starting from 1.0.0.Beta4 JBoss OSGi provides integration for our native <ulink url="http://www.jboss.org/jbossmc/">Microcontainer based</ulink>
OSGi Framework. When deployed in JBossAS this Framework will eventually allow us to integrate with components from other programming models.
- (i.e. OSGi services can access MC beans, EJB3 can access OSGi services, etc.)</para>
+ (i.e. OSGi services can access MC beans, EJB3 can access OSGi services and vice versa)</para>
<para>JBossMC integration can be configured through an XML beans configuration in the <link linkend="ChapRuntime">JBoss OSGi Runtime</link>.</para>
@@ -152,7 +152,8 @@
# Bundles that need to be installed with the Framework automatically
org.jboss.osgi.spi.framework.autoInstall=\
- file://${osgi.home}/server/minimal/bundles/org.osgi.compendium.jar
+ file://${osgi.home}/server/minimal/deploy/org.eclipse.osgi.services.jar \
+ file://${osgi.home}/server/minimal/deploy/org.eclipse.osgi.util.jar
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -15,12 +15,11 @@
<listitem>Supported Target Containers</listitem>
<listitem>Administration, Provisioning and Management</listitem>
<listitem>Various Provided Services</listitem>
- <listitem>Testing Framework</listitem>
</itemizedlist>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossosgi-spi.png" contentwidth="450"/>
+ <imagedata align="center" width="90%" fileref="images/jbossosgi-spi.png"/>
</imageobject>
</mediaobject>
@@ -30,10 +29,8 @@
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi</ulink> - Common classes and interfaces.</listitem>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.capability</ulink> - Capabilities that can be installed in the OSGi framework.</listitem>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.framework</ulink> - Framework integration and bootstrap.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.logging</ulink> - Support for Bundle logging.</listitem>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.management</ulink> - Management view on deployed bundles.</listitem>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.service</ulink> - A collection of SPI provided services.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.testing</ulink> - OSGi test support classes and interfaces.</listitem>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.util</ulink> - A collection of SPI provided utilities.</listitem>
</itemizedlist>
@@ -65,15 +62,14 @@
OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
bootProvider.configure(configURL);
- OSGiFramework framework = bootProvider.getFramework("AnotherOSGiFramework");
+ OSGiFramework framework = bootProvider.getFramework();
Bundle bundle = framework.getSystemBundle();
</programlisting>
- <para>The JBoss OSGi SPI comes with two bootstrap providers:</para>
+ <para>The JBoss OSGi SPI comes with a default bootstrap provider:</para>
<itemizedlist>
<listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">PropertiesBootstrapProvider</ulink></listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">MicrocontainerBootstrapProvider</ulink></listitem>
</itemizedlist>
<para>OSGiBootstrapProvider implementations that read their configurtation from some other source are possible, but currently not
@@ -107,13 +103,13 @@
ManagedBundle</ulink> gives you access to the MBean views of a deployed Bundle. It is registerd under the name:</para>
<itemizedlist>
- <listitem><emphasis role="bold">jboss.osgi:bundle=[SymbolicName],id=[BundleId]</emphasis></listitem>
+ <listitem><emphasis role="bold">jboss.osgi:id=[BundleId],sname=[SymbolicName],version=[Version]</emphasis></listitem>
</itemizedlist>
<emphasis role="bold">Accessing the Management Objects</emphasis>
- <para>If you work with the JBoss OSGi Testsuite you get access to the Managed Objects through the JBoss OSGi SPI provided
- <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.testing</ulink>.
+ <para>If you work with the JBoss OSGi Testsuite you get access to these managed objects through the
+ <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>.
</para>
<para>If you install JBoss OSGi in an already existing JBossAS instance you also get access to the Managed Objects through the JBoss provided
@@ -121,7 +117,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jmx-agent-view.png" contentwidth="450"/>
+ <imagedata align="center" width="90%" fileref="images/jmx-agent-view.png"/>
</imageobject>
</mediaobject>
@@ -134,7 +130,7 @@
<title>Writing Test Cases</title>
<para>JBoss OSGi comes with <ulink url="http://www.junit.org">JUnit</ulink> test support as part of the SPI provided
- <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.testing</ulink>
+ <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>
package. There are two distinct test scenarios that we support:</para>
<itemizedlist>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -22,7 +22,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/husky-problem.png"/>
+ <imagedata align="center" width="90%" fileref="images/husky-problem.png"/>
</imageobject>
</mediaobject>
@@ -57,7 +57,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/husky-design.png"/>
+ <imagedata align="center" width="90%" fileref="images/husky-design.png"/>
</imageobject>
</mediaobject>
Modified: projects/jboss-osgi/trunk/distribution/docbook/src/main/graphics/jbossosgi-runtime.odp
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -114,7 +114,7 @@
********************************
-->
- <pack name="JBossOSGi Distribution" required="yes">
+ <pack name="JBoss OSGi Distribution" required="yes">
<description>Documentation, Binary Artifacts and Sources</description>
@@ -167,7 +167,7 @@
********************************
-->
- <pack name="JBossOSGi Runtime" required="no" preselected="yes">
+ <pack name="JBoss OSGi Runtime" required="no" preselected="yes">
<description>Standalone JBossOSGi Runtime</description>
@@ -198,7 +198,6 @@
<file src="@{runtime.dir}/server/conf/log4j.xml" targetdir="$INSTALL_PATH/runtime/server/minimal/conf" override="true" />
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
<include name="org.apache.felix.log.jar" />
- <include name="org.apache.felix.eventadmin.jar" />
<include name="jboss-osgi-common.jar" />
<include name="jboss-osgi-hotdeploy.jar" />
</fileset>
@@ -210,6 +209,7 @@
<include name="jboss-osgi-common-core.jar" />
<include name="jboss-osgi-jmx.jar" />
<include name="jboss-osgi-jndi.jar" />
+ <include name="org.apache.felix.eventadmin.jar" />
</fileset>
<!-- Server Web -->
@@ -219,6 +219,7 @@
<include name="jboss-osgi-common-core.jar" />
<include name="jboss-osgi-jmx.jar" />
<include name="jboss-osgi-jndi.jar" />
+ <include name="org.apache.felix.eventadmin.jar" />
<!-- web -->
<include name="jboss-osgi-webconsole.jar" />
<include name="pax-web-jetty-bundle.jar" />
@@ -231,6 +232,7 @@
<include name="jboss-osgi-common-core.jar" />
<include name="jboss-osgi-jmx.jar" />
<include name="jboss-osgi-jndi.jar" />
+ <include name="org.apache.felix.eventadmin.jar" />
<!-- web -->
<include name="jboss-osgi-webconsole.jar" />
<include name="pax-web-jetty-bundle.jar" />
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -36,6 +36,8 @@
<!-- Properties -->
<properties>
+ <version.javax.ejb>3.0</version.javax.ejb>
+ <version.jboss.ejb3>1.0.0</version.jboss.ejb3>
<version.jboss.microcontainer>2.0.9.GA</version.jboss.microcontainer>
</properties>
@@ -46,6 +48,16 @@
<artifactId>jboss-aop-mc-int</artifactId>
<version>${version.jboss.microcontainer}</version>
</dependency>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <version>${version.javax.ejb}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-ext-api</artifactId>
+ <version>${version.jboss.ejb3}</version>
+ </dependency>
</dependencies>
<!-- Profiles -->
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -28,122 +28,129 @@
<project default="build-test-jars">
- <description>OSGi test archive builder</description>
+ <description>OSGi test archive builder</description>
- <!-- ================================================================== -->
- <!-- Init -->
- <!-- ================================================================== -->
+ <!-- ================================================================== -->
+ <!-- Init -->
+ <!-- ================================================================== -->
- <target name="init">
+ <target name="init">
- <!-- Property override when not called from maven -->
- <property name="maven.runtime.classpath" value="/usr/java/bnd.jar" />
- <property name="tests.output.dir" value="${basedir}/../target" />
+ <!-- Property override when not called from maven -->
+ <property name="maven.runtime.classpath" value="/usr/java/bnd.jar" />
+ <property name="tests.output.dir" value="${basedir}/../target" />
- <mkdir dir="${tests.output.dir}/test-libs/example" />
- <mkdir dir="${tests.output.dir}/test-libs/service" />
-
- <property name="tests.classes.dir" value="${tests.output.dir}/test-classes" />
- <property name="tests.resources.dir" value="${tests.output.dir}/test-classes" />
+ <mkdir dir="${tests.output.dir}/test-libs/example" />
+ <mkdir dir="${tests.output.dir}/test-libs/service" />
- <taskdef resource="aQute/bnd/ant/taskdef.properties">
- <classpath>
- <pathelement path="${maven.runtime.classpath}" />
- </classpath>
- </taskdef>
+ <property name="tests.classes.dir" value="${tests.output.dir}/test-classes" />
+ <property name="tests.resources.dir" value="${tests.output.dir}/test-classes" />
- </target>
+ <taskdef resource="aQute/bnd/ant/taskdef.properties">
+ <classpath>
+ <pathelement path="${maven.runtime.classpath}" />
+ </classpath>
+ </taskdef>
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
+ </target>
- <target name="build-test-jars" depends="init" description="Build the test deployments">
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
- <!-- Please add alphabetically -->
+ <target name="build-test-jars" depends="init" description="Build the test deployments">
- <!-- jbossas/jbosgi36 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/jbossas/jbosgi36/jbosgi36.bnd" />
- <jar jarfile="${tests.output.dir}/test-libs/jbosgi36-mbean.jar">
- <fileset dir="${tests.classes.dir}">
- <include name="org/jboss/test/osgi/jbossas/jbosgi36/mbean/Foo.class" />
- <include name="org/jboss/test/osgi/jbossas/jbosgi36/mbean/FooMBean.class" />
- </fileset>
- <fileset dir="${tests.resources.dir}/jbossas/jbosgi36">
- <include name="META-INF/jbosgi36-jboss-beans.xml" />
- </fileset>
- </jar>
+ <!-- Please add alphabetically -->
- <!-- jbosgi37 -->
- <jar jarfile="${tests.output.dir}/test-libs/jbosgi37-subB.jar">
- <fileset dir="${tests.classes.dir}">
- <include name="org/jboss/test/osgi/jbosgi37/subB/PojoB.class" />
- </fileset>
- </jar>
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-subA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-subA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleB.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleB.bnd" />
-
- <!-- jbosgi38 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleA.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleB.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleB.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleX.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleX.bnd" />
-
- <!-- jbosgi39 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleB.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleB.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleX.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleX.bnd" />
-
- <!-- jbosgi41 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
-
- <!-- jbosgi92 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi92-bundleA.jar" files="${tests.resources.dir}/jbosgi92/jbosgi92-bundleA.bnd" />
-
- <!-- jbosgi99 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-allgood.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-allgood.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-failonresolve.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-failonresolve.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-failonstart.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-failonstart.bnd" />
-
- <!-- jbosgi108 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi108-bundleA.jar" files="${tests.resources.dir}/jbosgi108/jbosgi108-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi108-bundleB.jar" files="${tests.resources.dir}/jbosgi108/jbosgi108-bundleB.bnd" />
-
- <!-- jbosgi112 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi112-bundleA.jar" files="${tests.resources.dir}/jbosgi112/jbosgi112-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi112-bundleB.jar" files="${tests.resources.dir}/jbosgi112/jbosgi112-bundleB.bnd" />
-
- <!-- jbosgi142 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleA.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleB.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleB.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleX.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleX.bnd" />
-
- <!-- jbosgi143 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi143-bundleA.jar" files="${tests.resources.dir}/jbosgi143/jbosgi143-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi143-bundleX.jar" files="${tests.resources.dir}/jbosgi143/jbosgi143-bundleX.bnd" />
-
- <!-- jbosgi151 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleA.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleB.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleB.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleC.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleC.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleD.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleD.bnd" />
-
- <!-- jbosgi161 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi161-bundle.jar" files="${tests.resources.dir}/jbosgi161/jbosgi161-bundle.bnd" />
-
- <!-- jbosgi212 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi212-bundle.jar" files="${tests.resources.dir}/jbosgi212/jbosgi212-bundle.bnd" />
-
- <!-- jbosgi214 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi214-bundle.jar" files="${tests.resources.dir}/jbosgi214/jbosgi214-bundle.bnd" />
-
- <!-- performance -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/performance-blueprint.jar" files="${tests.resources.dir}/performance/blueprint/performance-blueprint.bnd" />
-
- <!-- startlevel -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/startlevel.jar" files="${tests.resources.dir}/service/startlevel/startlevel.bnd" />
+ <!-- jbossas/jbosgi36 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/jbossas/jbosgi36/jbosgi36.bnd" />
+ <jar jarfile="${tests.output.dir}/test-libs/jbosgi36-mbean.jar">
+ <fileset dir="${tests.classes.dir}">
+ <include name="org/jboss/test/osgi/jbossas/jbosgi36/mbean/Foo.class" />
+ <include name="org/jboss/test/osgi/jbossas/jbosgi36/mbean/FooMBean.class" />
+ </fileset>
+ <fileset dir="${tests.resources.dir}/jbossas/jbosgi36">
+ <include name="META-INF/jbosgi36-jboss-beans.xml" />
+ </fileset>
+ </jar>
- <!-- Please add alphabetically -->
+ <!-- jbosgi37 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jbosgi37-subB.jar">
+ <fileset dir="${tests.classes.dir}">
+ <include name="org/jboss/test/osgi/jbosgi37/subB/PojoB.class" />
+ </fileset>
+ </jar>
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-subA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-subA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleB.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleB.bnd" />
- </target>
+ <!-- jbosgi38 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleA.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleB.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleX.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleX.bnd" />
+ <!-- jbosgi39 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleB.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleX.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleX.bnd" />
+
+ <!-- jbosgi41 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
+
+ <!-- jbosgi58 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jbosgi58-ejb.jar">
+ <fileset dir="${tests.classes.dir}">
+ <include name="org/jboss/test/osgi/jbossas/jbosgi58/ejb/**" />
+ </fileset>
+ </jar>
+
+ <!-- jbosgi92 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi92-bundleA.jar" files="${tests.resources.dir}/jbosgi92/jbosgi92-bundleA.bnd" />
+
+ <!-- jbosgi99 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-allgood.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-allgood.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-failonresolve.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-failonresolve.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi99-failonstart.jar" files="${tests.resources.dir}/jbosgi99/jbosgi99-failonstart.bnd" />
+
+ <!-- jbosgi108 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi108-bundleA.jar" files="${tests.resources.dir}/jbosgi108/jbosgi108-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi108-bundleB.jar" files="${tests.resources.dir}/jbosgi108/jbosgi108-bundleB.bnd" />
+
+ <!-- jbosgi112 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi112-bundleA.jar" files="${tests.resources.dir}/jbosgi112/jbosgi112-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi112-bundleB.jar" files="${tests.resources.dir}/jbosgi112/jbosgi112-bundleB.bnd" />
+
+ <!-- jbosgi142 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleA.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleB.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi142-bundleX.jar" files="${tests.resources.dir}/jbosgi142/jbosgi142-bundleX.bnd" />
+
+ <!-- jbosgi143 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi143-bundleA.jar" files="${tests.resources.dir}/jbosgi143/jbosgi143-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi143-bundleX.jar" files="${tests.resources.dir}/jbosgi143/jbosgi143-bundleX.bnd" />
+
+ <!-- jbosgi151 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleA.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleB.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleC.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleC.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi151-bundleD.jar" files="${tests.resources.dir}/jbosgi151/jbosgi151-bundleD.bnd" />
+
+ <!-- jbosgi161 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi161-bundle.jar" files="${tests.resources.dir}/jbosgi161/jbosgi161-bundle.bnd" />
+
+ <!-- jbosgi212 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi212-bundle.jar" files="${tests.resources.dir}/jbosgi212/jbosgi212-bundle.bnd" />
+
+ <!-- jbosgi214 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi214-bundle.jar" files="${tests.resources.dir}/jbosgi214/jbosgi214-bundle.bnd" />
+
+ <!-- performance -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/performance-blueprint.jar" files="${tests.resources.dir}/performance/blueprint/performance-blueprint.bnd" />
+
+ <!-- startlevel -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/startlevel.jar" files="${tests.resources.dir}/service/startlevel/startlevel.bnd" />
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
</project>
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java 2009-12-07 17:01:24 UTC (rev 97512)
@@ -0,0 +1,75 @@
+/*
+ * 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.jbossas.jbosgi58;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.internal.RemoteRuntime;
+import org.jboss.test.osgi.jbossas.jbosgi58.ejb.StatelessBean;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * [JBOSGI-58] Framework injection in SLSB
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-58
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 07-Dec-2009
+ */
+@Ignore
+public class OSGI58TestCase extends OSGiTest
+{
+ @Test
+ public void testEJB() throws Exception
+ {
+ RemoteRuntime runtime = (RemoteRuntime)getRemoteRuntime();
+
+ String location = getTestArchivePath("jbosgi58-ejb.jar");
+
+ runtime.deploy(location);
+ try
+ {
+ StatelessBean bean = getRemoteBean(StatelessBean.class);
+ String symbolicName = bean.getFraemworkSymbolicName();
+ assertEquals("foo", symbolicName);
+ }
+ finally
+ {
+ runtime.undeploy(location);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> T getRemoteBean(Class<T> beanClass) throws NamingException
+ {
+ InitialContext initContext = getInitialContext();
+ T bean = (T)initContext.lookup(beanClass.getSimpleName() + "/remote");
+ return bean;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBean.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBean.java 2009-12-07 17:01:24 UTC (rev 97512)
@@ -0,0 +1,30 @@
+/*
+ * 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.jbossas.jbosgi58.ejb;
+
+//$Id$
+
+
+public interface StatelessBean
+{
+ String getFraemworkSymbolicName();
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBeanImpl.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBeanImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBeanImpl.java 2009-12-07 17:01:24 UTC (rev 97512)
@@ -0,0 +1,46 @@
+/*
+ * 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.jbossas.jbosgi58.ejb;
+
+//$Id$
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.annotation.Depends;
+import org.jboss.osgi.spi.management.ManagedBundle;
+import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
+
+@Remote
+@Stateless(name="StatelessBean")
+public class StatelessBeanImpl implements StatelessBean
+{
+ @Depends("jboss.osgi:service=ManagedFramework")
+ ManagedFrameworkMBean framework;
+
+ public String getFraemworkSymbolicName()
+ {
+ ObjectName bundle = framework.getBundle(0);
+ return bundle.getKeyProperty(ManagedBundle.PROPERTY_SYMBOLIC_NAME);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/ejb/StatelessBeanImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-07 16:21:43 UTC (rev 97511)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-07 17:01:24 UTC (rev 97512)
@@ -435,9 +435,15 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jmx-invoker-adaptor-client</artifactId>
- <version>${version.jmx.invoker.adaptor.client}</version>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>6.0.0.M1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
<type>pom</type>
</dependency>
</dependencies>
@@ -460,9 +466,15 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jmx-invoker-adaptor-client</artifactId>
- <version>${version.jmx.invoker.adaptor.client}</version>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>6.0.0.M1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
<type>pom</type>
</dependency>
</dependencies>
16 years, 7 months
JBoss-OSGI SVN: r97510 - projects/jboss-osgi/projects/aQute/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-07 11:09:43 -0500 (Mon, 07 Dec 2009)
New Revision: 97510
Modified:
projects/jboss-osgi/projects/aQute/trunk/pom.xml
Log:
Add DistributionManagement
Modified: projects/jboss-osgi/projects/aQute/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/aQute/trunk/pom.xml 2009-12-07 16:07:52 UTC (rev 97509)
+++ projects/jboss-osgi/projects/aQute/trunk/pom.xml 2009-12-07 16:09:43 UTC (rev 97510)
@@ -16,6 +16,7 @@
<name>aQute</name>
<description>A utility and plugin to wrap, build, or print bundles</description>
+ <url>http://www.aQute.biz/Code/Bnd</url>
<groupId>biz.aQute</groupId>
<artifactId>aQute</artifactId>
@@ -23,6 +24,13 @@
<version>0.0.366-SNAPSHOT</version>
+ <!-- Subversion -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projec...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</developerConnection>
+ <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/aQute/trunk</url>
+ </scm>
+
<!-- Properties -->
<properties>
<version.apache.ant>1.7.1</version.apache.ant>
@@ -132,6 +140,21 @@
</plugins>
</build>
+ <!-- Organization -->
+ <organization>
+ <name>aQute SARL</name>
+ <url>http://www.aQute.biz</url>
+ </organization>
+
+ <!-- Licenses -->
+ <licenses>
+ <license>
+ <name>All files contained in this JAR are licensed under the Apache 2.0 license, unless noted differently in their source (see swing2swt).</name>
+ <url>http://www.opensource.org/licenses/apache2.0.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
<!-- Repositories -->
<repositories>
<repository>
@@ -151,24 +174,17 @@
</repository>
</repositories>
- <url>http://www.aQute.biz/Code/Bnd</url>
+ <!-- DistributionManagement -->
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
- <organization>
- <name>aQute SARL</name>
- <url>http://www.aQute.biz</url>
- </organization>
-
- <licenses>
- <license>
- <name>All files contained in this JAR are licensed under the Apache 2.0 license, unless noted differently in their source (see swing2swt).</name>
- <url>http://www.opensource.org/licenses/apache2.0.php</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projec...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/aQute/trunk</url>
- </scm>
</project>
16 years, 7 months
JBoss-OSGI SVN: r97507 - projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 09:36:31 -0500 (Mon, 07 Dec 2009)
New Revision: 97507
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
Log:
Test mixed SF usage.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-07 13:29:53 UTC (rev 97506)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-07 14:36:31 UTC (rev 97507)
@@ -301,6 +301,74 @@
}
}
+ public void testServiceFactoryMix() throws Throwable
+ {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("C1", C.class.getName());
+ builder.addPropertyMetaData("a", builder.createInject("A"));
+ BeanMetaData bmd = builder.getBeanMetaData();
+ Deployment bean1 = addBean("beanA1", C.class, bmd, A.class, D.class);
+ try
+ {
+ Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle4");
+ try
+ {
+ bundle1.start();
+ BundleContext bundleContext1 = bundle1.getBundleContext();
+ assertNotNull(bundleContext1);
+
+ Class<?> dClass = bundle1.loadClass(D.class.getName());
+ Object d = dClass.newInstance();
+ Hashtable<String, Object> table = new Hashtable<String, Object>();
+ table.put("service.alias.1", "A");
+ ServiceRegistration reg1 = bundleContext1.registerService(A.class.getName(), d, table);
+ assertNotNull(reg1);
+ ServiceReference refA = reg1.getReference();
+ assertNotNull(refA);
+
+ Object a = null;
+ try
+ {
+ checkComplete();
+
+ Object c1 = getBean("C1");
+ a = invoke(c1, "getA", "C1");
+
+ ServiceReference refD = bundleContext1.getServiceReference(C.class.getName());
+ Bundle beanBundle = refD.getBundle();
+ assertNotNull(beanBundle);
+ BundleContext beanBC = beanBundle.getBundleContext();
+ assertNotNull(beanBC);
+ Object service = beanBC.getService(refA);
+ assertSame(a, service);
+
+ KernelControllerContext cCC = getControllerContext("C1", null);
+ change(cCC, ControllerState.INSTANTIATED);
+
+ List as = assertInstanceOf(invoke(d, "getAs", "A"), List.class);
+ assertNotNull(as);
+ assertEmpty(as); // SF is still in use
+ }
+ finally
+ {
+ reg1.unregister();
+ }
+
+ List as = assertInstanceOf(invoke(d, "getAs", "A"), List.class);
+ assertNotNull(as);
+ assertEquals(1, as.size());
+ assertTrue(as.contains(a));
+ }
+ finally
+ {
+ uninstall(bundle1);
+ }
+ }
+ finally
+ {
+ undeploy(bean1);
+ }
+ }
+
public void testFiltering() throws Throwable
{
Deployment bean = addBean("beanA", A.class);
16 years, 7 months
JBoss-OSGI SVN: r97505 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 08:07:39 -0500 (Mon, 07 Dec 2009)
New Revision: 97505
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
Log:
Move manager usage outside loop.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 13:06:23 UTC (rev 97504)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 13:07:39 UTC (rev 97505)
@@ -313,10 +313,11 @@
if (contexts.isEmpty())
return null;
+ OSGiBundleManager manager = getBundleManager();
Set<ServiceReference> result = new HashSet<ServiceReference>();
for (ControllerContext context : contexts)
{
- ServiceReference ref = getBundleManager().getServiceReferenceForContext(context);
+ ServiceReference ref = manager.getServiceReferenceForContext(context);
if (ref != null)
result.add(ref);
}
16 years, 7 months
JBoss-OSGI SVN: r97504 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 08:06:23 -0500 (Mon, 07 Dec 2009)
New Revision: 97504
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
Log:
Move manager usage outside loop.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 13:04:16 UTC (rev 97503)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 13:06:23 UTC (rev 97504)
@@ -363,10 +363,11 @@
if (contexts == null || contexts.isEmpty())
return null;
+ OSGiBundleManager manager = getBundleManager();
List<ServiceReference> references = new ArrayList<ServiceReference>();
for (ControllerContext context : contexts)
{
- ServiceReference ref = getBundleManager().getServiceReferenceForContext(context);
+ ServiceReference ref = manager.getServiceReferenceForContext(context);
if (ref != null)
references.add(ref);
}
16 years, 7 months
JBoss-OSGI SVN: r97503 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 08:04:16 -0500 (Mon, 07 Dec 2009)
New Revision: 97503
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
Log:
Remove unnecessary count check -- we removed add/remove used by usage.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 12:58:57 UTC (rev 97502)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 13:04:16 UTC (rev 97503)
@@ -366,12 +366,9 @@
List<ServiceReference> references = new ArrayList<ServiceReference>();
for (ControllerContext context : contexts)
{
- if (getUsedByCount(context, this) > 0)
- {
- ServiceReference ref = getBundleManager().getServiceReferenceForContext(context);
- if (ref != null)
- references.add(ref);
- }
+ ServiceReference ref = getBundleManager().getServiceReferenceForContext(context);
+ if (ref != null)
+ references.add(ref);
}
if (references.isEmpty())
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-07 12:58:57 UTC (rev 97502)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-07 13:04:16 UTC (rev 97503)
@@ -92,11 +92,8 @@
Set<Bundle> bundles = new HashSet<Bundle>();
for (Object user : users)
{
- if (ct.getUsedByCount(context, user) > 0)
- {
- AbstractBundleState abs = manager.getBundleForUser(user);
- bundles.add(abs.getBundleInternal());
- }
+ AbstractBundleState abs = manager.getBundleForUser(user);
+ bundles.add(abs.getBundleInternal());
}
if (bundles.isEmpty() == false)
return bundles.toArray(new Bundle[bundles.size()]);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-07 12:58:57 UTC (rev 97502)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-07 13:04:16 UTC (rev 97503)
@@ -542,11 +542,8 @@
Set<Bundle> bundles = new HashSet<Bundle>();
for (Object user : users)
{
- if (ct.getUsedByCount(this, user) > 0)
- {
- AbstractBundleState abs = manager.getBundleForUser(user);
- bundles.add(abs.getBundleInternal());
- }
+ AbstractBundleState abs = manager.getBundleForUser(user);
+ bundles.add(abs.getBundleInternal());
}
return bundles.toArray(new Bundle[bundles.size()]);
}
16 years, 7 months
JBoss-OSGI SVN: r97502 - in projects/jboss-osgi/projects/runtime/framework/trunk/src: test/java/org/jboss/test/osgi/service and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 07:58:57 -0500 (Mon, 07 Dec 2009)
New Revision: 97502
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java
Log:
Fix getRegisteredServices bug.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -299,30 +299,17 @@
}
/**
- * Add a registered service
- *
- * @param context the context
+ * Get registered contexts.
+ *
+ * @return the registered contexts
*/
- void addRegisteredService(ControllerContext context)
- {
- addUsedBy(context, this);
- }
+ protected abstract Set<ControllerContext> getRegisteredContexts();
- /**
- * Remove a registered service
- *
- * @param context the context
- */
- void removeRegisteredService(ControllerContext context)
- {
- removeUsedBy(context, this);
- }
-
public ServiceReference[] getRegisteredServices()
{
checkInstalled();
- Set<ControllerContext> contexts = getUsedContexts(this);
+ Set<ControllerContext> contexts = getRegisteredContexts();
if (contexts.isEmpty())
return null;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -1414,6 +1414,18 @@
}
/**
+ * Get registered contexts for bundle.
+ *
+ * @param bundleState the owning bundle
+ * @return registered contexts
+ */
+ Set<ControllerContext> getRegisteredContext(OSGiBundleState bundleState)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ return registry.getContexts(unit);
+ }
+
+ /**
* Unregister a service
*
* @param serviceState the service state
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -25,6 +25,7 @@
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import org.jboss.dependency.spi.ControllerContext;
@@ -85,6 +86,11 @@
unit.getMutableMetaData().addMetaData(unit, DeploymentUnit.class);
}
+ protected Set<ControllerContext> getRegisteredContexts()
+ {
+ return getBundleManager().getRegisteredContext(this);
+ }
+
public long getBundleId()
{
return bundleId;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -656,7 +656,6 @@
void internalRegister()
{
checkPermission("register", true);
- getBundleState().addRegisteredService(this);
}
/**
@@ -664,10 +663,6 @@
*/
void internalUnregister()
{
- // let's remove us from our bundle first
- // so, we're not "mistaken" for a real user
- getBundleState().removeRegisteredService(this);
-
ContextTracker ct = getContextTracker();
if (ct != null) // nobody used us?
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -25,9 +25,12 @@
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
+import java.util.Set;
+import org.jboss.dependency.spi.ControllerContext;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
import org.jboss.osgi.spi.NotImplementedException;
+import org.jboss.util.collection.ConcurrentSet;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
@@ -41,6 +44,9 @@
*/
public class OSGiSystemState extends AbstractBundleState
{
+ /** The registred contexts */
+ private Set<ControllerContext> registered = new ConcurrentSet<ControllerContext>();
+
/**
* Create a new OSGiSystemBundle.
* @param osgiMetaData the metadata for the system bundle
@@ -50,6 +56,23 @@
super(osgiMetaData);
}
+ protected Set<ControllerContext> getRegisteredContexts()
+ {
+ return registered;
+ }
+
+ @Override
+ protected void afterServiceRegistration(OSGiServiceState service)
+ {
+ registered.add(service);
+ }
+
+ @Override
+ protected void beforeServiceUnregistration(OSGiServiceState service)
+ {
+ registered.remove(service);
+ }
+
public long getBundleId()
{
return 0;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java 2009-12-07 12:58:17 UTC (rev 97501)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java 2009-12-07 12:58:57 UTC (rev 97502)
@@ -283,4 +283,48 @@
uninstall(bundle1);
}
}
+
+ public void testRegisteredServices() throws Exception
+ {
+ Bundle bundle1 = addBundle("/bundles/simple/", "simple-bundle1");
+ try
+ {
+ bundle1.start();
+ BundleContext bundleContext = bundle1.getBundleContext();
+ assertNotNull(bundleContext);
+
+ ServiceRegistration registration = bundleContext.registerService(OBJCLASS, bundleContext, null);
+ ServiceReference reference = registration.getReference();
+ Object actual = bundleContext.getService(reference);
+ assertEquals(bundleContext, actual);
+
+ Bundle bundle2 = addBundle("/bundles/simple/", "simple-bundle2");
+ try
+ {
+ bundle2.start();
+ BundleContext bundleContext2 = bundle2.getBundleContext();
+ assertNotNull(bundleContext2);
+
+ actual = bundleContext2.getService(reference);
+ assertEquals(bundleContext, actual);
+
+ ServiceReference[] registered = bundle2.getRegisteredServices();
+ assertNull(registered);
+
+ registered = bundle1.getRegisteredServices();
+ assertEquals(new ServiceReference[]{reference}, registered);
+ }
+ finally
+ {
+ uninstall(bundle2);
+ }
+
+ actual = bundleContext.getService(reference);
+ assertEquals(bundleContext, actual);
+ }
+ finally
+ {
+ uninstall(bundle1);
+ }
+ }
}
16 years, 7 months
JBoss-OSGI SVN: r97499 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 06:52:56 -0500 (Mon, 07 Dec 2009)
New Revision: 97499
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
Log:
Fix getUsginBundles return value.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-07 11:52:20 UTC (rev 97498)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-07 11:52:56 UTC (rev 97499)
@@ -87,18 +87,19 @@
if (ct == null)
return null;
+ OSGiBundleManager manager = bundleState.getBundleManager();
Set<Object> users = ct.getUsers(context);
Set<Bundle> bundles = new HashSet<Bundle>();
for (Object user : users)
{
if (ct.getUsedByCount(context, user) > 0)
{
- OSGiBundleManager manager = bundleState.getBundleManager();
AbstractBundleState abs = manager.getBundleForUser(user);
bundles.add(abs.getBundleInternal());
}
}
- return bundles.toArray(new Bundle[bundles.size()]);
+ if (bundles.isEmpty() == false)
+ return bundles.toArray(new Bundle[bundles.size()]);
}
return null;
}
16 years, 7 months
JBoss-OSGI SVN: r97490 - in projects/jboss-osgi/projects/runtime/framework/trunk/src: test/java/org/jboss/test/osgi/service and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-07 04:10:44 -0500 (Mon, 07 Dec 2009)
New Revision: 97490
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java
Log:
Add bundle uninstall tests on 2nd non-registering service bundle.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-07 06:32:02 UTC (rev 97489)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-07 09:10:44 UTC (rev 97490)
@@ -1449,7 +1449,7 @@
*
* @param context the context
*/
- private void unregisterContext(ControllerContext context)
+ private static void unregisterContext(ControllerContext context)
{
if (context instanceof ServiceRegistration)
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java 2009-12-07 06:32:02 UTC (rev 97489)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/RegisterServiceUnitTestCase.java 2009-12-07 09:10:44 UTC (rev 97490)
@@ -38,6 +38,7 @@
*
* todo test secutiry
* @author <a href="adrian(a)jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
* @version $Revision: 1.1 $
*/
public class RegisterServiceUnitTestCase extends FrameworkTest
@@ -244,4 +245,42 @@
uninstall(bundle);
}
}
+
+ public void testBundleUninstall() throws Exception
+ {
+ Bundle bundle1 = addBundle("/bundles/simple/", "simple-bundle1");
+ try
+ {
+ bundle1.start();
+ BundleContext bundleContext = bundle1.getBundleContext();
+ assertNotNull(bundleContext);
+
+ ServiceRegistration registration = bundleContext.registerService(OBJCLASS, bundleContext, null);
+ ServiceReference reference = registration.getReference();
+ Object actual = bundleContext.getService(reference);
+ assertEquals(bundleContext, actual);
+
+ Bundle bundle2 = addBundle("/bundles/simple/", "simple-bundle2");
+ try
+ {
+ bundle2.start();
+ BundleContext bundleContext2 = bundle2.getBundleContext();
+ assertNotNull(bundleContext2);
+
+ actual = bundleContext2.getService(reference);
+ assertEquals(bundleContext, actual);
+ }
+ finally
+ {
+ uninstall(bundle2);
+ }
+
+ actual = bundleContext.getService(reference);
+ assertEquals(bundleContext, actual);
+ }
+ finally
+ {
+ uninstall(bundle1);
+ }
+ }
}
16 years, 7 months
JBoss-OSGI SVN: r97486 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-06 07:30:28 -0500 (Sun, 06 Dec 2009)
New Revision: 97486
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
Log:
Fix bundle stop + its services unregistry bug.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-06 03:30:23 UTC (rev 97485)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-06 12:30:28 UTC (rev 97486)
@@ -1430,11 +1430,26 @@
}
/**
+ * Unregister contexts.
+ *
+ * @param bundleState the stopping bundle
+ */
+ void unregisterContexts(OSGiBundleState bundleState)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ Set<ControllerContext> contexts = registry.getContexts(unit);
+ for (ControllerContext context : contexts)
+ {
+ unregisterContext(context);
+ }
+ }
+
+ /**
* Unregister context.
*
* @param context the context
*/
- void unregisterContext(ControllerContext context)
+ private void unregisterContext(ControllerContext context)
{
if (context instanceof ServiceRegistration)
{
@@ -1454,7 +1469,7 @@
{
ControllerContextHandle handle = (ControllerContextHandle)reference;
ControllerContext context = handle.getContext();
- if (isUnregistered(context)) // we're probably not installed anymore
+ if (isUnregistered(context)) // we're probably not installed anymore
return null;
return bundleState.addContextInUse(context);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-06 03:30:23 UTC (rev 97485)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-06 12:30:28 UTC (rev 97486)
@@ -359,10 +359,11 @@
}
count--;
}
-
- getBundleManager().unregisterContext(context);
}
+ // unregister bundle's contexts
+ getBundleManager().unregisterContexts(this);
+
if (getState() != STOPPING)
throw new BundleException("Bundle has been uninstalled: " + getCanonicalName());
}
16 years, 7 months