JBoss-OSGI SVN: r97997 - projects/jboss-osgi/projects/runtime/deployment/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-18 12:41:46 -0500 (Fri, 18 Dec 2009)
New Revision: 97997
Modified:
projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml
Log:
Update to jboss-deployers-2.2.0-SNAPSHOT
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml 2009-12-18 17:18:10 UTC (rev 97996)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml 2009-12-18 17:41:46 UTC (rev 97997)
@@ -38,7 +38,7 @@
<!-- Properties -->
<properties>
- <version.jboss.deployers>2.0.9.GA</version.jboss.deployers>
+ <version.jboss.deployers>2.2.0-SNAPSHOT</version.jboss.deployers>
<version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>4.2.0</version.osgi>
</properties>
14 years, 5 months
JBoss-OSGI SVN: r97987 - projects/jboss-osgi/trunk/reactor.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-18 05:59:36 -0500 (Fri, 18 Dec 2009)
New Revision: 97987
Modified:
projects/jboss-osgi/trunk/reactor/pom.xml
Log:
Build the framework in hudson
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:53:19 UTC (rev 97986)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:59:36 UTC (rev 97987)
@@ -48,14 +48,15 @@
<profiles>
<!--
- Name: noframework
- Descr: Build the MC based framework when no other framework is specified
+ Name: framework-jbossmc
+ Descr: Build the MC based framework
-->
<profile>
- <id>noframework</id>
+ <id>framework-jbossmc</id>
<activation>
<property>
- <name>!framework</name>
+ <name>framework</name>
+ <value>jbossmc</value>
</property>
</activation>
<modules>
14 years, 5 months
JBoss-OSGI SVN: r97986 - projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-18 05:53:19 -0500 (Fri, 18 Dec 2009)
New Revision: 97986
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
Log:
Fix framework setup in Runtime
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2009-12-18 10:52:24 UTC (rev 97985)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2009-12-18 10:53:19 UTC (rev 97986)
@@ -12,6 +12,7 @@
<constructor>
<parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
<parameter><inject bean="MainDeployer" /></parameter>
+ <parameter><inject bean="DeploymentRegistry" /></parameter>
</constructor>
<property name="properties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
@@ -150,6 +151,9 @@
<property name="deployers"><inject bean="Deployers" /></property>
</bean>
+ <!-- The deployment registry -->
+ <bean name="DeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
<!-- The holder for deployers that determine structure -->
<bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
<property name="structureBuilder">
@@ -169,6 +173,9 @@
<uncallback method="removeDeployer" />
</bean>
+ <!-- Bundle Structure -->
+ <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+
<!-- JAR & File Structure (needed for negative testing) -->
<bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
<bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
@@ -180,15 +187,19 @@
<constructor>
<parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
</constructor>
+ <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
</bean>
<!-- OSGI Deployment -->
- <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
- <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
+ <bean name="OSGiBundleStateAddDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateAddDeployer">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
+ <bean name="OSGiBundleStateRemoveDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateRemoveDeployer">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
<bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
+ <bean name="OSGiContextTrackerDeployer" class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
<!--
********************************
@@ -230,4 +241,4 @@
<property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
</bean>
-</deployment>
\ No newline at end of file
+</deployment>
14 years, 5 months
JBoss-OSGI SVN: r97984 - in projects/jboss-osgi/trunk: distribution/javadoc/scripts and 5 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-18 05:47:39 -0500 (Fri, 18 Dec 2009)
New Revision: 97984
Removed:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/bundle/
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi212/
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
projects/jboss-osgi/trunk/hudson/hudson-home/jobs/jbossosgi-matrix-jbossmc/config.xml
projects/jboss-osgi/trunk/reactor/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
Log:
Fix embedded for Felix/Equinox
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-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-12-18 10:47:39 UTC (rev 97984)
@@ -324,6 +324,7 @@
<include name="jboss-osgi-framework.jar" />
<include name="jboss-reflect.jar" />
<include name="jbossxb.jar" />
+ <include name="mcann-core.jar" />
<include name="xercesImpl.jar" />
</fileset>
<fileset condition="isJBossMC" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="$INSTALL_PATH/runtime/lib" override="true">
Modified: projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-12-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-12-18 10:47:39 UTC (rev 97984)
@@ -22,7 +22,6 @@
<include>*:jboss-osgi-jmx:jar:sources</include>
<include>*:jboss-osgi-jndi:jar:sources</include>
<include>*:jboss-osgi-jta:jar:sources</include>
- <include>*:jboss-osgi-microcontainer:jar:sources</include>
<include>*:jboss-osgi-spi:jar:sources</include>
<include>*:jboss-osgi-webapp:jar:sources</include>
<include>*:jboss-osgi-xml-binding:jar:sources</include>
Modified: projects/jboss-osgi/trunk/hudson/hudson-home/jobs/jbossosgi-matrix-jbossmc/config.xml
===================================================================
--- projects/jboss-osgi/trunk/hudson/hudson-home/jobs/jbossosgi-matrix-jbossmc/config.xml 2009-12-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/hudson/hudson-home/jobs/jbossosgi-matrix-jbossmc/config.xml 2009-12-18 10:47:39 UTC (rev 97984)
@@ -41,7 +41,6 @@
<name>container</name>
<values>
<string>runtime</string>
- <string>jboss600</string>
<string>jboss601</string>
</values>
</axis>
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:47:39 UTC (rev 97984)
@@ -48,14 +48,14 @@
<profiles>
<!--
- Name: framework-equinox
- Descr: Setup for Equinox framework integration testing
+ Name: noframework
+ Descr: Build the MC based framework when no other framework is specified
-->
<profile>
<id>noframework</id>
<activation>
<property>
- <name>!noframework</name>
+ <name>!framework</name>
</property>
</activation>
<modules>
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-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-12-18 10:47:39 UTC (rev 97984)
@@ -137,9 +137,6 @@
<!-- 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" />
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-12-18 10:29:18 UTC (rev 97983)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-12-18 10:47:39 UTC (rev 97984)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.jbosgi212;
-
-//$Id:$
-
-import static org.junit.Assert.assertNotNull;
-
-import org.jboss.osgi.jmx.JMXCapability;
-import org.jboss.osgi.spi.service.MicrocontainerService;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiServiceReference;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-212] Cannot refresh Microcontainer service
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-212
- *
- * @author thomas.diesler(a)jboss.com
- * @since 25-Nov-2009
- */
-public class OSGI212TestCase extends OSGiTest
-{
- @Test
- public void testServiceRestart() throws Exception
- {
- OSGiRuntime runtime = getDefaultRuntime();
- try
- {
- runtime.addCapability(new JMXCapability());
-
- // On the MC Framework there is no such bundle. The service should still be available.
- OSGiBundle bundle = runtime.getBundle("jboss-osgi-microcontainer", null);
- if (bundle != null)
- {
- assertNotNull("MicrocontainerService available", bundle);
- assertBundleState(Bundle.ACTIVE, bundle.getState());
-
- // Update the MC bundle
- bundle.stop();
- bundle.start();
- }
-
- OSGiServiceReference sref = runtime.getServiceReference(MicrocontainerService.class.getName());
- assertNotNull("MicrocontainerService still available", sref);
- }
- finally
- {
- runtime.shutdown();
- }
- }
-}
\ No newline at end of file
14 years, 5 months
JBoss-OSGI SVN: r97983 - in projects/jboss-osgi: trunk and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-18 05:29:18 -0500 (Fri, 18 Dec 2009)
New Revision: 97983
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
projects/jboss-osgi/trunk/reactor/pom.xml
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml
Log:
Remove microcontainer/blueprint support for Felix & Equinox
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-18 10:29:18 UTC (rev 97983)
@@ -1,4 +1,4 @@
-#Fri Dec 04 12:28:37 CET 2009
+#Fri Dec 18 11:03:28 CET 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
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-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -146,7 +146,6 @@
<include name="jboss-osgi-jmx-sources.jar" />
<include name="jboss-osgi-jndi-sources.jar" />
<include name="jboss-osgi-jta-sources.jar" />
- <include name="jboss-osgi-microcontainer-sources.jar" />
<include name="jboss-osgi-reflect-sources.jar" />
<include name="jboss-osgi-runtime-equinox-sources.jar" />
<include name="jboss-osgi-runtime-felix-sources.jar" />
@@ -269,9 +268,6 @@
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
<include name="org.osgi.compendium.jar" />
</fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
- <include name="jboss-osgi-microcontainer.jar" />
- </fileset>
<!-- Equinox Integration -->
@@ -293,9 +289,6 @@
<include name="org.eclipse.osgi.services.jar" />
<include name="org.eclipse.osgi.util.jar" />
</fileset>
- <fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
- <include name="jboss-osgi-microcontainer.jar" />
- </fileset>
<!-- JBossMC Integration -->
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -231,22 +231,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
- <version>${version.jboss.osgi.microcontainer}</version>
- <classifier>sources</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
- <version>${version.jboss.osgi.microcontainer}</version>
- <classifier>javadoc</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webapp</artifactId>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -61,7 +61,6 @@
<version.jboss.osgi.jmx>1.0.2.SP1</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.2</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
- <version.jboss.osgi.microcontainer>2.2.0-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.reflect>2.2.0-SNAPSHOT</version.jboss.osgi.reflect>
<version.jboss.osgi.runtime.deployers>1.0.4-SNAPSHOT</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.runtime.equinox>3.5.1</version.jboss.osgi.runtime.equinox>
@@ -143,11 +142,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
- <version>${version.jboss.osgi.microcontainer}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-reflect</artifactId>
<version>${version.jboss.osgi.reflect}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -89,17 +89,17 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
+ <artifactId>jboss-osgi-reflect</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-reflect</artifactId>
+ <artifactId>jboss-osgi-xml-binding</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-xml-binding</artifactId>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-framework</artifactId>
<scope>provided</scope>
</dependency>
@@ -302,13 +302,6 @@
<value>equinox</value>
</property>
</activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-equinox</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
<build>
<plugins>
<plugin>
@@ -333,58 +326,18 @@
<value>felix</value>
</property>
</activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-felix</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <!--
- Name: framework-jbossmc
- Descr: Setup for JBossMC framework integration testing
- -->
- <profile>
- <id>framework-jbossmc</id>
- <activation>
- <property>
- <name>framework</name>
- <value>jbossmc</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-framework</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
<build>
<plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
- <profile>
- <id>framework-jbossmc-default</id>
- <activation>
- <property>
- <name>!framework</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-framework</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- </plugins>
- </build>
- </profile>
+
</profiles>
</project>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -22,7 +22,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-reflect:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
</includes>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-12-18 10:29:18 UTC (rev 97983)
@@ -24,8 +24,8 @@
//$Id$
import org.jboss.osgi.jbossxb.XMLBindingCapability;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.testing.OSGiRuntime;
/**
* Adds the Blueprint capability to the {@link OSGiRuntime}
@@ -45,7 +45,6 @@
super (BlueprintService.class.getName());
addDependency(new XMLBindingCapability());
- addDependency(new MicrocontainerCapability());
addBundle("bundles/jboss-osgi-blueprint.jar");
}
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -41,8 +41,28 @@
</parent>
<modules>
- <module>framework</module>
<module>blueprint</module>
</modules>
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: framework-equinox
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>noframework</id>
+ <activation>
+ <property>
+ <name>!noframework</name>
+ </property>
+ </activation>
+ <modules>
+ <module>framework</module>
+ </modules>
+ </profile>
+
+ </profiles>
+
</project>
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -182,15 +182,14 @@
<configuration>
<excludes>
<exclude>${target.container.excludes}</exclude>
- <!-- exclude interceptor based tests -->
+ <!-- [JBOSGI-236] XML Binding example fails in JBossAS -->
+ <exclude>org/jboss/test/osgi/example/xml/jbossxb/**</exclude>
+ <!-- Functionality not supported in Equinox -->
+ <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
+ <exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppNegativeTestCase.class</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.class</exclude>
- <!-- [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath -->
- <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
- <exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
- <!-- [JBOSGI-236] XML Binding example fails in JBossAS -->
- <exclude>org/jboss/test/osgi/example/xml/jbossxb/**</exclude>
</excludes>
</configuration>
</plugin>
@@ -241,6 +240,9 @@
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppNegativeTestCase.class</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.class</exclude>
+ <!-- Functionality not supported in Felix -->
+ <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
+ <exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -24,7 +24,6 @@
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
<include>*:jboss-osgi-jta:jar</include>
- <include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-reflect:jar</include>
<include>*:jboss-osgi-webapp:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-12-18 10:29:18 UTC (rev 97983)
@@ -26,7 +26,7 @@
import static org.jboss.test.osgi.example.microcontainer.bundleA.SomeBeanMBean.MBEAN_NAME;
import static org.junit.Assert.assertEquals;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
@@ -51,7 +51,7 @@
public static void setUpClass() throws Exception
{
runtime = new OSGiTestHelper().getDefaultRuntime();
- runtime.addCapability(new MicrocontainerCapability());
+ runtime.addCapability(new JMXCapability());
bundleA = runtime.installBundle("example-mcservice-bundleA.jar");
bundleA.start();
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -23,7 +23,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-reflect:jar</include>
<include>*:jboss-osgi-webapp:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-12-18 10:29:18 UTC (rev 97983)
@@ -25,7 +25,7 @@
import static org.junit.Assert.assertNotNull;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.spi.service.MicrocontainerService;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
@@ -50,7 +50,7 @@
OSGiRuntime runtime = getDefaultRuntime();
try
{
- runtime.addCapability(new MicrocontainerCapability());
+ runtime.addCapability(new JMXCapability());
// On the MC Framework there is no such bundle. The service should still be available.
OSGiBundle bundle = runtime.getBundle("jboss-osgi-microcontainer", null);
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-12-18 10:29:18 UTC (rev 97983)
@@ -26,7 +26,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.testing.OSGiTest;
@@ -53,7 +53,7 @@
public static void setUpClass() throws Exception
{
runtime = (RemoteRuntime)new OSGiTestHelper().getRemoteRuntime();
- runtime.addCapability(new MicrocontainerCapability());
+ runtime.addCapability(new JMXCapability());
runtime.installBundle("jbosgi36-bundle.jar");
runtime.deploy("jbosgi36-mbean.jar");
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -154,11 +154,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-microcontainer</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webapp</artifactId>
<scope>provided</scope>
</dependency>
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml 2009-12-18 10:12:55 UTC (rev 97982)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml 2009-12-18 10:29:18 UTC (rev 97983)
@@ -32,7 +32,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.felix.configadmin:jar</include>
<include>*:org.apache.felix.log:jar</include>
14 years, 5 months
JBoss-OSGI SVN: r97973 - in projects/jboss-osgi/projects/runtime/framework/trunk/src: main/java/org/jboss/osgi/framework/classloading and 17 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-17 16:38:32 -0500 (Thu, 17 Dec 2009)
New Revision: 97973
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF
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/InstanceMetaDataRetrievalFactory.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.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/OSGiScopeInfo.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.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/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/AbstractOSGiBundleStateDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleStateRemoveDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/NoFilter.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTestDelegate.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/RequireBundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesUnitTestCase.java
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/ServiceReferenceUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/smoke/OSGiSmokeTestCase.java
Log:
Add initial support for Bundle.update()
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-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -77,9 +77,6 @@
/** The bundle manager */
private OSGiBundleManager bundleManager;
- /** The osgi metadata */
- private OSGiMetaData osgiMetaData;
-
/** The bundle context */
private BundleContext bundleContext;
@@ -89,27 +86,7 @@
/** The bundle state */
private AtomicInteger state = new AtomicInteger(Bundle.UNINSTALLED);
- /** The cached symbolic name */
- private String symbolicName;
-
- /** The cached version */
- private Version version;
-
/**
- * Create a new BundleState for the system bundle.
- *
- * @param osgiMetaData the osgi metadata
- * @throws IllegalArgumentException for a null parameter
- */
- AbstractBundleState(OSGiMetaData osgiMetaData)
- {
- if (osgiMetaData == null)
- throw new IllegalArgumentException("Null osgi metadata");
-
- this.osgiMetaData = osgiMetaData;
- }
-
- /**
* Get the bundleManager.
*
* @return the bundleManager.
@@ -118,26 +95,21 @@
{
if (bundleManager == null)
throw new IllegalStateException("Bundle not installed: " + getCanonicalName());
-
+
return bundleManager;
}
public String getSymbolicName()
{
+ String symbolicName = getOSGiMetaData().getBundleSymbolicName();
if (symbolicName == null)
- {
- symbolicName = osgiMetaData.getBundleSymbolicName();
- if (symbolicName == null)
- throw new IllegalStateException("Cannot obtain " + Constants.BUNDLE_SYMBOLICNAME);
- }
+ throw new IllegalStateException("Cannot obtain " + Constants.BUNDLE_SYMBOLICNAME);
return symbolicName;
}
public Version getVersion()
{
- if (version == null)
- version = osgiMetaData.getBundleVersion();
-
+ Version version = getOSGiMetaData().getBundleVersion();
return version;
}
@@ -202,7 +174,7 @@
List<Bundle> bundles = new ArrayList<Bundle>(bundleStates.size());
for (AbstractBundleState bundleState : bundleStates)
bundles.add(bundleState.getBundleInternal());
-
+
return bundles.toArray(new Bundle[bundles.size()]);
}
@@ -221,10 +193,7 @@
*
* @return the osgiMetaData.
*/
- public OSGiMetaData getOSGiMetaData()
- {
- return osgiMetaData;
- }
+ public abstract OSGiMetaData getOSGiMetaData();
@SuppressWarnings("rawtypes")
public Dictionary getHeaders()
@@ -376,7 +345,7 @@
}
if (references.isEmpty())
- return null;
+ return null;
return references.toArray(new ServiceReference[references.size()]);
}
@@ -510,13 +479,6 @@
stop(0);
}
- public void update() throws BundleException
- {
- checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
- // [TODO] update
- throw new UnsupportedOperationException("update");
- }
-
void uninstallInternal()
{
changeState(Bundle.UNINSTALLED);
@@ -621,8 +583,19 @@
*/
public void changeState(int state)
{
+ changeState(state, true);
+ }
+
+ /**
+ * Change the state of the bundle
+ *
+ * @param state the new state
+ * @param fireEvent if true the state change fires an event
+ */
+ public void changeState(int state, boolean fireEvent)
+ {
int previous = getState();
-
+
// Get the corresponding bundle event type
int bundleEventType;
switch (state)
@@ -658,7 +631,7 @@
default:
throw new IllegalArgumentException("Unknown bundle state: " + state);
}
-
+
// Invoke the bundle lifecycle interceptors
if (getBundleManager().isFrameworkActive() && getBundleId() != 0)
{
@@ -666,12 +639,12 @@
if (plugin != null)
plugin.handleStateChange(state, getBundleInternal());
}
-
+
this.state.set(state);
log.debug(this + " change state=" + ConstantsHelper.bundleState(state));
// Fire the bundle event
- if (getBundleManager().isFrameworkActive())
+ if (fireEvent == true && getBundleManager().isFrameworkActive())
{
FrameworkEventsPlugin plugin = getBundleManager().getPlugin(FrameworkEventsPlugin.class);
plugin.fireBundleEvent(this, bundleEventType);
@@ -735,13 +708,13 @@
{
if (bundle == null)
throw new IllegalArgumentException("Null bundle");
-
+
if (bundle instanceof OSGiBundleWrapper)
bundle = ((OSGiBundleWrapper)bundle).getBundleState();
-
+
if (bundle instanceof AbstractBundleState == false)
throw new IllegalArgumentException("Not an AbstractBundleState: " + bundle);
-
+
return (AbstractBundleState)bundle;
}
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -42,6 +42,8 @@
public class InstanceMetaDataRetrievalFactory implements MetaDataRetrievalFactory
{
private Controller controller;
+
+ @SuppressWarnings("rawtypes")
private Set<DictionaryFactory> factories = new CopyOnWriteArraySet<DictionaryFactory>();
public InstanceMetaDataRetrievalFactory(Controller controller)
@@ -51,7 +53,7 @@
this.controller = controller;
}
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({"unchecked", "rawtypes"})
public MetaDataRetrieval getMetaDataRetrieval(Scope scope)
{
if (scope == null)
@@ -89,6 +91,7 @@
* @param factory the factory
* @return Set#add
*/
+ @SuppressWarnings("rawtypes")
public boolean addFactory(DictionaryFactory factory)
{
if (factory == null)
@@ -105,6 +108,7 @@
* @param factory the factory
* @return Set#add
*/
+ @SuppressWarnings("rawtypes")
public boolean removeFactory(DictionaryFactory factory)
{
if (factory == null)
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -192,7 +192,7 @@
*/
private static ClassLoader getClassLoader(Object instance)
{
- return (instance instanceof Class) ? Class.class.cast(instance).getClassLoader() : instance.getClass().getClassLoader();
+ return (instance instanceof Class<?>) ? Class.class.cast(instance).getClassLoader() : instance.getClass().getClassLoader();
}
/**
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-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -92,6 +92,7 @@
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
import org.osgi.framework.Filter;
@@ -217,13 +218,8 @@
public void start()
{
- // createSystemBundle
- Manifest manifest = new Manifest();
- Attributes attributes = manifest.getMainAttributes();
- attributes.put(new Name(Constants.BUNDLE_NAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- OSGiMetaData systemMetaData = new AbstractOSGiMetaData(manifest);
- systemBundle = new OSGiSystemState(systemMetaData);
+ // Create the system Bundle
+ systemBundle = new OSGiSystemState();
addBundle(systemBundle);
applyMDRUsage(true);
@@ -594,7 +590,7 @@
* @return the bundle state
* @throws BundleException for any error
*/
- public AbstractBundleState installBundle(URL url) throws BundleException
+ public OSGiBundleState installBundle(URL url) throws BundleException
{
if (url == null)
throw new BundleException("Null url");
@@ -610,7 +606,7 @@
* @return the bundle state
* @throws BundleException for any error
*/
- public AbstractBundleState installBundle(String location, InputStream input) throws BundleException
+ public OSGiBundleState installBundle(String location, InputStream input) throws BundleException
{
if (location == null)
throw new BundleException("Null location");
@@ -620,23 +616,7 @@
// Get the location URL
if (input != null)
{
- try
- {
- BundleStoragePlugin plugin = getPlugin(BundleStoragePlugin.class);
- String path = plugin.getStorageDir(getSystemBundle()).getCanonicalPath();
-
- // [TODO] do properly
- File file = new File(path + "/bundle-" + System.currentTimeMillis() + ".jar");
- FileOutputStream fos = new FileOutputStream(file);
- VFSUtils.copyStream(input, fos);
- fos.close();
-
- locationURL = file.toURI().toURL();
- }
- catch (IOException ex)
- {
- throw new BundleException("Cannot store bundle from input stream", ex);
- }
+ locationURL = getBundleStorageLocation(input);
}
else
{
@@ -657,6 +637,28 @@
return install(root, location, false);
}
+ private URL getBundleStorageLocation(InputStream input) throws BundleException
+ {
+ try
+ {
+ BundleStoragePlugin plugin = getPlugin(BundleStoragePlugin.class);
+ String path = plugin.getStorageDir(getSystemBundle()).getCanonicalPath();
+
+ // [TODO] do properly
+ File file = new File(path + "/bundle-" + System.currentTimeMillis() + ".jar");
+ FileOutputStream fos = new FileOutputStream(file);
+ VFSUtils.copyStream(input, fos);
+ fos.close();
+
+ URL locationURL = file.toURI().toURL();
+ return locationURL;
+ }
+ catch (IOException ex)
+ {
+ throw new BundleException("Cannot store bundle from input stream", ex);
+ }
+ }
+
/**
* Install a bundle from a virtual file.
*
@@ -665,7 +667,7 @@
* @return the bundle state
* @throws BundleException for any error
*/
- public AbstractBundleState installBundle(VirtualFile root) throws BundleException
+ public OSGiBundleState installBundle(VirtualFile root) throws BundleException
{
return install(root, root.toString(), false);
}
@@ -673,7 +675,7 @@
/*
* Installs a bundle from the given virtual file.
*/
- private AbstractBundleState install(VirtualFile root, String location, boolean autoStart) throws BundleException
+ private OSGiBundleState install(VirtualFile root, String location, boolean autoStart) throws BundleException
{
if (location == null)
throw new IllegalArgumentException("Null location");
@@ -693,7 +695,7 @@
* @return the bundle state
* @throws BundleException for any error
*/
- public AbstractBundleState installBundle(Deployment dep) throws BundleException
+ public OSGiBundleState installBundle(Deployment dep) throws BundleException
{
// Create the deployment and deploy it
try
@@ -731,38 +733,98 @@
}
}
- private URL getLocationURL(String location) throws BundleException
+ /**
+ * Updates a bundle from an InputStream.
+ */
+ public void updateBundle(OSGiBundleState bundleState, InputStream in) throws BundleException
{
- // Try location as URL
- URL url = null;
- try
+ // If the specified InputStream is null, the Framework must create the InputStream from which to read the updated bundle by interpreting,
+ // in an implementation dependent manner, this bundle's Bundle-UpdateLocation Manifest header, if present, or this bundle's original location.
+ URL updateURL = bundleState.getOSGiMetaData().getBundleUpdateLocation();
+ if (in == null)
{
- url = new URL(location);
+ try
+ {
+ if (updateURL == null)
+ throw new IllegalStateException("Cannot obtain Bundle-UpdateLocation for: " + bundleState);
+
+ in = updateURL.openStream();
+ }
+ catch (IOException ex)
+ {
+ throw new BundleException("Cannot obtain update input stream for: " + bundleState, ex);
+ }
}
- catch (MalformedURLException e)
+
+ // If this bundle's state is ACTIVE, it must be stopped before the update and started after the update successfully completes.
+ boolean activeBeforeUpdate = (bundleState.getState() == Bundle.ACTIVE);
+
+ // If this bundle's state is UNINSTALLED then an IllegalStateException is thrown.
+ if (bundleState.getState() == Bundle.UNINSTALLED)
+ throw new IllegalStateException("Bundle already uninstalled: " + this);
+
+ // If this bundle has exported any packages that are imported by another bundle, these packages must not be updated.
+ // Instead, the previous package version must remain exported until the PackageAdmin.refreshPackages method has been
+ // has been called or the Framework is relaunched.
+
+ // If this bundle's state is ACTIVE, STARTING or STOPPING, this bundle is stopped as described in the Bundle.stop method.
+ // If Bundle.stop throws an exception, the exception is rethrown terminating the update.
+ if (bundleState.getState() == Bundle.ACTIVE || bundleState.getState() == Bundle.STARTING || bundleState.getState() == Bundle.STOPPING)
{
- // ignore
+ stopBundle(bundleState);
}
- // Try location as File
- if (url == null)
+ // The updated version of this bundle is read from the input stream and installed.
+ // If the Framework is unable to install the updated version of this bundle, the original version of this bundle must be restored
+ // and a BundleException must be thrown after completion of the remaining steps.
+ String location = (updateURL != null ? updateURL.toExternalForm() : bundleState.getCanonicalName() + "/update");
+ OSGiBundleState updatedBundleState = null;
+ BundleException throwAfterUpdate = null;
+ try
{
- try
+ URL storageLocation = getBundleStorageLocation(in);
+ VirtualFile root = VFS.getRoot(storageLocation);
+
+ BundleInfo info = BundleInfo.createBundleInfo(root, location);
+ Deployment dep = DeploymentFactory.createDeployment(info);
+ dep.addAttachment(OSGiBundleState.class, bundleState);
+ dep.setBundleUpdate(true);
+ dep.setAutoStart(false);
+
+ updatedBundleState = installBundle(dep);
+ }
+ catch (Exception ex)
+ {
+ if (ex instanceof BundleException)
+ throwAfterUpdate = (BundleException)ex;
+ else
+ throwAfterUpdate = new BundleException("Cannot install updated bundle from: " + location, ex);
+
+ if (activeBeforeUpdate)
{
- File file = new File(location);
- if (file.exists())
- url = file.toURI().toURL();
+ startBundle(bundleState);
}
- catch (MalformedURLException e)
+ }
+
+ // If the updated version of this bundle was successfully installed, a bundle event of type BundleEvent.UPDATED is fired
+ if (updatedBundleState != null)
+ {
+ FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+ plugin.fireBundleEvent(updatedBundleState, BundleEvent.UPDATED);
+
+ // If this bundle's state was originally ACTIVE, the updated bundle is started as described in the Bundle.start method.
+ // If Bundle.start throws an exception, a Framework event of type FrameworkEvent.ERROR is fired containing the exception
+ if (activeBeforeUpdate)
{
- // ignore
+ startBundle(updatedBundleState);
}
}
- if (url == null)
- throw new BundleException("Unable to handle location=" + location);
-
- return url;
+ // A BundleException must be thrown after completion of the remaining steps
+ if (throwAfterUpdate != null)
+ {
+ throw throwAfterUpdate;
+ }
}
/**
@@ -780,16 +842,18 @@
if (getBundleById(id) == null)
throw new BundleException(bundleState + " not installed");
- DeploymentUnit unit = bundleState.getDeploymentUnit();
- try
+ for (DeploymentUnit unit : bundleState.getDeploymentUnits())
{
- deployerClient.undeploy(unit.getName());
- bundleState.modified();
+ try
+ {
+ deployerClient.undeploy(unit.getName());
+ bundleState.modified();
+ }
+ catch (DeploymentException e)
+ {
+ throw new BundleException("Unable to uninstall " + bundleState, e);
+ }
}
- catch (DeploymentException e)
- {
- throw new BundleException("Unable to uninstall " + bundleState, e);
- }
}
/**
@@ -804,8 +868,8 @@
if (unit == null)
throw new IllegalArgumentException("Null unit");
- OSGiMetaData osgiMetaData = unit.getAttachment(OSGiMetaData.class);
- if (osgiMetaData == null)
+ OSGiMetaData metaData = unit.getAttachment(OSGiMetaData.class);
+ if (metaData == null)
{
Manifest manifest = unit.getAttachment(Manifest.class);
// [TODO] we need a mechanism to construct an OSGiMetaData from an easier factory
@@ -815,7 +879,8 @@
Attributes attributes = manifest.getMainAttributes();
attributes.put(new Name(Constants.BUNDLE_NAME), unit.getName());
attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), unit.getName());
- osgiMetaData = new AbstractOSGiMetaData(manifest);
+ metaData = new AbstractOSGiMetaData(manifest);
+ unit.addAttachment(OSGiMetaData.class, metaData);
}
// The bundle location is not necessarily the bundle root url
@@ -823,8 +888,18 @@
Deployment dep = unit.getAttachment(Deployment.class);
String location = (dep != null ? dep.getLocation() : unit.getName());
- OSGiBundleState bundleState = new OSGiBundleState(location, osgiMetaData, unit);
- addBundle(bundleState);
+ // In case of Bundle.update() the OSGiBundleState should be attached
+ // we add the DeploymentUnit
+ OSGiBundleState bundleState = (dep != null ? dep.getAttachment(OSGiBundleState.class) : null);
+ if (bundleState != null)
+ bundleState.addDeploymentUnit(unit);
+
+ // Create a new OSGiBundleState and add it to the manager
+ if (bundleState == null)
+ {
+ bundleState = new OSGiBundleState(location, unit);
+ addBundle(bundleState);
+ }
return bundleState;
}
@@ -867,8 +942,17 @@
bundleState.setBundleManager(this);
bundles.add(bundleState);
- bundleState.changeState(Bundle.INSTALLED);
+ // Only fire the INSTALLED event if this is not an update
+ boolean fireEvent = true;
+ if (bundleState instanceof OSGiBundleState)
+ {
+ DeploymentUnit unit = ((OSGiBundleState)bundleState).getDeploymentUnit();
+ Deployment dep = unit.getAttachment(Deployment.class);
+ fireEvent = (dep == null || dep.isBundleUpdate() == false);
+ }
+ bundleState.changeState(Bundle.INSTALLED, fireEvent);
+
// Add the bundle to the resolver
// Note, plugins are not registered when the system bundle is added
ResolverPlugin bundleResolver = getOptionalPlugin(ResolverPlugin.class);
@@ -887,6 +971,8 @@
private void validateBundle(AbstractBundleState bundleState)
{
OSGiMetaData metaData = bundleState.getOSGiMetaData();
+ if (metaData == null)
+ return;
String symbolicName = metaData.getBundleSymbolicName();
if (symbolicName == null)
@@ -1201,7 +1287,7 @@
// Resolve all INSTALLED bundles through the PackageAdmin
PackageAdmin packageAdmin = getPlugin(PackageAdminPlugin.class);
packageAdmin.resolveBundles(null);
-
+
if (bundleState.getState() != Bundle.RESOLVED)
throw new BundleException("Cannot resolve bundle: " + bundleState);
}
@@ -1256,7 +1342,7 @@
// [TODO] If this bundle is in the process of being activated or deactivated then this method must wait for activation or deactivation
// to complete before continuing. If this does not occur in a reasonable time, a BundleException is thrown to indicate this bundle
// was unable to be stopped.
-
+
// [TODO] If the STOP_TRANSIENT option is not set then then set this bundle's persistent autostart setting to to Stopped.
// When the Framework is restarted and this bundle's autostart setting is Stopped, this bundle must not be automatically started.
@@ -1269,7 +1355,7 @@
DeploymentUnit unit = bundleState.getDeploymentUnit();
deployerClient.change(unit.getName(), DeploymentStages.CLASSLOADER);
deployerClient.checkComplete(unit.getName());
-
+
// The potential BundleException is attached by the OSGiBundleActivatorDeployer
BundleException stopEx = unit.removeAttachment(BundleException.class);
if (stopEx != null)
@@ -1282,7 +1368,7 @@
Throwable cause = ex.getCause();
if (cause instanceof BundleException)
throw (BundleException)cause;
-
+
throw new BundleException("Error stopping " + bundleState, (cause != null ? cause : ex));
}
}
@@ -1847,6 +1933,40 @@
}
}
+ private URL getLocationURL(String location) throws BundleException
+ {
+ // Try location as URL
+ URL url = null;
+ try
+ {
+ url = new URL(location);
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+
+ // Try location as File
+ if (url == null)
+ {
+ try
+ {
+ File file = new File(location);
+ if (file.exists())
+ url = file.toURI().toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ if (url == null)
+ throw new BundleException("Unable to handle location=" + location);
+
+ return url;
+ }
+
/**
* Fire a framework error
*
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-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -24,7 +24,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
@@ -59,8 +62,8 @@
/** The bundle location */
private String location;
- /** The deployment unit */
- private DeploymentUnit unit;
+ /** The list of deployment units */
+ private List<DeploymentUnit> units = new ArrayList<DeploymentUnit>();
/**
* Create a new BundleState.
@@ -70,22 +73,27 @@
* @param unit the deployment unit
* @throws IllegalArgumentException for a null parameter
*/
- public OSGiBundleState(String location, OSGiMetaData osgiMetaData, DeploymentUnit unit)
+ public OSGiBundleState(String location, DeploymentUnit unit)
{
- super(osgiMetaData);
-
if (location == null)
throw new IllegalArgumentException("Null bundle location");
if (unit == null)
- throw new IllegalArgumentException("Null deployment unit");
+ throw new IllegalArgumentException("Null deployment unit");
- this.unit = unit;
this.location = location;
+ this.bundleId = bundleIDGenerator.incrementAndGet();
- this.bundleId = bundleIDGenerator.incrementAndGet();
- unit.getMutableMetaData().addMetaData(unit, DeploymentUnit.class);
+ addDeploymentUnit(unit);
}
+ @Override
+ public OSGiMetaData getOSGiMetaData()
+ {
+ DeploymentUnit unit = getDeploymentUnit();
+ OSGiMetaData metadata = unit.getAttachment(OSGiMetaData.class);
+ return metadata;
+ }
+
protected Set<ControllerContext> getRegisteredContexts()
{
return getBundleManager().getRegisteredContext(this);
@@ -97,15 +105,41 @@
}
/**
- * Get the unit.
+ * Get the DeploymentUnit that was added last.
*
- * @return the unit.
+ * Initially, an OSGiBundleState is associated with just one DeploymentUnit.
+ * A sucessful call to {@link #update()} or its variants pushes an additional
+ * DeploymentUnit to the stack.
+ *
+ * @return the unit that corresponds to the last sucessful update.
*/
public DeploymentUnit getDeploymentUnit()
{
- return unit;
+ int index = (units.size() - 1);
+ return units.get(index);
}
+ /**
+ * Add a DeploymentUnit to the list.
+ *
+ * @see {@link OSGiBundleManager#updateBundle(OSGiBundleState, InputStream)}
+ */
+ void addDeploymentUnit(DeploymentUnit unit)
+ {
+ unit.getMutableMetaData().addMetaData(unit, DeploymentUnit.class);
+ units.add(unit);
+ }
+
+ /**
+ * Get the list of DeploymentUnits.
+ *
+ * @see {@link OSGiBundleManager#uninstallBundle(OSGiBundleState)}
+ */
+ List<DeploymentUnit> getDeploymentUnits()
+ {
+ return Collections.unmodifiableList(units);
+ }
+
public String getLocation()
{
return location;
@@ -224,11 +258,11 @@
checkInstalled();
if (noAdminPermission(AdminPermission.RESOURCE))
return null;
-
+
// [TODO] bundle fragment
if (resolveBundle() == false)
return getDeploymentUnit().getResourceLoader().getResource(name);
-
+
return getDeploymentUnit().getClassLoader().getResource(name);
}
@@ -242,7 +276,7 @@
// [TODO] bundle fragment
if (resolveBundle() == false)
return getDeploymentUnit().getResourceLoader().getResources(name);
-
+
return getDeploymentUnit().getClassLoader().getResources(name);
}
@@ -293,7 +327,7 @@
// Attach so we can call BundleActivator.stop() on this instance
BundleActivator bundleActivator = (BundleActivator)result;
- unit.addAttachment(BundleActivator.class, bundleActivator);
+ getDeploymentUnit().addAttachment(BundleActivator.class, bundleActivator);
bundleActivator.start(getBundleContext());
}
@@ -303,7 +337,7 @@
changeState(ACTIVE);
}
-
+
// If the BundleActivator is invalid or throws an exception then:
// * This bundle's state is set to STOPPING.
// * A bundle event of type BundleEvent.STOPPING is fired.
@@ -318,20 +352,20 @@
// This bundle's state is set to STOPPING
// A bundle event of type BundleEvent.STOPPING is fired
changeState(STOPPING);
-
+
// Any services registered by this bundle must be unregistered.
// Any services used by this bundle must be released.
// Any listeners registered by this bundle must be removed.
stopInternal();
-
+
// This bundle's state is set to RESOLVED
// A bundle event of type BundleEvent.STOPPED is fired
destroyBundleContext();
changeState(RESOLVED);
-
+
if (t instanceof BundleException)
throw (BundleException)t;
-
+
throw new BundleException("Cannot start bundle: " + this, t);
}
}
@@ -356,21 +390,21 @@
Throwable rethrow = null;
if (priorState == Bundle.ACTIVE)
{
- BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
- BundleContext bundleContext = getBundleContext();
- if (bundleActivator != null && bundleContext != null)
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
+ BundleContext bundleContext = getBundleContext();
+ if (bundleActivator != null && bundleContext != null)
+ {
+ try
{
- try
- {
- bundleActivator.stop(bundleContext);
- }
- catch (Throwable t)
- {
- rethrow = t;
- }
+ bundleActivator.stop(bundleContext);
}
+ catch (Throwable t)
+ {
+ rethrow = t;
+ }
+ }
}
-
+
// Any services registered by this bundle must be unregistered
getBundleManager().unregisterContexts(this);
@@ -393,26 +427,48 @@
}
// [TODO] Any listeners registered by this bundle must be removed
-
+
// If this bundle's state is UNINSTALLED, because this bundle was uninstalled while the
// BundleActivator.stop method was running, a BundleException must be thrown
if (getState() == Bundle.UNINSTALLED)
throw new BundleException("Bundle uninstalled during activator stop: " + this);
-
+
// This bundle's state is set to RESOLVED
// A bundle event of type BundleEvent.STOPPED is fired
destroyBundleContext();
changeState(RESOLVED);
-
+
if (rethrow != null)
throw new BundleException("Error during stop of bundle: " + this, rethrow);
}
+ /**
+ * Updates this bundle.
+ *
+ * This method performs the same function as calling update(InputStream) with a null InputStream
+ */
+ public void update() throws BundleException
+ {
+ update(null);
+ }
+
+ /**
+ * Updates this bundle from an InputStream.
+ */
public void update(InputStream in) throws BundleException
{
- checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
- // [TODO] update
- throw new UnsupportedOperationException("update");
+ checkAdminPermission(AdminPermission.LIFECYCLE);
+ try
+ {
+ getBundleManager().updateBundle(this, in);
+ }
+ catch (Exception ex)
+ {
+ if (ex instanceof BundleException)
+ throw (BundleException)ex;
+
+ throw new BundleException("Cannot update bundle: " + this, ex);
+ }
}
public void uninstall() throws BundleException
@@ -424,26 +480,26 @@
@Override
protected void afterServiceRegistration(OSGiServiceState service)
{
- getBundleManager().putContext(service, unit);
+ getBundleManager().putContext(service, getDeploymentUnit());
}
@Override
protected void beforeServiceUnregistration(OSGiServiceState service)
{
- getBundleManager().removeContext(service, unit);
+ getBundleManager().removeContext(service, getDeploymentUnit());
}
public static OSGiBundleState assertBundleState(Bundle bundle)
{
if (bundle == null)
throw new IllegalArgumentException("Null bundle");
-
+
if (bundle instanceof OSGiBundleWrapper)
bundle = ((OSGiBundleWrapper)bundle).getBundleState();
-
+
if (bundle instanceof OSGiBundleState == false)
throw new IllegalArgumentException("Not an OSGiBundleState: " + bundle);
-
+
return (OSGiBundleState)bundle;
}
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -74,7 +74,7 @@
if (scope == null)
return key;
Object qualifier = scope.getQualifier();
- if (qualifier instanceof Class)
+ if (qualifier instanceof Class<?>)
return key;
Object service = serviceState.getTarget();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -55,7 +55,7 @@
return serviceState.getReference();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public void setProperties(Dictionary properties)
{
serviceState.setProperties(properties);
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-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -26,9 +26,13 @@
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+import java.util.jar.Attributes.Name;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
+import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.util.collection.ConcurrentSet;
import org.osgi.framework.BundleException;
@@ -46,16 +50,27 @@
{
/** The registred contexts */
private Set<ControllerContext> registered = new ConcurrentSet<ControllerContext>();
+ /** The osgi metadata */
+ private OSGiMetaData osgiMetaData;
/**
* Create a new OSGiSystemBundle.
- * @param osgiMetaData the metadata for the system bundle
*/
- public OSGiSystemState(OSGiMetaData osgiMetaData)
+ public OSGiSystemState()
{
- super(osgiMetaData);
+ Manifest manifest = new Manifest();
+ Attributes attributes = manifest.getMainAttributes();
+ attributes.put(new Name(Constants.BUNDLE_NAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
+ attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
+ osgiMetaData = new AbstractOSGiMetaData(manifest);
}
+ @Override
+ public OSGiMetaData getOSGiMetaData()
+ {
+ return osgiMetaData;
+ }
+
protected Set<ControllerContext> getRegisteredContexts()
{
return registered;
@@ -161,7 +176,6 @@
});
}
- @Override
public void update() throws BundleException
{
final OSGiBundleManager bundleManager = getBundleManager();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -33,7 +33,7 @@
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.ParentPolicy;
import org.jboss.classloader.spi.base.BaseClassLoader;
-import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.ClassFilterUtils;
import org.jboss.classloader.spi.filter.PackageClassFilter;
import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
@@ -102,7 +102,7 @@
classFilter.setIncludeJava(true);
// Setup the domain's parent policy
- setParentPolicy(new ParentPolicy(classFilter, ClassFilter.NOTHING));
+ setParentPolicy(new ParentPolicy(classFilter, ClassFilterUtils.NOTHING));
// Initialize the configured policy roots
VirtualFile[] roots = new VirtualFile[classPath.size()];
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/AbstractOSGiBundleStateDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/AbstractOSGiBundleStateDeployer.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/AbstractOSGiBundleStateDeployer.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -21,13 +21,12 @@
*/
package org.jboss.osgi.framework.deployers;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
import org.jboss.osgi.framework.bundle.OSGiBundleState;
-import org.jboss.osgi.framework.metadata.OSGiMetaData;
/**
* AbstractOSGiBundleStateDeployer.<p>
@@ -40,12 +39,6 @@
/** The bundle manager */
protected OSGiBundleManager bundleManager;
- /**
- * Create a new BundleStateDeployer.
- *
- * @param bundleManager the bundleManager
- * @throws IllegalArgumentException for a null bundle manager
- */
protected AbstractOSGiBundleStateDeployer(OSGiBundleManager bundleManager)
{
if (bundleManager == null)
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleStateRemoveDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleStateRemoveDeployer.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleStateRemoveDeployer.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -21,7 +21,6 @@
*/
package org.jboss.osgi.framework.deployers;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
import org.jboss.osgi.framework.bundle.OSGiBundleState;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -100,7 +100,7 @@
* @param list the list to create
* @param packages whether to create packages
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public static void parse(String header, List list, boolean packages)
{
if (header == null)
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -103,7 +103,7 @@
super(manifest);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Dictionary<String, String> getHeaders(String locale)
{
// TODO localisation
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -92,7 +92,7 @@
return get(key, creator, null);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
protected <T> T get(String key, ValueCreator<T> creator, T defaultValue)
{
T value = (T)cachedAttributes.get(key);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -73,7 +73,7 @@
return delegate.elements();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public synchronized boolean equals(Object obj)
{
if (obj == this)
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/NoFilter.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/NoFilter.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/util/NoFilter.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -44,7 +44,7 @@
{
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean match(Dictionary dictionary)
{
return true;
@@ -55,7 +55,7 @@
return true;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean matchCase(Dictionary dictionary)
{
return true;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -169,16 +169,19 @@
protected Bundle installBundle(String location) throws BundleException
{
- BundleContext context = getBundleManager().getSystemContext();
- return context.installBundle(location);
+ return getBundleManager().installBundle(location, null).getBundleInternal();
}
protected Bundle installBundle(String location, InputStream instream) throws BundleException
{
- BundleContext context = getBundleManager().getSystemContext();
- return context.installBundle(location, instream);
+ return getBundleManager().installBundle(location, instream).getBundleInternal();
}
+ protected Bundle installBundle(VirtualFile bundleFile) throws BundleException
+ {
+ return getBundleManager().installBundle(bundleFile).getBundleInternal();
+ }
+
/**
* Remove a bundle
*
@@ -195,12 +198,12 @@
return getDelegate().getDeploymentUnit(bundle);
}
- protected Bundle assembleBundle(String name, String resources, Class<?>... packages) throws Exception
+ protected VirtualFile assembleBundle(String name, String resources, Class<?>... packages) throws Exception
{
return getDelegate().assembleBundle(name, new String[] { resources }, packages);
}
- protected Bundle assembleBundle(String name, String[] resourcePaths, Class<?>... packages) throws Exception
+ protected VirtualFile assembleBundle(String name, String[] resourcePaths, Class<?>... packages) throws Exception
{
return getDelegate().assembleBundle(name, resourcePaths, packages);
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTestDelegate.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTestDelegate.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTestDelegate.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -217,15 +217,15 @@
return deploymentUnit;
}
- public Bundle assembleBundle(String name, String resources, Class<?>... packages) throws Exception
+ public VirtualFile assembleBundle(String name, String resources, Class<?>... packages) throws Exception
{
return assembleBundle(name, new String[] { resources }, packages);
}
- public Bundle assembleBundle(String name, String[] resourcePaths, Class<?>... packages) throws Exception
+ public VirtualFile assembleBundle(String name, String[] resourcePaths, Class<?>... packages) throws Exception
{
AssembledDirectory assembledDirectory = createAssembledDirectory(name, "", resourcePaths, packages);
- return addBundle(assembledDirectory);
+ return assembledDirectory;
}
public Bundle deployBundle(String name, OSGiMetaData metaData, String resourcePath, Class<?>... packages) throws Exception
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -26,7 +26,6 @@
import org.jboss.test.osgi.FrameworkTest;
import org.jboss.test.osgi.bundle.support.a.FailOnStartActivator;
import org.jboss.test.osgi.bundle.support.b.LifecycleService;
-import org.jboss.test.osgi.bundle.support.b.LifecycleServiceActivator;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
@@ -54,7 +53,7 @@
*/
public void testServiceBundle() throws Exception
{
- Bundle bundleA = assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class, LifecycleServiceActivator.class);
+ Bundle bundleA = installBundle(assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class));
try
{
assertBundleState(Bundle.INSTALLED, bundleA.getState());
@@ -77,7 +76,7 @@
*/
public void testServiceNotAvailable() throws Exception
{
- Bundle bundleA = assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class, LifecycleServiceActivator.class);
+ Bundle bundleA = installBundle(assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class));
try
{
assertBundleState(Bundle.INSTALLED, bundleA.getState());
@@ -86,7 +85,7 @@
ServiceReference sref = getSystemBundle().getBundleContext().getServiceReference(LifecycleService.class.getName());
assertNull("Service not available", sref);
- Bundle bundleB = assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Bundle bundleB = installBundle(assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class));
try
{
assertBundleState(Bundle.INSTALLED, bundleB.getState());
@@ -116,13 +115,13 @@
*/
public void testServiceAvailable() throws Exception
{
- Bundle bundleA = assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class, LifecycleServiceActivator.class);
+ Bundle bundleA = installBundle(assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class));
try
{
bundleA.start();
assertBundleState(Bundle.ACTIVE, bundleA.getState());
- Bundle bundleB = assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Bundle bundleB = installBundle(assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class));
try
{
bundleB.start();
@@ -146,12 +145,12 @@
*/
public void testServiceMakeAvailable() throws Exception
{
- Bundle bundleA = assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class, LifecycleServiceActivator.class);
+ Bundle bundleA = installBundle(assembleBundle("lifecycle-service", "/bundles/lifecycle/simple-service", LifecycleService.class));
try
{
assertBundleState(Bundle.INSTALLED, bundleA.getState());
- Bundle bundleB = assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Bundle bundleB = installBundle(assembleBundle("lifecycle-failstart", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class));
try
{
assertBundleState(Bundle.INSTALLED, bundleB.getState());
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -21,13 +21,19 @@
*/
package org.jboss.test.osgi.bundle;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.jar.Attributes;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
import junit.framework.Test;
import org.jboss.test.osgi.FrameworkTest;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -148,7 +154,37 @@
public void testUpdate() throws Exception
{
- // TODO testUpdate
+ VirtualFile assemble1 = assembleBundle("bundle1", "/bundles/update/update-bundle1");
+ VirtualFile assemble2 = assembleBundle("bundle2", "/bundles/update/update-bundle2");
+
+ Manifest manifest = VFSUtils.getManifest(assemble2);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ new JarOutputStream(baos, manifest).close();
+ ByteArrayInputStream updateStream = new ByteArrayInputStream(baos.toByteArray());
+
+ // [JBVFS-130] VFSUtils.temp(assembledDirectory) cannot create tmp dir
+ // assemble2 = VFSUtils.temp(assemble2);
+
+ Bundle bundle = installBundle(assemble1);
+ try
+ {
+ int beforeCount = getBundleManager().getBundles().size();
+
+ bundle.start();
+ assertBundleState(Bundle.ACTIVE, bundle.getState());
+ assertEquals("Bundle-Version", "1.0.0", bundle.getHeaders().get(Constants.BUNDLE_VERSION));
+
+ bundle.update(updateStream);
+ assertBundleState(Bundle.ACTIVE, bundle.getState());
+ assertEquals("Bundle-Version", "1.0.1", bundle.getHeaders().get(Constants.BUNDLE_VERSION));
+
+ int afterCount = getBundleManager().getBundles().size();
+ assertEquals("Bundle count", beforeCount, afterCount);
+ }
+ finally
+ {
+ bundle.uninstall();
+ }
}
public void testUninstall() throws Exception
@@ -158,10 +194,10 @@
public void testSingleton() throws Exception
{
- Bundle bundle1 = assembleBundle("bundle1", "/bundles/singleton/singleton1");
+ Bundle bundle1 = installBundle(assembleBundle("bundle10", "/bundles/singleton/singleton1"));
try
{
- Bundle bundle2 = assembleBundle("bundle2", "/bundles/singleton/singleton2");
+ Bundle bundle2 = installBundle(assembleBundle("bundle20", "/bundles/singleton/singleton2"));
uninstall(bundle2);
fail("Should not be here!");
}
@@ -177,10 +213,10 @@
public void testNotSingleton() throws Exception
{
- Bundle bundle1 = assembleBundle("bundle1", "/bundles/singleton/singleton1");
+ Bundle bundle1 = installBundle(assembleBundle("bundle1", "/bundles/singleton/singleton1"));
try
{
- Bundle bundle2 = assembleBundle("not-singleton", "/bundles/singleton/not-singleton");
+ Bundle bundle2 = installBundle(assembleBundle("not-singleton", "/bundles/singleton/not-singleton"));
try
{
assertEquals(bundle1.getSymbolicName(), bundle2.getSymbolicName());
@@ -196,7 +232,7 @@
}
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void testGetHeaders() throws Exception
{
// TODO case insensistive
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -88,7 +88,7 @@
}
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void testGetHeaders() throws Exception
{
Dictionary expected = new Hashtable();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -33,7 +33,7 @@
import org.jboss.classloader.spi.ClassLoaderPolicy;
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.ParentPolicy;
-import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.ClassFilterUtils;
import org.jboss.classloader.spi.filter.PackageClassFilter;
import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
import org.jboss.logging.Logger;
@@ -74,7 +74,7 @@
PackageClassFilter classFilter = PackageClassFilter.createPackageClassFilterFromString(filteredPackages);
classFilter.setIncludeJava(true);
- domain.setParentPolicy(new ParentPolicy(classFilter, ClassFilter.NOTHING));
+ domain.setParentPolicy(new ParentPolicy(classFilter, ClassFilterUtils.NOTHING));
URL coreURL = new OSGiTestHelper().getTestArchiveURL("bundles/org.osgi.core.jar");
VirtualFile coreVF = VFS.createNewRoot(coreURL);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/RequireBundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/RequireBundleUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/classloader/RequireBundleUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -50,12 +50,12 @@
public void testSimpleRequireBundle() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("simplerequirebundleA", "/bundles/classloader/simplerequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("simplerequirebundleA", "/bundles/classloader/simplerequirebundleA", B.class));
try
{
bundle2.start();
@@ -75,12 +75,12 @@
public void testSimpleRequireBundleFails() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("simplerequirebundlefails", "/bundles/classloader/simplerequirebundlefails", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("simplerequirebundlefails", "/bundles/classloader/simplerequirebundlefails", B.class));
try
{
bundle2.start();
@@ -103,12 +103,12 @@
public void testVersionRequireBundle() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("versionrequirebundleA", "/bundles/classloader/versionrequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("versionrequirebundleA", "/bundles/classloader/versionrequirebundleA", B.class));
try
{
bundle2.start();
@@ -128,12 +128,12 @@
public void testVersionRequireBundleFails() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("versionrequirebundlefails", "/bundles/classloader/versionrequirebundlefails", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("versionrequirebundlefails", "/bundles/classloader/versionrequirebundlefails", B.class));
try
{
bundle2.start();
@@ -156,12 +156,12 @@
public void testOptionalRequireBundle() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("optionalrequirebundleA", "/bundles/classloader/optionalrequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("optionalrequirebundleA", "/bundles/classloader/optionalrequirebundleA", B.class));
try
{
bundle2.start();
@@ -181,12 +181,12 @@
public void testOptionalRequireBundleFails() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("optionalrequirebundlefails", "/bundles/classloader/optionalrequirebundlefails", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("optionalrequirebundlefails", "/bundles/classloader/optionalrequirebundlefails", B.class));
try
{
bundle2.start();
@@ -210,7 +210,7 @@
//Bundle-Version: 1.0.0
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleA;test=x
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0;test=x
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
@@ -221,7 +221,7 @@
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleB
//Require-Bundle: org.jboss.test.osgi.classloader.bundleA;visibility:=reexport
//Export-Package: org.jboss.test.osgi.classloader.support.b
- Bundle bundle2 = assembleBundle("reexportrequirebundleA", "/bundles/classloader/reexportrequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("reexportrequirebundleA", "/bundles/classloader/reexportrequirebundleA", B.class));
try
{
@@ -232,7 +232,7 @@
//Bundle-Name: BundleC
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleC
//Require-Bundle: org.jboss.test.osgi.classloader.bundleB
- Bundle bundle3 = assembleBundle("reexportrequirebundleB", "/bundles/classloader/reexportrequirebundleB");
+ Bundle bundle3 = installBundle(assembleBundle("reexportrequirebundleB", "/bundles/classloader/reexportrequirebundleB"));
try
{
@@ -257,18 +257,18 @@
public void testNoReExportRequireBundle() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("noreexportrequirebundleA", "/bundles/classloader/noreexportrequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("noreexportrequirebundleA", "/bundles/classloader/noreexportrequirebundleA", B.class));
try
{
bundle2.start();
assertLoadClass(bundle2, A.class, bundle1);
assertLoadClass(bundle2, B.class, bundle2);
- Bundle bundle3 = assembleBundle("reexportrequirebundleB", "/bundles/classloader/reexportrequirebundleB");
+ Bundle bundle3 = installBundle(assembleBundle("reexportrequirebundleB", "/bundles/classloader/reexportrequirebundleB"));
try
{
assertLoadClassFail(bundle3, A.class);
@@ -292,12 +292,12 @@
public void testAttributeRequireBundle() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("attributerequirebundleA", "/bundles/classloader/attributerequirebundleA", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("attributerequirebundleA", "/bundles/classloader/attributerequirebundleA", B.class));
try
{
bundle2.start();
@@ -317,12 +317,12 @@
public void testAttributeRequireBundleFails() throws Exception
{
- Bundle bundle1 = assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("bundleA", "/bundles/classloader/bundleA", A.class));
try
{
bundle1.start();
assertLoadClass(bundle1, A.class);
- Bundle bundle2 = assembleBundle("attributerequirebundlefails", "/bundles/classloader/attributerequirebundlefails", B.class);
+ Bundle bundle2 = installBundle(assembleBundle("attributerequirebundlefails", "/bundles/classloader/attributerequirebundlefails", B.class));
try
{
bundle2.start();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -54,7 +54,7 @@
public void testGetBudleFromClass() throws Exception
{
- Bundle bundle = assembleBundle("smoke-assembled", "/bundles/smoke/smoke-assembled", PA.class);
+ Bundle bundle = installBundle(assembleBundle("smoke-assembled", "/bundles/smoke/smoke-assembled", PA.class));
try
{
bundle.start();
@@ -68,7 +68,7 @@
Bundle notFound = pa.getBundle(getClass());
assertNull(notFound);
- Bundle other = assembleBundle("simple", "/bundles/simple/simple-bundle1", Other.class);
+ Bundle other = installBundle(assembleBundle("simple", "/bundles/simple/simple-bundle1", Other.class));
try
{
other.start();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -97,9 +97,10 @@
}
PackageAdminPlugin packageAdmin = bundleManager.getPlugin(PackageAdminPlugin.class);
- boolean allResoved = packageAdmin.resolveBundles(null);
+ packageAdmin.resolveBundles(null);
+
+ System.out.println("[JBOSGI-151] Cannot resolve circular dependencies");
//assertTrue("All bundles resolved", allResoved);
- System.out.println("[JBOSGI-151] Cannot resolve circular dependencies");
}
finally
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -57,7 +57,7 @@
public void testGetServiceReferences() throws Exception
{
- Bundle bundle1 = assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class));
try
{
bundle1.start();
@@ -174,7 +174,7 @@
public void assertGetServiceReferencesNotAssignable(String className) throws Exception
{
- Bundle bundle1 = assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class));
try
{
bundle1.start();
@@ -191,7 +191,7 @@
ServiceReference reference1 = registration1.getReference();
assertNotNull(reference1);
- Bundle bundle2 = assembleBundle("simple2", "/bundles/simple/simple-bundle2", A.class);
+ Bundle bundle2 = installBundle(assembleBundle("simple2", "/bundles/simple/simple-bundle2", A.class));
try
{
bundle2.start();
@@ -272,7 +272,7 @@
public void assertGetServiceReferencesAssignable(String className) throws Exception
{
- Bundle bundle1 = assembleBundle("service2", "/bundles/service/service-bundle2", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("service2", "/bundles/service/service-bundle2", A.class));
try
{
bundle1.start();
@@ -289,7 +289,7 @@
ServiceReference reference1 = registration1.getReference();
assertNotNull(reference1);
- Bundle bundle2 = assembleBundle("service1", "/bundles/service/service-bundle1");
+ Bundle bundle2 = installBundle(assembleBundle("service1", "/bundles/service/service-bundle1"));
try
{
bundle2.start();
@@ -362,7 +362,7 @@
{
String className = A.class.getName();
- Bundle bundle1 = assembleBundle("service2", "/bundles/service/service-bundle2", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("service2", "/bundles/service/service-bundle2", A.class));
try
{
bundle1.start();
@@ -382,7 +382,7 @@
ServiceReference reference1 = registration1.getReference();
assertNotNull(reference1);
- Bundle bundle2 = assembleBundle("service1", "/bundles/service/service-bundle1");
+ Bundle bundle2 = installBundle(assembleBundle("service1", "/bundles/service/service-bundle1"));
try
{
bundle2.start();
@@ -470,7 +470,7 @@
String className = A.class.getName();
String wrongClassName = B.class.getName();
- Bundle bundle1 = assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class);
+ Bundle bundle1 = installBundle(assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class));
try
{
bundle1.start();
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-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -66,7 +66,7 @@
Deployment bean = deployBean("beanA", A.class);
try
{
- Bundle bundle1 = assembleBundle("simple1", "/bundles/service/service-bundle1");
+ Bundle bundle1 = installBundle(assembleBundle("simple1", "/bundles/service/service-bundle1"));
try
{
bundle1.start();
@@ -134,7 +134,7 @@
{
KernelControllerContext kcc = getControllerContext("C", null);
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle3");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle3"));
try
{
bundle1.start();
@@ -191,7 +191,7 @@
{
KernelControllerContext kcc = getControllerContext("C", null);
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle3");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle3"));
try
{
bundle1.start();
@@ -249,7 +249,7 @@
Deployment bean = addBean("beanA", C.class, bmd, A.class);
try
{
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle3");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle3"));
try
{
bundle1.start();
@@ -287,6 +287,7 @@
}
}
+ @SuppressWarnings("rawtypes")
public void testServiceFactoryInjection() throws Throwable
{
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("C1", C.class.getName());
@@ -301,7 +302,7 @@
Deployment bean2 = addBean("beanA2", null, bmd);
try
{
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle4");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle4"));
try
{
bundle1.start();
@@ -358,6 +359,7 @@
}
}
+ @SuppressWarnings("rawtypes")
public void testServiceFactoryMix() throws Throwable
{
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("C1", C.class.getName());
@@ -366,7 +368,7 @@
Deployment bean1 = addBean("beanA1", C.class, bmd, A.class, D.class);
try
{
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle4");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle4"));
try
{
bundle1.start();
@@ -463,7 +465,7 @@
Deployment bean = addBean("beanA", A.class);
try
{
- Bundle bundle1 = assembleBundle("simple2", "/bundles/service/service-bundle1");
+ Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle1"));
try
{
bundle1.start();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceReferenceUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceReferenceUnitTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceReferenceUnitTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -374,7 +374,7 @@
public void testIsAssignableToErrors() throws Exception
{
- Bundle bundle = assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class);
+ Bundle bundle = installBundle(assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class));
try
{
bundle.start();
@@ -415,7 +415,7 @@
public void testNotAssignableTo() throws Exception
{
- Bundle bundle = assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class);
+ Bundle bundle = installBundle(assembleBundle("simple1", "/bundles/simple/simple-bundle1", A.class));
try
{
bundle.start();
@@ -428,7 +428,7 @@
ServiceReference reference = registration.getReference();
assertNotNull(reference);
- Bundle bundle2 = assembleBundle("simple2", "/bundles/simple/simple-bundle2", A.class);
+ Bundle bundle2 = installBundle(assembleBundle("simple2", "/bundles/simple/simple-bundle2", A.class));
try
{
assertFalse(reference.isAssignableTo(bundle2, A.class.getName()));
@@ -454,7 +454,7 @@
//Bundle-Name: Service2
//Bundle-SymbolicName: org.jboss.test.osgi.service2
//Export-Package: org.jboss.test.osgi.service.support.a
- Bundle bundle2 = assembleBundle("service2", "/bundles/service/service-bundle2", A.class);
+ Bundle bundle2 = installBundle(assembleBundle("service2", "/bundles/service/service-bundle2", A.class));
try
{
@@ -465,7 +465,7 @@
//Bundle-Name: Service1
//Bundle-SymbolicName: org.jboss.test.osgi.service1
//Import-Package: org.jboss.test.osgi.service.support.a
- Bundle bundle1 = assembleBundle("service1", "/bundles/service/service-bundle1");
+ Bundle bundle1 = installBundle(assembleBundle("service1", "/bundles/service/service-bundle1"));
try
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/smoke/OSGiSmokeTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/smoke/OSGiSmokeTestCase.java 2009-12-17 21:37:53 UTC (rev 97972)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/smoke/OSGiSmokeTestCase.java 2009-12-17 21:38:32 UTC (rev 97973)
@@ -73,7 +73,7 @@
public void testAssembled() throws Exception
{
- Bundle bundle = assembleBundle("smoke-assembled", "/bundles/smoke/smoke-assembled", A.class);
+ Bundle bundle = installBundle(assembleBundle("smoke-assembled", "/bundles/smoke/smoke-assembled", A.class));
try
{
testBundle(bundle, "smoke-assembled", Bundle.INSTALLED);
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update)
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1 (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1)
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF)
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF 2009-12-17 20:24:15 UTC (rev 97968)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF 2009-12-17 21:38:32 UTC (rev 97973)
@@ -1,4 +0,0 @@
-Manifest-Version: 1.0
-Bundle-SymbolicName: update-bundle1
-Bundle-Version: 1.0.0
-
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF 2009-12-17 21:38:32 UTC (rev 97973)
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Bundle-SymbolicName: update-bundle1
+Bundle-Version: 1.0.0
+
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2 (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2)
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF)
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF 2009-12-17 20:24:15 UTC (rev 97968)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF 2009-12-17 21:38:32 UTC (rev 97973)
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Bundle-SymbolicName: update-bundle2
-Bundle-Version: 1.0.1
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF (from rev 97968, projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF 2009-12-17 21:38:32 UTC (rev 97973)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-SymbolicName: update-bundle2
+Bundle-Version: 1.0.1
14 years, 5 months
JBoss-OSGI SVN: r97968 - in projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src: main/java/org/jboss/osgi/framework/classloading and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-17 15:24:15 -0500 (Thu, 17 Dec 2009)
New Revision: 97968
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/NoFilter.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/FrameworkTest.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
Log:
Add initial support for Bundle.update()
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -42,6 +42,8 @@
public class InstanceMetaDataRetrievalFactory implements MetaDataRetrievalFactory
{
private Controller controller;
+
+ @SuppressWarnings("rawtypes")
private Set<DictionaryFactory> factories = new CopyOnWriteArraySet<DictionaryFactory>();
public InstanceMetaDataRetrievalFactory(Controller controller)
@@ -51,7 +53,7 @@
this.controller = controller;
}
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({"unchecked", "rawtypes"})
public MetaDataRetrieval getMetaDataRetrieval(Scope scope)
{
if (scope == null)
@@ -89,6 +91,7 @@
* @param factory the factory
* @return Set#add
*/
+ @SuppressWarnings("rawtypes")
public boolean addFactory(DictionaryFactory factory)
{
if (factory == null)
@@ -105,6 +108,7 @@
* @param factory the factory
* @return Set#add
*/
+ @SuppressWarnings("rawtypes")
public boolean removeFactory(DictionaryFactory factory)
{
if (factory == null)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -192,7 +192,7 @@
*/
private static ClassLoader getClassLoader(Object instance)
{
- return (instance instanceof Class) ? Class.class.cast(instance).getClassLoader() : instance.getClass().getClassLoader();
+ return (instance instanceof Class<?>) ? Class.class.cast(instance).getClassLoader() : instance.getClass().getClassLoader();
}
/**
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -218,13 +218,8 @@
public void start()
{
- // createSystemBundle
- Manifest manifest = new Manifest();
- Attributes attributes = manifest.getMainAttributes();
- attributes.put(new Name(Constants.BUNDLE_NAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- OSGiMetaData systemMetaData = new AbstractOSGiMetaData(manifest);
- systemBundle = new OSGiSystemState(systemMetaData);
+ // Create the system Bundle
+ systemBundle = new OSGiSystemState();
addBundle(systemBundle);
applyMDRUsage(true);
@@ -789,7 +784,7 @@
{
URL storageLocation = getBundleStorageLocation(in);
VirtualFile root = VFS.getRoot(storageLocation);
-
+
BundleInfo info = BundleInfo.createBundleInfo(root, location);
Deployment dep = DeploymentFactory.createDeployment(info);
dep.addAttachment(OSGiBundleState.class, bundleState);
@@ -804,7 +799,7 @@
throwAfterUpdate = (BundleException)ex;
else
throwAfterUpdate = new BundleException("Cannot install updated bundle from: " + location, ex);
-
+
if (activeBeforeUpdate)
{
startBundle(bundleState);
@@ -847,16 +842,18 @@
if (getBundleById(id) == null)
throw new BundleException(bundleState + " not installed");
- DeploymentUnit unit = bundleState.getDeploymentUnit();
- try
+ for (DeploymentUnit unit : bundleState.getDeploymentUnits())
{
- deployerClient.undeploy(unit.getName());
- bundleState.modified();
+ try
+ {
+ deployerClient.undeploy(unit.getName());
+ bundleState.modified();
+ }
+ catch (DeploymentException e)
+ {
+ throw new BundleException("Unable to uninstall " + bundleState, e);
+ }
}
- catch (DeploymentException e)
- {
- throw new BundleException("Unable to uninstall " + bundleState, e);
- }
}
/**
@@ -871,8 +868,8 @@
if (unit == null)
throw new IllegalArgumentException("Null unit");
- OSGiMetaData osgiMetaData = unit.getAttachment(OSGiMetaData.class);
- if (osgiMetaData == null)
+ OSGiMetaData metaData = unit.getAttachment(OSGiMetaData.class);
+ if (metaData == null)
{
Manifest manifest = unit.getAttachment(Manifest.class);
// [TODO] we need a mechanism to construct an OSGiMetaData from an easier factory
@@ -882,7 +879,8 @@
Attributes attributes = manifest.getMainAttributes();
attributes.put(new Name(Constants.BUNDLE_NAME), unit.getName());
attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), unit.getName());
- osgiMetaData = new AbstractOSGiMetaData(manifest);
+ metaData = new AbstractOSGiMetaData(manifest);
+ unit.addAttachment(OSGiMetaData.class, metaData);
}
// The bundle location is not necessarily the bundle root url
@@ -952,7 +950,7 @@
Deployment dep = unit.getAttachment(Deployment.class);
fireEvent = (dep == null || dep.isBundleUpdate() == false);
}
-
+
bundleState.changeState(Bundle.INSTALLED, fireEvent);
// Add the bundle to the resolver
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -24,9 +24,11 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.List;
import java.util.Set;
-import java.util.Stack;
import java.util.concurrent.atomic.AtomicLong;
import org.jboss.dependency.spi.ControllerContext;
@@ -60,8 +62,8 @@
/** The bundle location */
private String location;
- /** The stack of deployment units */
- private Stack<DeploymentUnit> units = new Stack<DeploymentUnit>();
+ /** The list of deployment units */
+ private List<DeploymentUnit> units = new ArrayList<DeploymentUnit>();
/**
* Create a new BundleState.
@@ -113,20 +115,31 @@
*/
public DeploymentUnit getDeploymentUnit()
{
- return units.peek();
+ int index = (units.size() - 1);
+ return units.get(index);
}
/**
- * Add a DeploymentUnit to the stack.
+ * Add a DeploymentUnit to the list.
*
* @see {@link OSGiBundleManager#updateBundle(OSGiBundleState, InputStream)}
*/
void addDeploymentUnit(DeploymentUnit unit)
{
unit.getMutableMetaData().addMetaData(unit, DeploymentUnit.class);
- units.push(unit);
+ units.add(unit);
}
+ /**
+ * Get the list of DeploymentUnits.
+ *
+ * @see {@link OSGiBundleManager#uninstallBundle(OSGiBundleState)}
+ */
+ List<DeploymentUnit> getDeploymentUnits()
+ {
+ return Collections.unmodifiableList(units);
+ }
+
public String getLocation()
{
return location;
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiScopeInfo.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -74,7 +74,7 @@
if (scope == null)
return key;
Object qualifier = scope.getQualifier();
- if (qualifier instanceof Class)
+ if (qualifier instanceof Class<?>)
return key;
Object service = serviceState.getTarget();
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -55,7 +55,7 @@
return serviceState.getReference();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public void setProperties(Dictionary properties)
{
serviceState.setProperties(properties);
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -26,9 +26,13 @@
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+import java.util.jar.Attributes.Name;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
+import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.util.collection.ConcurrentSet;
import org.osgi.framework.BundleException;
@@ -51,14 +55,14 @@
/**
* Create a new OSGiSystemBundle.
- * @param osgiMetaData the metadata for the system bundle
*/
- public OSGiSystemState(OSGiMetaData osgiMetaData)
+ public OSGiSystemState()
{
- if (osgiMetaData == null)
- throw new IllegalArgumentException("Null osgi metadata");
-
- this.osgiMetaData = osgiMetaData;
+ Manifest manifest = new Manifest();
+ Attributes attributes = manifest.getMainAttributes();
+ attributes.put(new Name(Constants.BUNDLE_NAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
+ attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
+ osgiMetaData = new AbstractOSGiMetaData(manifest);
}
@Override
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/classloading/OSGiClassLoaderDomain.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -33,7 +33,7 @@
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.ParentPolicy;
import org.jboss.classloader.spi.base.BaseClassLoader;
-import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.ClassFilterUtils;
import org.jboss.classloader.spi.filter.PackageClassFilter;
import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
@@ -102,7 +102,7 @@
classFilter.setIncludeJava(true);
// Setup the domain's parent policy
- setParentPolicy(new ParentPolicy(classFilter, ClassFilter.NOTHING));
+ setParentPolicy(new ParentPolicy(classFilter, ClassFilterUtils.NOTHING));
// Initialize the configured policy roots
VirtualFile[] roots = new VirtualFile[classPath.size()];
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/ManifestParser.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -100,7 +100,7 @@
* @param list the list to create
* @param packages whether to create packages
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public static void parse(String header, List list, boolean packages)
{
if (header == null)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/AbstractOSGiMetaData.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -103,7 +103,7 @@
super(manifest);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Dictionary<String, String> getHeaders(String locale)
{
// TODO localisation
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiParameters.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -92,7 +92,7 @@
return get(key, creator, null);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
protected <T> T get(String key, ValueCreator<T> creator, T defaultValue)
{
T value = (T)cachedAttributes.get(key);
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/CaseInsensitiveDictionary.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -73,7 +73,7 @@
return delegate.elements();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public synchronized boolean equals(Object obj)
{
if (obj == this)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/NoFilter.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/NoFilter.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/main/java/org/jboss/osgi/framework/util/NoFilter.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -44,7 +44,7 @@
{
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean match(Dictionary dictionary)
{
return true;
@@ -55,7 +55,7 @@
return true;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean matchCase(Dictionary dictionary)
{
return true;
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/FrameworkTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -169,17 +169,17 @@
protected Bundle installBundle(String location) throws BundleException
{
- return getBundleManager().installBundle(location, null);
+ return getBundleManager().installBundle(location, null).getBundleInternal();
}
protected Bundle installBundle(String location, InputStream instream) throws BundleException
{
- return getBundleManager().installBundle(location, instream);
+ return getBundleManager().installBundle(location, instream).getBundleInternal();
}
protected Bundle installBundle(VirtualFile bundleFile) throws BundleException
{
- return getBundleManager().installBundle(bundleFile);
+ return getBundleManager().installBundle(bundleFile).getBundleInternal();
}
/**
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/BundleUnitTestCase.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -183,7 +183,7 @@
}
finally
{
- uninstall(bundle);
+ bundle.uninstall();
}
}
@@ -194,10 +194,10 @@
public void testSingleton() throws Exception
{
- Bundle bundle1 = installBundle(assembleBundle("bundle1", "/bundles/singleton/singleton1"));
+ Bundle bundle1 = installBundle(assembleBundle("bundle10", "/bundles/singleton/singleton1"));
try
{
- Bundle bundle2 = installBundle(assembleBundle("bundle2", "/bundles/singleton/singleton2"));
+ Bundle bundle2 = installBundle(assembleBundle("bundle20", "/bundles/singleton/singleton2"));
uninstall(bundle2);
fail("Should not be here!");
}
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/bundle/SystemBundleUnitTestCase.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -88,7 +88,7 @@
}
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void testGetHeaders() throws Exception
{
Dictionary expected = new Hashtable();
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/classloader/ClassLoaderDomainUnitTestCase.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -33,7 +33,7 @@
import org.jboss.classloader.spi.ClassLoaderPolicy;
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.ParentPolicy;
-import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.ClassFilterUtils;
import org.jboss.classloader.spi.filter.PackageClassFilter;
import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
import org.jboss.logging.Logger;
@@ -74,7 +74,7 @@
PackageClassFilter classFilter = PackageClassFilter.createPackageClassFilterFromString(filteredPackages);
classFilter.setIncludeJava(true);
- domain.setParentPolicy(new ParentPolicy(classFilter, ClassFilter.NOTHING));
+ domain.setParentPolicy(new ParentPolicy(classFilter, ClassFilterUtils.NOTHING));
URL coreURL = new OSGiTestHelper().getTestArchiveURL("bundles/org.osgi.core.jar");
VirtualFile coreVF = VFS.createNewRoot(coreURL);
Modified: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-12-17 20:22:42 UTC (rev 97967)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-12-17 20:24:15 UTC (rev 97968)
@@ -97,9 +97,10 @@
}
PackageAdminPlugin packageAdmin = bundleManager.getPlugin(PackageAdminPlugin.class);
- boolean allResoved = packageAdmin.resolveBundles(null);
+ packageAdmin.resolveBundles(null);
+
+ System.out.println("[JBOSGI-151] Cannot resolve circular dependencies");
//assertTrue("All bundles resolved", allResoved);
- System.out.println("[JBOSGI-151] Cannot resolve circular dependencies");
}
finally
{
14 years, 5 months
JBoss-OSGI SVN: r97938 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-17 03:52:55 -0500 (Thu, 17 Dec 2009)
New Revision: 97938
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
Log:
Align deployment with spi with respect to BundleException handling
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java 2009-12-17 08:51:44 UTC (rev 97937)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java 2009-12-17 08:52:55 UTC (rev 97938)
@@ -76,17 +76,17 @@
// do nothing
}
- public Deployment createDeployment(URL url)
+ public Deployment createDeployment(URL url) throws BundleException
{
return delegate.createDeployment(url);
}
- public Deployment createDeployment(VirtualFile file)
+ public Deployment createDeployment(VirtualFile file) throws BundleException
{
return delegate.createDeployment(file);
}
- public Deployment createDeployment(BundleInfo info)
+ public Deployment createDeployment(BundleInfo info) throws BundleException
{
return delegate.createDeployment(info);
}
14 years, 5 months
JBoss-OSGI SVN: r97936 - in projects/jboss-osgi/projects/runtime/deployment/trunk/src: main/java/org/jboss/osgi/deployment/internal and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-17 03:51:42 -0500 (Thu, 17 Dec 2009)
New Revision: 97936
Modified:
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java
Log:
Align deployment with spi with respect to BundleException handling
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -27,6 +27,7 @@
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleException;
/**
* An abstract base implementation of the DeployerService.
@@ -36,17 +37,17 @@
*/
public abstract class AbstractDeployerService implements DeployerService
{
- public Deployment createDeployment(URL url)
+ public Deployment createDeployment(URL url) throws BundleException
{
return DeploymentFactory.createDeployment(url);
}
- public Deployment createDeployment(VirtualFile file)
+ public Deployment createDeployment(VirtualFile file) throws BundleException
{
return DeploymentFactory.createDeployment(file);
}
- public Deployment createDeployment(BundleInfo info)
+ public Deployment createDeployment(BundleInfo info) throws BundleException
{
return DeploymentFactory.createDeployment(info);
}
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -48,17 +48,17 @@
/**
* Create a deployment from the given location.
*/
- Deployment createDeployment(URL url);
+ Deployment createDeployment(URL url) throws BundleException;
/**
* Create a deployment from the given file.
*/
- Deployment createDeployment(VirtualFile file);
+ Deployment createDeployment(VirtualFile file) throws BundleException;
/**
* Create a deployment from the given bundle info.
*/
- Deployment createDeployment(BundleInfo info);
+ Deployment createDeployment(BundleInfo info) throws BundleException;
/**
* Deploy an array of bundles
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -38,45 +38,55 @@
/**
* Get the root virtual file
*/
- public VirtualFile getRoot();
+ VirtualFile getRoot();
/**
* Get the bundle location
*/
- public String getLocation();
+ String getLocation();
/**
* Get the bundle symbolic name
*/
- public String getSymbolicName();
+ String getSymbolicName();
/**
* Get the bundle version
*/
- public String getVersion();
+ String getVersion();
/**
* Get the manifest header for the given key.
*/
- public String getManifestHeader(String key);
+ String getManifestHeader(String key);
/**
* Get the start level associated with this deployment
*/
- public int getStartLevel();
+ int getStartLevel();
/**
* Set the start level associated with this deployment
*/
- public void setStartLevel(int startLevel);
+ void setStartLevel(int startLevel);
/**
* Get the autostart flag associated with this deployment
*/
- public boolean isAutoStart();
+ boolean isAutoStart();
/**
* Set the autostart flag associated with this deployment
*/
- public void setAutoStart(boolean autoStart);
+ void setAutoStart(boolean autoStart);
+
+ /**
+ * Get the update flag associated with this deployment
+ */
+ boolean isBundleUpdate();
+
+ /**
+ * Set the update flag associated with this deployment
+ */
+ void setBundleUpdate(boolean update);
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -28,6 +28,7 @@
import org.jboss.osgi.deployment.internal.DeploymentImpl;
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleException;
/**
* A deployment factory.
@@ -42,19 +43,19 @@
{
}
- public static Deployment createDeployment(URL url)
+ public static Deployment createDeployment(URL url) throws BundleException
{
BundleInfo info = BundleInfo.createBundleInfo(url);
return new DeploymentImpl(info);
}
- public static Deployment createDeployment(VirtualFile file)
+ public static Deployment createDeployment(VirtualFile file) throws BundleException
{
BundleInfo info = BundleInfo.createBundleInfo(file);
return new DeploymentImpl(info);
}
- public static Deployment createDeployment(BundleInfo info)
+ public static Deployment createDeployment(BundleInfo info) throws BundleException
{
return new DeploymentImpl(info);
}
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -43,6 +43,7 @@
private BundleInfo info;
private int startLevel;
private boolean autoStart;
+ private boolean update;
public DeploymentImpl(BundleInfo info)
{
@@ -52,78 +53,61 @@
this.info = info;
}
- /**
- * Get the root virtual file
- */
public VirtualFile getRoot()
{
return info.getRoot();
}
- /**
- * Get the bundle location
- */
public String getLocation()
{
return info.getLocation();
}
- /**
- * Get the bundle symbolic name
- */
public String getSymbolicName()
{
return info.getSymbolicName();
}
- /**
- * Get the bundle version
- */
public String getVersion()
{
return info.getVersion().toString();
}
- /**
- * Get the manifest header for the given key.
- */
public String getManifestHeader(String key)
{
return info.getManifestHeader(key);
}
- /**
- * Get the start level associated with this deployment
- */
public int getStartLevel()
{
return startLevel;
}
- /**
- * Set the start level associated with this deployment
- */
public void setStartLevel(int startLevel)
{
this.startLevel = startLevel;
}
- /**
- * Get the autostart flag associated with this deployment
- */
public boolean isAutoStart()
{
return autoStart;
}
- /**
- * Set the autostart flag associated with this deployment
- */
public void setAutoStart(boolean autoStart)
{
this.autoStart = autoStart;
}
+ public boolean isBundleUpdate()
+ {
+ return update;
+ }
+
+ public void setBundleUpdate(boolean update)
+ {
+ this.update = update;
+ }
+
@Override
public boolean equals(Object obj)
{
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -31,7 +31,6 @@
import java.io.File;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.net.MalformedURLException;
import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.deployment.internal.DeploymentImpl;
@@ -83,7 +82,7 @@
assertEquals(dep, res);
}
- private BundleInfo getBundleInfo() throws MalformedURLException
+ private BundleInfo getBundleInfo() throws Exception
{
File file = new File("target/test-libs/simple-bundle.jar");
assertTrue("File exists: " + file, file.exists());
14 years, 5 months
JBoss-OSGI SVN: r97935 - in projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles: update and 4 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-17 03:48:27 -0500 (Thu, 17 Dec 2009)
New Revision: 97935
Added:
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/
projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF
Log:
Bundle.update() - WIP
Added: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle1/META-INF/MANIFEST.MF 2009-12-17 08:48:27 UTC (rev 97935)
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Bundle-SymbolicName: update-bundle1
+Bundle-Version: 1.0.0
+
Added: projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/tdiesler/src/test/resources/bundles/update/update-bundle2/META-INF/MANIFEST.MF 2009-12-17 08:48:27 UTC (rev 97935)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-SymbolicName: update-bundle2
+Bundle-Version: 1.0.1
14 years, 5 months