tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r831097 - /tuscany/java/sca/modules/implementation-osgi-runtime/src/main/java/org/apache/tuscany/sca/implementation/osgi/runtime/OSGiImplementationProvider.java
Date Thu, 29 Oct 2009 21:35:01 GMT
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 {



Mime
View raw message