summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-29 21:35:00 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-29 21:35:00 +0000
commitecf04061e5efbb48144ef5bd37db42ab68e1d167 (patch)
tree5b391a68a3fe2df4c0da314e2a6709b16e8fdec5 /java/sca
parent7b499edf566396968e00fc64a3da8ecc8f10e7fb (diff)
Handle service unregistration gracefully
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@831097 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.java7
1 files changed, 6 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 7c2b90e601..5c13b3d04e 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
@@ -127,7 +127,12 @@ public class OSGiImplementationProvider implements ImplementationProvider {
public void stop() {
for (ServiceRegistration registration : registrations) {
- registration.unregister();
+ try {
+ registration.unregister();
+ } catch (IllegalStateException e) {
+ // The service has been unregistered
+ // Ignore
+ }
}
registrations.clear();
try {