From 21f1cc59989e11e5509ea48811fdf317941f66ad Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 27 May 2009 01:11:14 +0000 Subject: Only stop the bundle when it is active git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@778946 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/implementation/osgi/runtime/OSGiImplementationProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/sca/modules/implementation-osgi-runtime/src') diff --git a/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java b/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java index ab139519c8..c6e01564db 100644 --- a/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java +++ b/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java @@ -111,7 +111,7 @@ public class OSGiImplementationProvider implements ImplementationProvider { // Do we have to unregister the services? try { int state = osgiBundle.getState(); - if ((state & Bundle.STARTING) == 0) { + if ((state & Bundle.STOPPING) == 0 && (state & Bundle.ACTIVE) != 0) { osgiBundle.stop(); } } catch (BundleException e) { -- cgit v1.2.3