JBoss-OSGI SVN: r97860 - in projects/jboss-osgi/projects/runtime/framework/trunk: src/main/java/org/jboss/osgi/framework/bundle and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-15 15:25:03 -0500 (Tue, 15 Dec 2009)
New Revision: 97860
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
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/OSGiBundleWrapper.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/deployers/OSGiBundleActivatorDeployer.java
Log:
[JBOSGI-204] Failure in Bundle.start() uninstalls the bundle
Done
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 20:06:59 UTC (rev 97859)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 20:25:03 UTC (rev 97860)
@@ -661,8 +661,6 @@
<excludes>
<!-- http://community.jboss.org/thread/145863 -->
<exclude>org/jboss/test/osgi/service/ServiceMixUnitTestCase.class</exclude>
- <!-- [JBOSGI-204] Failure in Bundle.start() uninstalls the bundle -->
- <exclude>org/jboss/test/osgi/bundle/BundleLifecycleTestCase.class</exclude>
</excludes>
</configuration>
</plugin>
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-15 20:06:59 UTC (rev 97859)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-15 20:25:03 UTC (rev 97860)
@@ -1179,9 +1179,14 @@
try
{
- String name = bundleState.getDeploymentUnit().getName();
- deployerClient.change(name, DeploymentStages.INSTALLED);
- deployerClient.checkComplete(name);
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ deployerClient.change(unit.getName(), DeploymentStages.INSTALLED);
+ deployerClient.checkComplete(unit.getName());
+
+ // The potential BundleException is attached by the OSGiBundleActivatorDeployer
+ BundleException startEx = unit.removeAttachment(BundleException.class);
+ if (startEx != null)
+ throw startEx;
}
catch (DeploymentException ex)
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java 2009-12-15 20:06:59 UTC (rev 97859)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java 2009-12-15 20:25:03 UTC (rev 97860)
@@ -70,7 +70,7 @@
return bundleState;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration findEntries(String path, String filePattern, boolean recurse)
{
return bundleState.findEntries(path, filePattern, recurse);
@@ -91,19 +91,19 @@
return bundleState.getEntry(path);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getEntryPaths(String path)
{
return bundleState.getEntryPaths(path);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Dictionary getHeaders()
{
return bundleState.getHeaders();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Dictionary getHeaders(String locale)
{
return bundleState.getHeaders(locale);
@@ -129,7 +129,7 @@
return bundleState.getResource(name);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getResources(String name) throws IOException
{
return bundleState.getResources(name);
@@ -165,7 +165,7 @@
return bundleState.hasPermission(permission);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Class loadClass(String name) throws ClassNotFoundException
{
return bundleState.loadClass(name);
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-15 20:06:59 UTC (rev 97859)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2009-12-15 20:25:03 UTC (rev 97860)
@@ -123,7 +123,7 @@
return null;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getEntryPaths(String path)
{
log.warn("[JBOSGI-138] getEntryPaths(" + path + ")");
@@ -136,7 +136,7 @@
return null;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getResources(String name) throws IOException
{
log.warn("[JBOSGI-138] getResources(" + name + ")");
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleActivatorDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleActivatorDeployer.java 2009-12-15 20:06:59 UTC (rev 97859)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleActivatorDeployer.java 2009-12-15 20:25:03 UTC (rev 97860)
@@ -25,6 +25,7 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.osgi.framework.bundle.OSGiBundleState;
+import org.osgi.framework.BundleException;
/**
* OSGiBundleActivatorDeployer.
@@ -48,9 +49,12 @@
{
bundleState.startInternal();
}
- catch (Throwable t)
+ catch (BundleException ex)
{
- throw DeploymentException.rethrowAsDeploymentException("Error starting bundle: " + bundleState, t);
+ // We do not rethrow this exception to the deployer framework.
+ // An exception during Bundle.start() is regarded as a normal deployemtn condition and handeled internally by the OSGi layer.
+ // The OSGiBundleManager picks up this BundleException and rethrows it if available.
+ unit.addAttachment(BundleException.class, ex);
}
}
@@ -61,9 +65,9 @@
{
deployment.stopInternal();
}
- catch (Throwable t)
+ catch (BundleException ex)
{
- log.warn("Error stopping bundle: " + deployment, t);
+ log.warn("Error stopping bundle: " + deployment, ex);
}
}
}
16 years
JBoss-OSGI SVN: r97858 - projects/jboss-osgi/projects/runtime/framework/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-15 14:51:49 -0500 (Tue, 15 Dec 2009)
New Revision: 97858
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
Log:
[JBOSGI-204] Failure in Bundle.start() uninstalls the bundle
Exclude test case
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 19:45:06 UTC (rev 97857)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 19:51:49 UTC (rev 97858)
@@ -662,7 +662,7 @@
<!-- http://community.jboss.org/thread/145863 -->
<exclude>org/jboss/test/osgi/service/ServiceMixUnitTestCase.class</exclude>
<!-- [JBOSGI-204] Failure in Bundle.start() uninstalls the bundle -->
- <exclude>org/jboss/test/osgi/bundle/BundleLifecycleTestCase</exclude>
+ <exclude>org/jboss/test/osgi/bundle/BundleLifecycleTestCase.class</exclude>
</excludes>
</configuration>
</plugin>
16 years
JBoss-OSGI SVN: r97857 - in projects/jboss-osgi/projects/runtime/framework/trunk: src/main/java/org/jboss/osgi/framework/bundle and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-15 14:45:06 -0500 (Tue, 15 Dec 2009)
New Revision: 97857
Added:
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/support/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/support/a/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/support/a/FailOnStartActivator.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/META-INF/MANIFEST.MF
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
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/OSGiBundleState.java
Log:
[JBOSGI-204] Failure in Bundle.start() uninstalls the bundle
WIP
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 19:02:16 UTC (rev 97856)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-15 19:45:06 UTC (rev 97857)
@@ -658,6 +658,12 @@
<value>${project.build.directory}/test-libs</value>
</property>
</systemProperties>
+ <excludes>
+ <!-- http://community.jboss.org/thread/145863 -->
+ <exclude>org/jboss/test/osgi/service/ServiceMixUnitTestCase.class</exclude>
+ <!-- [JBOSGI-204] Failure in Bundle.start() uninstalls the bundle -->
+ <exclude>org/jboss/test/osgi/bundle/BundleLifecycleTestCase</exclude>
+ </excludes>
</configuration>
</plugin>
</plugins>
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-15 19:02:16 UTC (rev 97856)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-15 19:45:06 UTC (rev 97857)
@@ -224,13 +224,13 @@
return osgiMetaData;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Dictionary getHeaders()
{
return getHeaders(null);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Dictionary getHeaders(String locale)
{
checkAdminPermission(AdminPermission.METADATA);
@@ -408,7 +408,7 @@
return getBundleManager().getServiceReferences(this, clazz, filter, true);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "rawtypes" })
public ServiceRegistration registerService(String clazz, Object service, Dictionary properties)
{
if (clazz == null)
@@ -416,7 +416,7 @@
return registerService(new String[] { clazz }, service, properties);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties)
{
checkValidBundleContext();
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-15 19:02:16 UTC (rev 97856)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2009-12-15 19:45:06 UTC (rev 97857)
@@ -129,7 +129,7 @@
return null;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getEntryPaths(String path)
{
checkInstalled();
@@ -158,7 +158,7 @@
return null;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration findEntries(String path, String filePattern, boolean recurse)
{
if (path == null)
@@ -232,7 +232,7 @@
return getDeploymentUnit().getClassLoader().getResource(name);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Enumeration getResources(String name) throws IOException
{
checkInstalled();
@@ -281,12 +281,51 @@
*
* @throws Throwable for any error
*/
- public void startInternal() throws Throwable
+ public void startInternal() throws BundleException
{
- // Bundle extenders catch the STARTING event and might expect a valid context
+ // If this bundle's state is UNINSTALLED then an IllegalStateException is thrown.
+ if (getState() == Bundle.UNINSTALLED)
+ throw new IllegalStateException("Bundle already uninstalled: " + this);
+
+ // [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 started.
+
+ // If this bundle's state is ACTIVE then this method returns immediately.
+ if (getState() == Bundle.ACTIVE)
+ return;
+
+ // [TODO] If the START_TRANSIENT option is not set then set this bundle's autostart setting to Started with declared activation
+ // if the START_ACTIVATION_POLICY option is set or Started with eager activation if not set. When the Framework is restarted
+ // and this bundle's autostart setting is not Stopped, this bundle must be automatically started.
+
+ // If this bundle's state is not RESOLVED, an attempt is made to resolve this bundle. If the Framework cannot resolve this bundle,
+ // a BundleException is thrown.
+ if (getState() != Bundle.RESOLVED)
+ {
+ try
+ {
+ getBundleManager().resolveBundle(this, true);
+ }
+ catch (RuntimeException ex)
+ {
+ throw new BundleException("Cannot resolve bundle: " + this, ex);
+ }
+ }
+
+ // [TODO] If the START_ACTIVATION_POLICY option is set and this bundle's declared activation policy is lazy then:
+ // * If this bundle's state is STARTING then this method returns immediately.
+ // * This bundle's state is set to STARTING.
+ // * A bundle event of type BundleEvent.LAZY_ACTIVATION is fired.
+ // * This method returns immediately and the remaining steps will be followed when this bundle's activation is later triggered.
+
+
+ // This bundle's state is set to STARTING
+ // A bundle event of type BundleEvent.STARTING is fired
createBundleContext();
changeState(STARTING);
+ // The BundleActivator.start(org.osgi.framework.BundleContext) method of this bundle's BundleActivator, if one is specified, is called.
try
{
OSGiMetaData metaData = getOSGiMetaData();
@@ -301,6 +340,7 @@
if (result instanceof BundleActivator == false)
throw new BundleException(bundleActivatorClassName + " is not an implementation of " + BundleActivator.class.getName());
+ // Attach so we can call BundleActivator.stop() on this instance
BundleActivator bundleActivator = (BundleActivator)result;
unit.addAttachment(BundleActivator.class, bundleActivator);
@@ -312,77 +352,125 @@
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.
+ // * 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.
+ // * This bundle's state is set to RESOLVED.
+ // * A bundle event of type BundleEvent.STOPPED is fired.
+ // * A BundleException is then thrown.
catch (Throwable t)
{
+ // This bundle's state is set to STOPPING
+ // A bundle event of type BundleEvent.STOPPING is fired
changeState(STOPPING);
- // TODO stop the bundle
+
+ // 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();
+
destroyBundleContext();
changeState(RESOLVED);
- throw t;
+
+ // A bundle event of type BundleEvent.STOPPED is fired
+
+ if (t instanceof BundleException)
+ throw (BundleException)t;
+
+ throw new BundleException("Cannot start bundle: " + this, t);
}
}
/**
* Stop Internal
- *
- * [TODO] Start Level Service & STOP_TRANSIENT? [TODO] locks [TODO] options
- *
- * @throws Throwable for any error
*/
- public void stopInternal() throws Throwable
+ public void stopInternal() throws BundleException
{
+ // If this bundle's state is UNINSTALLED then an IllegalStateException is thrown.
+ if (getState() == Bundle.UNINSTALLED)
+ throw new IllegalStateException("Bundle already uninstalled: " + this);
+
+ // [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.
+
+ // If this bundle's state is not STARTING or ACTIVE then this method returns immediately
+ if (getState() != Bundle.STARTING && getState() != Bundle.ACTIVE)
+ return;
+
+ // This bundle's state is set to STOPPING
+ // A bundle event of type BundleEvent.STOPPING is fired
+ int priorState = getState();
changeState(STOPPING);
+ // If this bundle's state was ACTIVE prior to setting the state to STOPPING,
+ // the BundleActivator.stop(org.osgi.framework.BundleContext) method of this bundle's BundleActivator, if one is specified, is called.
+ // If that method throws an exception, this method must continue to stop this bundle and a BundleException must be thrown after completion
+ // of the remaining steps.
Throwable rethrow = null;
- try
+ if (priorState == Bundle.ACTIVE)
{
- BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
- BundleContext bundleContext = getBundleContext();
- if (bundleActivator != null && bundleContext != null)
- {
- try
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
+ BundleContext bundleContext = getBundleContext();
+ if (bundleActivator != null && bundleContext != null)
{
- bundleActivator.stop(bundleContext);
- }
- catch (Throwable t)
- {
- rethrow = t;
- }
- }
-
- for (ControllerContext context : getUsedContexts(this))
- {
- int count = getUsedByCount(context, this);
- while (count > 0)
- {
try
{
- getBundleManager().ungetContext(this, context);
+ bundleActivator.stop(bundleContext);
}
catch (Throwable t)
{
- log.debug("Error ungetting service: " + context, t);
+ rethrow = t;
}
- count--;
}
- }
+ }
+
+ // Any services registered by this bundle must be unregistered
+ getBundleManager().unregisterContexts(this);
- // unregister bundle's contexts
- getBundleManager().unregisterContexts(this);
-
- if (getState() != STOPPING)
- throw new BundleException("Bundle has been uninstalled: " + getCanonicalName());
- }
- finally
+ // Any services used by this bundle must be released
+ for (ControllerContext context : getUsedContexts(this))
{
- if (getState() == STOPPING)
- changeState(RESOLVED);
- destroyBundleContext();
- getDeploymentUnit().removeAttachment(BundleActivator.class);
+ int count = getUsedByCount(context, this);
+ while (count > 0)
+ {
+ try
+ {
+ getBundleManager().ungetContext(this, context);
+ }
+ catch (Throwable t)
+ {
+ log.debug("Error ungetting service: " + context, t);
+ }
+ count--;
+ }
}
+ // [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
+ destroyBundleContext();
+ changeState(RESOLVED);
+
+ if (priorState != STOPPING)
+ throw new BundleException("Bundle has been uninstalled: " + getCanonicalName());
+
+ // [TODO] A bundle event of type BundleEvent.STOPPED is fired
+
if (rethrow != null)
- throw rethrow;
+ throw new BundleException("Error during stop of bundle: " + this, rethrow);
}
public void update(InputStream in) throws BundleException
Added: 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 (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java 2009-12-15 19:45:06 UTC (rev 97857)
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.bundle;
+
+import junit.framework.Test;
+
+import org.jboss.test.osgi.FrameworkTest;
+import org.jboss.test.osgi.bundle.support.a.FailOnStartActivator;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+/**
+ * BundleLifecycleTestCase.
+ *
+ * @author thomas.Diesler(a)jboss.com
+ * @since 15-Dec-2009
+ */
+public class BundleLifecycleTestCase extends FrameworkTest
+{
+ public static Test suite()
+ {
+ return suite(BundleLifecycleTestCase.class);
+ }
+
+ public BundleLifecycleTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testExceptionOnStart() throws Exception
+ {
+ Bundle bundle = assembleBundle("fail-on-start", "/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ try
+ {
+ assertBundleState(Bundle.INSTALLED, bundle.getState());
+
+ try
+ {
+ bundle.start();
+ fail("BundleException expected");
+ }
+ catch (BundleException ex)
+ {
+ assertBundleState(Bundle.RESOLVED, bundle.getState());
+ }
+ }
+ finally
+ {
+ //bundle.uninstall();
+ //assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+ }
+ }
+}
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/support/a/FailOnStartActivator.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/support/a/FailOnStartActivator.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/support/a/FailOnStartActivator.java 2009-12-15 19:45:06 UTC (rev 97857)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.bundle.support.a;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A BundleActivator that fails on start.
+ *
+ * @author thomas.Diesler(a)jboss.com
+ * @since 15-Dec-2009
+ */
+public class FailOnStartActivator implements BundleActivator
+{
+
+ public void start(BundleContext context) throws Exception
+ {
+ throw new IllegalStateException("fail on start");
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+}
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/lifecycle/fail-on-start/META-INF/MANIFEST.MF 2009-12-15 19:45:06 UTC (rev 97857)
@@ -0,0 +1,4 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.test.osgi.failstart
+Bundle-Activator: org.jboss.test.osgi.bundle.support.a.FailOnStartActivator
+
16 years
JBoss-OSGI SVN: r97807 - in projects/jboss-osgi: projects/runtime/deployers/trunk and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-14 16:08:40 -0500 (Mon, 14 Dec 2009)
New Revision: 97807
Modified:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
projects/jboss-osgi/trunk/pom.xml
Log:
Update Deployers to use string location
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-12-14 21:08:40 UTC (rev 97807)
@@ -21,7 +21,7 @@
<artifactId>jboss-osgi-microcontainer</artifactId>
<packaging>bundle</packaging>
- <version>2.0.10-SNAPSHOT</version>
+ <version>2.0.9-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -44,13 +44,13 @@
<version.jboss.microcontainer>2.0.9.GA</version.jboss.microcontainer>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
- <version.jboss.osgi.husky>1.0.2</version.jboss.osgi.husky>
+ <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.husky>1.0.3-SNAPSHOT</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
<version.jboss.osgi.reflect>2.0.2</version.jboss.osgi.reflect>
- <version.jboss.osgi.runtime.deployers>1.0.3</version.jboss.osgi.runtime.deployers>
- <version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
+ <version.jboss.osgi.runtime.deployers>1.0.4-SNAPSHOT</version.jboss.osgi.runtime.deployers>
+ <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.xml.binding>2.0.2.Beta3</version.jboss.osgi.xml.binding>
<version.osgi>4.2.0</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2009-12-14 21:08:40 UTC (rev 97807)
@@ -31,8 +31,8 @@
<properties>
<version.jboss.deployers>2.0.9.GA</version.jboss.deployers>
- <version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
- <version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
+ <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>4.2.0</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-12-14 21:08:40 UTC (rev 97807)
@@ -23,11 +23,8 @@
//$Id$
-import java.net.URL;
-
import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
-
/**
* The Bundle metadata.
*
@@ -36,36 +33,36 @@
*/
public class BundleMetaData extends AbstractManifestMetaData
{
- private String symbolicName;
- private URL bundleLocation;
+ private String symbolicName;
+ private String bundleLocation;
// exteralizable usage
- public BundleMetaData()
- {
- }
+ public BundleMetaData()
+ {
+ }
public BundleMetaData(String symbolicName)
- {
- this.symbolicName = symbolicName;
- }
+ {
+ this.symbolicName = symbolicName;
+ }
- public String getSymbolicName()
- {
- return symbolicName;
- }
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
- public URL getBundleLocation()
- {
- return bundleLocation;
- }
+ public String getBundleLocation()
+ {
+ return bundleLocation;
+ }
- public void setBundleLocation(URL bundleLocation)
- {
- this.bundleLocation = bundleLocation;
- }
-
- public String toString()
- {
- return "Bundle[name=" + symbolicName + "]";
- }
+ public void setBundleLocation(String bundleLocation)
+ {
+ this.bundleLocation = bundleLocation;
+ }
+
+ public String toString()
+ {
+ return "Bundle[name=" + symbolicName + "]";
+ }
}
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-12-14 21:08:40 UTC (rev 97807)
@@ -23,7 +23,6 @@
//$Id$
-import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
@@ -60,7 +59,7 @@
log.debug("Bundle-SymbolicName: " + symbolicName + " in " + file);
Deployment dep = unit.getAttachment(Deployment.class);
- URL location = (dep != null ? dep.getLocation() : unit.getRoot().toURL());
+ String location = (dep != null ? dep.getLocation() : unit.getName());
metaData.setBundleLocation(location);
// Add a marker that this is an OSGi deployment
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-12-14 21:08:40 UTC (rev 97807)
@@ -69,21 +69,17 @@
public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
{
- URL bundleURL = metadata.getBundleLocation();
- if (bundleURL == null)
+ String location = metadata.getBundleLocation();
+ if (location == null)
throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
- String bundlePath = bundleURL.getPath();
- if (bundlePath.endsWith("/"))
- bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
-
try
{
boolean skipBundle = false;
for (URL skip : skipBundles)
{
String skipPath = skip.getPath();
- if (skipPath.equals(bundlePath))
+ if (skipPath.equals(location))
{
skipBundle = true;
break;
@@ -91,7 +87,7 @@
}
if (skipBundle == false)
{
- Bundle bundle = systemContext.installBundle(bundleURL.toString());
+ Bundle bundle = systemContext.installBundle(location);
unit.addAttachment(Bundle.class, bundle);
log.info("Installed: " + bundle);
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-12-14 21:07:03 UTC (rev 97806)
+++ projects/jboss-osgi/trunk/pom.xml 2009-12-14 21:08:40 UTC (rev 97807)
@@ -61,9 +61,9 @@
<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.0.9</version.jboss.osgi.microcontainer>
+ <version.jboss.osgi.microcontainer>2.0.9-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.reflect>2.0.2</version.jboss.osgi.reflect>
- <version.jboss.osgi.runtime.deployers>1.0.3</version.jboss.osgi.runtime.deployers>
+ <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>
<version.jboss.osgi.runtime.felix>2.0.2</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.2</version.jboss.osgi.runtime.jbossas>
16 years
JBoss-OSGI SVN: r97806 - in projects/jboss-osgi/projects: runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-14 16:07:03 -0500 (Mon, 14 Dec 2009)
New Revision: 97806
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
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/launch/OSGiFramework.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/FrameworkEventsPlugin.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/FrameworkEventsPluginImpl.java
Log:
TCK framework.launch
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2009-12-14 21:04:38 UTC (rev 97805)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2009-12-14 21:07:03 UTC (rev 97806)
@@ -29,8 +29,8 @@
<property file="${basedir}/ant.properties" />
- <!-- Setup property defaults -->
- <property environment="env"/>
+ <!-- Setup property defaults -->
+ <property environment="env" />
<property name="hudson.username" value="${env.USER}" />
<property name="osgitck.export" value="/home/${hudson.username}/svn/osgitck/r4v42" />
<property name="osgitck.tar.file" value="${osgitck.export}/../osgitck-r4v42.tar" />
@@ -38,11 +38,11 @@
<property name="hudson.root" value="/home/${hudson.username}/workspace/osgitck" />
<echo>************************************************</echo>
- <echo message="hudson.username=${hudson.username}"/>
- <echo message="aQute.bnd.version=${aQute.bnd.version}"/>
- <echo message="framework.version=${framework.version}"/>
- <echo message="osgitck.export=${osgitck.export}"/>
- <echo message="osgitck.tar.file=${osgitck.tar.file}"/>
+ <echo message="hudson.username=${hudson.username}" />
+ <echo message="aQute.bnd.version=${aQute.bnd.version}" />
+ <echo message="framework.version=${framework.version}" />
+ <echo message="osgitck.export=${osgitck.export}" />
+ <echo message="osgitck.tar.file=${osgitck.tar.file}" />
<echo>************************************************</echo>
<!-- Check if the osgitck export is available -->
@@ -61,7 +61,7 @@
<!-- Check if the osgitck dir is available -->
<available property="osgitck.dir.available" file="${osgitck.dir}" />
-
+
</target>
<!-- ================================================================== -->
@@ -70,50 +70,51 @@
<!-- Tar the OSGi TCK-->
<target name="tar-osgitck" depends="init" unless="osgitck.tar.available">
- <fail message="Cannot find osgitck export: ${osgitck.export}" unless="osgitck.export.available"/>
- <tar basedir="${osgitck.export}" destfile="${osgitck.tar.file}" longfile="gnu" excludes="**/.svn"/>
+ <fail message="Cannot find osgitck export: ${osgitck.export}" unless="osgitck.export.available" />
+ <tar basedir="${osgitck.export}" destfile="${osgitck.tar.file}" longfile="gnu" excludes="**/.svn" />
</target>
<!-- Untar the OSGi TCK-->
<target name="untar-osgitck" depends="tar-osgitck" unless="osgitck.dir.available">
- <mkdir dir="${osgitck.dir}"/>
- <untar src="${osgitck.tar.file}" dest="${osgitck.dir}"/>
+ <mkdir dir="${osgitck.dir}" />
+ <untar src="${osgitck.tar.file}" dest="${osgitck.dir}" />
<available property="osgitck.dir.available" file="${osgitck.dir}" />
</target>
<!-- Setup the TCK to use the RI (equinox) -->
- <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="init,untar-osgitck">
-
+ <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="untar-osgitck">
+
<!-- Copy the aQute.bnd -->
- <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
-
- <!-- Build the TCK -->
+
+ <!-- Build the TCK -->
<ant dir="${osgitck.dir}/osgi.ct" target="clean" />
<ant dir="${osgitck.dir}/osgi.ct" target="publish" />
</target>
<!-- Setup the TCK to use the JBoss OSGi Framework -->
- <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init,untar-osgitck">
-
+ <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="untar-osgitck,update-framework">
+
<!-- Overlay the TCK setup -->
- <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<copy todir="${osgitck.dir}" overwrite="true">
<fileset dir="${basedir}/overlay" />
</copy>
- <!-- Copy the OSGi Framework -->
- <mkdir dir="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
- <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework/org.jboss.osgi.framework-1.0.0.jar" overwrite="true" />
-
<!-- Copy the aQute.bnd -->
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
-
- <!-- Build the TCK -->
+
+ <!-- Build the TCK -->
<ant dir="${osgitck.dir}/osgi.ct" target="clean" />
<ant dir="${osgitck.dir}/osgi.ct" target="publish" />
</target>
+ <!-- Update the JBoss OSGi Framework -->
+ <target name="update-framework" description="Update the JBoss OSGi Framework" depends="untar-osgitck">
+ <!-- Copy the OSGi Framework -->
+ <mkdir dir="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
+ <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework/org.jboss.osgi.framework-1.0.0.jar" overwrite="true" />
+ </target>
+
<!-- ================================================================== -->
<!-- Hudson -->
<!-- ================================================================== -->
@@ -121,15 +122,15 @@
<target name="hudson-setup" description="Setup the TCK Hudson instance" depends="init">
<ant dir="${basedir}/hudson" target="hudson-setup" />
</target>
-
+
<target name="hudson-start" description="Start the TCK Hudson instance" depends="init">
<ant dir="${basedir}/hudson" target="hudson-start" />
</target>
-
+
<target name="hudson-stop" description="Stop the TCK Hudson instance" depends="init">
<ant dir="${basedir}/hudson" target="hudson-stop" />
</target>
-
+
<!-- ================================================================== -->
<!-- TCK Tests -->
<!-- ================================================================== -->
@@ -138,22 +139,22 @@
<fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<ant dir="${osgitck.dir}/osgi.ct" target="osgi.core.tests" />
</target>
-
+
<target name="test-reports" description="Generate the TCK test reports" depends="init">
<fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
- <mkdir dir="${reports.dir}"/>
+ <mkdir dir="${reports.dir}" />
<junitreport todir="${reports.dir}">
<fileset dir="${osgitck.dir}">
- <include name="**/test-reports/TEST-*.xml"/>
+ <include name="**/test-reports/TEST-*.xml" />
</fileset>
- <report format="frames" todir="${reports.dir}/html"/>
+ <report format="frames" todir="${reports.dir}/html" />
</junitreport>
-
- <echo/>
- <echo message="Generated test reports: ${reports.dir}"/>
- <echo/>
+
+ <echo />
+ <echo message="Generated test reports: ${reports.dir}" />
+ <echo />
</target>
-
+
<!-- ================================================================== -->
<!-- Clean -->
<!-- ================================================================== -->
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-14 21:04:38 UTC (rev 97805)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-14 21:07:03 UTC (rev 97806)
@@ -43,6 +43,7 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import java.util.jar.Attributes.Name;
@@ -117,54 +118,40 @@
/** The bundle manager's bean name: OSGiBundleManager */
public static final String BEAN_BUNDLE_MANAGER = "OSGiBundleManager";
-
/** The framework version */
private static String OSGi_FRAMEWORK_VERSION = "r4v42"; // [TODO] externalise
-
/** The framework vendor */
private static String OSGi_FRAMEWORK_VENDOR = "jboss.org"; // [TODO] externalise
-
/** The framework language */
private static String OSGi_FRAMEWORK_LANGUAGE = Locale.getDefault().getISO3Language(); // REVIEW correct?
-
/** The os name */
private static String OSGi_FRAMEWORK_OS_NAME;
-
/** The os version */
private static String OSGi_FRAMEWORK_OS_VERSION;
-
/** The os version */
private static String OSGi_FRAMEWORK_PROCESSOR;
-
/** The bundles by id */
private List<AbstractBundleState> bundles = new CopyOnWriteArrayList<AbstractBundleState>();
-
/** The kernel */
private Kernel kernel;
-
/** The main deployer */
private DeployerClient deployerClient;
-
/** The deployment structure */
private MainDeployerStructure deployerStructure;
-
/** The deployment registry */
private DeploymentRegistry registry;
-
/** The instance metadata factory */
private MetaDataRetrievalFactory factory;
-
/** The executor */
private Executor executor;
-
/** The system bundle */
private OSGiSystemState systemBundle;
-
/** The registered manager plugins */
private Map<Class<?>, Plugin> plugins = Collections.synchronizedMap(new LinkedHashMap<Class<?>, Plugin>());
-
/** The frame work properties */
private Map<String, Object> properties = new ConcurrentHashMap<String, Object>();
+ /** The framework stop monitor*/
+ private AtomicInteger stopMonitor = new AtomicInteger(0);
static
{
@@ -433,7 +420,7 @@
public void setProperties(Map<String, Object> props)
{
properties.putAll(props);
-
+
// Init default framework properties
if (getProperty(Constants.FRAMEWORK_VERSION) == null)
setProperty(Constants.FRAMEWORK_VERSION, OSGi_FRAMEWORK_VERSION);
@@ -693,7 +680,7 @@
BundleInfo info = BundleInfo.createBundleInfo(root, location);
Deployment dep = DeploymentFactory.createDeployment(info);
dep.setAutoStart(autoStart);
-
+
return installBundle(dep);
}
@@ -1537,7 +1524,19 @@
}
/**
- * Init the Framework
+ * Initialize this Framework.
+ *
+ * After calling this method, this Framework must:
+ * - Be in the Bundle.STARTING state.
+ * - Have a valid Bundle Context.
+ * - Be at start level 0.
+ * - Have event handling enabled.
+ * - Have reified Bundle objects for all installed bundles.
+ * - Have registered any framework services. For example, PackageAdmin, ConditionalPermissionAdmin, StartLevel.
+ *
+ * This Framework will not actually be started until start is called.
+ *
+ * This method does nothing if called when this Framework is in the Bundle.STARTING, Bundle.ACTIVE or Bundle.STOPPING states.
*/
public void initFramework()
{
@@ -1555,10 +1554,25 @@
// Put into the STARTING state
systemBundle.changeState(Bundle.STARTING);
+ // Create the system bundle context
+ systemBundle.createBundleContext();
+
// [TODO] Be at start level 0
- // [TODO] Have event handling enabled
+ // Have event handling enabled
+ FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
+ eventsPlugin.setActive(true);
+ // Have registered any framework services.
+ for (Plugin plugin : plugins.values())
+ {
+ if (plugin instanceof ServicePlugin)
+ {
+ ServicePlugin servicePlugin = (ServicePlugin)plugin;
+ servicePlugin.startService();
+ }
+ }
+
// Cleanup the storage area
String storageClean = getProperty(Constants.FRAMEWORK_STORAGE_CLEAN);
BundleStoragePlugin storagePlugin = getOptionalPlugin(BundleStoragePlugin.class);
@@ -1577,19 +1591,6 @@
if (systemBundle.getState() != Bundle.STARTING)
initFramework();
- // Create the system bundle context
- systemBundle.createBundleContext();
-
- // Start registered service plugins
- for (Plugin plugin : plugins.values())
- {
- if (plugin instanceof ServicePlugin)
- {
- ServicePlugin servicePlugin = (ServicePlugin)plugin;
- servicePlugin.startService();
- }
- }
-
// All installed bundles must be started
AutoInstallPlugin autoInstall = getOptionalPlugin(AutoInstallPlugin.class);
if (autoInstall != null)
@@ -1612,44 +1613,132 @@
}
/**
- * Stop the framework
+ * Stop this Framework.
+ *
+ * The method returns immediately to the caller after initiating the following steps to be taken on another thread.
+ *
+ * 1. This Framework's state is set to Bundle.STOPPING.
+ * 2. All installed bundles must be stopped without changing each bundle's persistent autostart setting.
+ * 3. Unregister all services registered by this Framework.
+ * 4. Event handling is disabled.
+ * 5. This Framework's state is set to Bundle.RESOLVED.
+ * 6. All resources held by this Framework are released. This includes threads, bundle class loaders, open files, etc.
+ * 7. Notify all threads that are waiting at waitForStop that the stop operation has completed.
+ *
+ * After being stopped, this Framework may be discarded, initialized or started.
*/
public void stopFramework()
{
- AbstractBundleState systemBundle = getSystemBundle();
- if (systemBundle.getState() != Bundle.ACTIVE)
- return;
-
- systemBundle.changeState(Bundle.STOPPING);
- for (AbstractBundleState bundleState : getBundles())
+ int beforeCount = stopMonitor.get();
+ Runnable stopcmd = new Runnable()
{
- if (bundleState != systemBundle)
+ public void run()
{
- try
+ synchronized (stopMonitor)
{
- // [TODO] don't change the persistent state
- bundleState.stop();
+ // Start the stop process
+ stopMonitor.addAndGet(1);
+
+ // This Framework's state is set to Bundle.STOPPING
+ systemBundle.changeState(Bundle.STOPPING);
+
+ // If this Framework implements the optional Start Level Service Specification,
+ // then the start level of this Framework is moved to start level zero (0), as described in the Start Level Service Specification.
+
+ // All installed bundles must be stopped without changing each bundle's persistent autostart setting
+ for (AbstractBundleState bundleState : getBundles())
+ {
+ if (bundleState != systemBundle)
+ {
+ try
+ {
+ // [TODO] don't change the persistent state
+ bundleState.stop();
+ }
+ catch (Exception ex)
+ {
+ // Any exceptions that occur during bundle stopping must be wrapped in a BundleException and then
+ // published as a framework event of type FrameworkEvent.ERROR
+ fireError(bundleState, "stopping bundle", ex);
+ }
+ }
+ }
+
+ // Stop registered service plugins
+ List<Plugin> reverseServicePlugins = new ArrayList<Plugin>(plugins.values());
+ Collections.reverse(reverseServicePlugins);
+ for (Plugin plugin : reverseServicePlugins)
+ {
+ if (plugin instanceof ServicePlugin)
+ {
+ ServicePlugin servicePlugin = (ServicePlugin)plugin;
+ servicePlugin.stopService();
+ }
+ }
+
+ // Event handling is disabled
+ FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
+ eventsPlugin.setActive(false);
+
+ // This Framework's state is set to Bundle.RESOLVED
+ systemBundle.changeState(Bundle.RESOLVED);
+
+ // All resources held by this Framework are released
+ systemBundle.destroyBundleContext();
+
+ // Notify all threads that are waiting at waitForStop that the stop operation has completed
+ stopMonitor.notifyAll();
}
- catch (Throwable t)
- {
- fireWarning(bundleState, "stopping bundle", t);
- }
}
+ };
+ executor.execute(stopcmd);
+
+ // Wait for the stop thread
+ while (stopMonitor.get() == beforeCount)
+ {
+ try
+ {
+ Thread.sleep(100);
+ }
+ catch (InterruptedException ex)
+ {
+ // ignore
+ }
}
+ }
- // Stop registered service plugins
- List<Plugin> reverseServicePlugins = new ArrayList<Plugin>(plugins.values());
- Collections.reverse(reverseServicePlugins);
- for (Plugin plugin : reverseServicePlugins)
+ /**
+ * Wait until this Framework has completely stopped.
+ *
+ * The stop and update methods on a Framework performs an asynchronous stop of the Framework.
+ * This method can be used to wait until the asynchronous stop of this Framework has completed.
+ * This method will only wait if called when this Framework is in the Bundle.STARTING, Bundle.ACTIVE, or Bundle.STOPPING states.
+ * Otherwise it will return immediately.
+ *
+ * A Framework Event is returned to indicate why this Framework has stopped.
+ */
+ public FrameworkEvent waitForStop(long timeout) throws InterruptedException
+ {
+ int state = systemBundle.getState();
+
+ // Only wait when this Framework is in Bundle.STARTING, Bundle.ACTIVE, or Bundle.STOPPING state
+ if (state != Bundle.STARTING && state != Bundle.ACTIVE && state != Bundle.STOPPING)
+ return new FrameworkEvent(FrameworkEvent.STOPPED, systemBundle, null);
+
+ long timeoutTime = System.currentTimeMillis() + timeout;
+ synchronized (stopMonitor)
{
- if (plugin instanceof ServicePlugin)
+ while (state != Bundle.RESOLVED && System.currentTimeMillis() < timeoutTime)
{
- ServicePlugin servicePlugin = (ServicePlugin)plugin;
- servicePlugin.stopService();
+ stopMonitor.wait(timeout);
+ state = systemBundle.getState();
}
}
- systemBundle.changeState(Bundle.RESOLVED);
+ if (System.currentTimeMillis() > timeoutTime)
+ return new FrameworkEvent(FrameworkEvent.WAIT_TIMEDOUT, systemBundle, null);
+
+ return new FrameworkEvent(FrameworkEvent.STOPPED, systemBundle, null);
}
/**
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java 2009-12-14 21:04:38 UTC (rev 97805)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFramework.java 2009-12-14 21:07:03 UTC (rev 97806)
@@ -79,16 +79,12 @@
@Override
public void stop() throws BundleException
{
- // [TODO] The method returns immediately to the caller after initiating the following steps
-
bundleManager.stopFramework();
}
@Override
public void stop(int options) throws BundleException
{
- // [TODO] The method returns immediately to the caller after initiating the following steps
-
bundleManager.stopFramework();
}
@@ -144,11 +140,11 @@
throw new BundleException("The system bundle cannot be uninstalled");
}
+ /**
+ * Wait until this Framework has completely stopped.
+ */
public FrameworkEvent waitForStop(long timeout) throws InterruptedException
{
- // [TODO] Wait until this Framework has completely stopped.
-
- // [TODO] A Framework Event indicating the reason this method returned
- return new FrameworkEvent(FrameworkEvent.STOPPED, this, null);
+ return bundleManager.waitForStop(timeout);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/FrameworkEventsPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/FrameworkEventsPlugin.java 2009-12-14 21:04:38 UTC (rev 97805)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/FrameworkEventsPlugin.java 2009-12-14 21:07:03 UTC (rev 97806)
@@ -38,6 +38,10 @@
*/
public interface FrameworkEventsPlugin extends Plugin
{
+ boolean isActive();
+
+ void setActive(boolean active);
+
void addBundleListener(Bundle bundle, BundleListener listener);
void removeBundleListener(Bundle bundle, BundleListener listener);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/FrameworkEventsPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/FrameworkEventsPluginImpl.java 2009-12-14 21:04:38 UTC (rev 97805)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/FrameworkEventsPluginImpl.java 2009-12-14 21:07:03 UTC (rev 97806)
@@ -65,6 +65,8 @@
// Provide logging
final Logger log = Logger.getLogger(FrameworkEventsPluginImpl.class);
+ /** The active state of this plugin */
+ private boolean active;
/** The bundle listeners */
private final Map<Bundle, List<BundleListener>> bundleListeners = new ConcurrentHashMap<Bundle, List<BundleListener>>();
/** The framework listeners */
@@ -94,6 +96,16 @@
this.synchronous = synchronous;
}
+ public boolean isActive()
+ {
+ return active;
+ }
+
+ public void setActive(boolean active)
+ {
+ this.active = active;
+ }
+
public void addBundleListener(Bundle bundle, BundleListener listener)
{
if (listener == null)
16 years
JBoss-OSGI SVN: r97745 - in projects/jboss-osgi/projects/runtime/framework/trunk/src/test: resources and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-11 12:01:25 -0500 (Fri, 11 Dec 2009)
New Revision: 97745
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/metadata/
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/AbstractManifestTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/HeaderValuesTestCase.java
Log:
Start work on Bundle Validity
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/AbstractManifestTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/AbstractManifestTestCase.java 2009-12-11 16:43:45 UTC (rev 97744)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/AbstractManifestTestCase.java 2009-12-11 17:01:25 UTC (rev 97745)
@@ -26,12 +26,14 @@
import java.net.URL;
import java.util.jar.Manifest;
+import org.jboss.osgi.testing.OSGiTestHelper;
import org.jboss.test.BaseTestCase;
/**
* Uses Manifest.mf file for actual tests.
*
* @author <a href="mailto:ales.justin@jboss.com">Ales Justin</a>
+ * @author Thomas.Diesler(a)jboss.com
*/
public abstract class AbstractManifestTestCase extends BaseTestCase
{
@@ -44,11 +46,12 @@
{
if (prefix == null)
prefix = "";
- return prefix + "Manifest.mf";
+ return "bundles/metadata/" + prefix + "Manifest.mf";
}
protected Manifest getManifest(String name) throws IOException
{
+
InputStream is = getManifestInputStream(name);
try
{
@@ -62,7 +65,7 @@
protected InputStream getManifestInputStream(String name) throws IOException
{
- URL url = getResource(name);
+ URL url = new OSGiTestHelper().getResourceURL(name);
if (url == null)
fail(name + " not found");
return url.openStream();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/HeaderValuesTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/HeaderValuesTestCase.java 2009-12-11 16:43:45 UTC (rev 97744)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/metadata/HeaderValuesTestCase.java 2009-12-11 17:01:25 UTC (rev 97745)
@@ -238,11 +238,4 @@
assertEquals(vr1, vr2);
}
}
-
- public void testIllegalManifest() throws Exception
- {
- getManifest(createName("Illegal"));
- // TDO
- }
-
}
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/metadata (from rev 97743, projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/bundle/metadata)
16 years
JBoss-OSGI SVN: r97740 - in projects/jboss-osgi: projects/spi/trunk/.settings and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-11 10:54:47 -0500 (Fri, 11 Dec 2009)
New Revision: 97740
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
projects/jboss-osgi/projects/spi/trunk/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleTestCase.java
Log:
Fix remote uninstall
Add ManagedBundle.getLocation()
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java 2009-12-11 15:44:59 UTC (rev 97739)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java 2009-12-11 15:54:47 UTC (rev 97740)
@@ -23,6 +23,7 @@
// $Id$
+import java.net.URL;
import java.util.Dictionary;
import org.jboss.osgi.spi.management.ManagedBundleMBean;
@@ -48,7 +49,6 @@
private final Logger log = LoggerFactory.getLogger(RemoteBundle.class);
private ManagedBundleMBean bundle;
- private BundleInfo bundleInfo;
private String location;
private long bundleId;
@@ -56,11 +56,10 @@
private Dictionary<String, String> headers;
private Version version;
- public RemoteBundle(OSGiRuntimeImpl runtime, ManagedBundleMBean bundle, BundleInfo bundleInfo)
+ public RemoteBundle(OSGiRuntimeImpl runtime, ManagedBundleMBean bundle, BundleInfo info)
{
this(runtime, bundle);
- this.bundleInfo = bundleInfo;
- this.location = bundleInfo.getLocation();
+ this.location = info.getLocation();
}
public RemoteBundle(OSGiRuntimeImpl runtime, ManagedBundleMBean bundle)
@@ -73,6 +72,7 @@
bundleId = bundle.getBundleId();
symbolicName = bundle.getSymbolicName();
+ location = bundle.getLocation();
headers = bundle.getHeaders();
String versionStr = headers.get(Constants.BUNDLE_VERSION);
@@ -144,7 +144,7 @@
try
{
OSGiRuntimeImpl runtimeImpl = (OSGiRuntimeImpl)getRuntime();
- runtimeImpl.undeploy(bundleInfo.getRootURL());
+ runtimeImpl.undeploy(new URL(location));
runtimeImpl.unregisterBundle(this);
setUninstalled(true);
}
Modified: projects/jboss-osgi/projects/spi/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-11 15:44:59 UTC (rev 97739)
+++ projects/jboss-osgi/projects/spi/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-11 15:54:47 UTC (rev 97740)
@@ -1,12 +1,6 @@
-#Tue Feb 17 14:10:42 CET 2009
+#Fri Dec 11 16:24:04 CET 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-12-11 15:44:59 UTC (rev 97739)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-12-11 15:54:47 UTC (rev 97740)
@@ -95,6 +95,11 @@
return bundle.getSymbolicName();
}
+ public String getLocation()
+ {
+ return bundle.getLocation();
+ }
+
@SuppressWarnings("rawtypes")
public Dictionary<String, String> getHeaders()
{
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java 2009-12-11 15:44:59 UTC (rev 97739)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java 2009-12-11 15:54:47 UTC (rev 97740)
@@ -64,6 +64,11 @@
String getSymbolicName();
/**
+ * Returns the location of this bundle
+ */
+ String getLocation();
+
+ /**
* Returns the bundle manifest headers
*/
Dictionary<String, String> getHeaders();
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleTestCase.java 2009-12-11 15:44:59 UTC (rev 97739)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleTestCase.java 2009-12-11 15:54:47 UTC (rev 97740)
@@ -42,11 +42,11 @@
{
// Get the default runtime
OSGiRuntime runtime = getDefaultRuntime();
-
try
{
// Install the bundle
OSGiBundle bundle = runtime.installBundle("example-simple.jar");
+ assertBundleState(Bundle.INSTALLED, bundle.getState());
// Start the bundle
bundle.start();
@@ -54,6 +54,7 @@
// Uninstall the bundle
bundle.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, bundle.getState());
}
finally
{
16 years
JBoss-OSGI SVN: r97736 - projects/jboss-osgi/trunk/hudson.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-11 08:51:58 -0500 (Fri, 11 Dec 2009)
New Revision: 97736
Modified:
projects/jboss-osgi/trunk/hudson/build.xml
Log:
Use workspace/jboss-osgi
Modified: projects/jboss-osgi/trunk/hudson/build.xml
===================================================================
--- projects/jboss-osgi/trunk/hudson/build.xml 2009-12-11 13:48:25 UTC (rev 97735)
+++ projects/jboss-osgi/trunk/hudson/build.xml 2009-12-11 13:51:58 UTC (rev 97736)
@@ -49,7 +49,7 @@
<!-- Setup property defaults -->
<property environment="env"/>
<property name="hudson.username" value="${env.USER}" />
- <property name="hudson.root" value="/home/${hudson.username}/workspace/osgitck" />
+ <property name="hudson.root" value="/home/${hudson.username}/workspace/jboss-osgi" />
<xmlproperty file="${project.root.dir}/pom.xml"/>
<property name="version.id" value="${project.version}"/>
16 years
JBoss-OSGI SVN: r97734 - in projects/jboss-osgi/trunk: distribution and 9 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-11 08:45:51 -0500 (Fri, 11 Dec 2009)
New Revision: 97734
Modified:
projects/jboss-osgi/trunk/distribution/docbook/pom.xml
projects/jboss-osgi/trunk/distribution/installer/pom.xml
projects/jboss-osgi/trunk/distribution/javadoc/pom.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/pom.xml
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/trailblazer/pom.xml
Log:
version=1.0.0.Beta6
Modified: projects/jboss-osgi/trunk/distribution/docbook/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/distribution/docbook/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/trunk/distribution/installer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/distribution/installer/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Dependencies -->
Modified: projects/jboss-osgi/trunk/distribution/javadoc/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/javadoc/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/distribution/javadoc/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -37,7 +37,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Modules -->
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -20,7 +20,7 @@
<artifactId>jboss-osgi</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
<parent>
<groupId>org.jboss.osgi</groupId>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -39,7 +39,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<modules>
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<modules>
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/pom.xml 2009-12-11 13:36:20 UTC (rev 97733)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/pom.xml 2009-12-11 13:45:51 UTC (rev 97734)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5</version>
+ <version>1.0.0.Beta6</version>
</parent>
<!-- Properties -->
16 years
JBoss-OSGI SVN: r97732 - projects/jboss-osgi/trunk/hudson.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-11 08:34:59 -0500 (Fri, 11 Dec 2009)
New Revision: 97732
Modified:
projects/jboss-osgi/trunk/hudson/build.xml
Log:
download as600M1
Modified: projects/jboss-osgi/trunk/hudson/build.xml
===================================================================
--- projects/jboss-osgi/trunk/hudson/build.xml 2009-12-11 13:26:38 UTC (rev 97731)
+++ projects/jboss-osgi/trunk/hudson/build.xml 2009-12-11 13:34:59 UTC (rev 97732)
@@ -86,9 +86,10 @@
<!--
Get thirdparty dependencies
-->
- <target name="thirdparty" depends="init-thirdparty,get-tomcat,get-hudson,get-jboss501,get-jboss510">
+ <target name="thirdparty" depends="init-thirdparty,get-tomcat,get-hudson,get-jboss501,get-jboss510,get-jboss600">
<copy todir="${hudson.root}/jboss" file="${thirdparty.dir}/jboss-5.0.1.GA.zip"/>
<copy todir="${hudson.root}/jboss" file="${thirdparty.dir}/jboss-5.1.0.GA.zip"/>
+ <copy todir="${hudson.root}/jboss" file="${thirdparty.dir}/jboss-6.0.0.M1.zip"/>
</target>
<target name="get-tomcat" depends="init-thirdparty" unless="apache.tomcat.available">
<get src="http://www.apache.org/dist/tomcat/tomcat-5/v${apache-tomcat}/bin/apache-t..." dest="${thirdparty.dir}/apache-tomcat.zip" usetimestamp="true" verbose="true"/>
16 years