You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2009/10/29 22:35:01 UTC

svn commit: r831097 - /tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java

Author: rfeng
Date: Thu Oct 29 21:35:00 2009
New Revision: 831097

URL: http://svn.apache.org/viewvc?rev=831097&view=rev
Log:
Handle service unregistration gracefully

Modified:
    tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java

Modified: tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java?rev=831097&r1=831096&r2=831097&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java (original)
+++ tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java Thu Oct 29 21:35:00 2009
@@ -127,7 +127,12 @@
 
     public void stop() {
         for (ServiceRegistration registration : registrations) {
-            registration.unregister();
+            try {
+                registration.unregister();
+            } catch (IllegalStateException e) {
+                // The service has been unregistered
+                // Ignore
+            }
         }
         registrations.clear();
         try {