summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-27 01:11:14 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-27 01:11:14 +0000
commit21f1cc59989e11e5509ea48811fdf317941f66ad (patch)
treed49d57da264ea412cf605f4c9827da58131ffde6 /java
parent1f38746ea4ee9e9be4bf76bb144cdf26f577b0ac (diff)
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
Diffstat (limited to '')
-rw-r--r--java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java2
1 files changed, 1 insertions, 1 deletions
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) {