incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r911415 - in /incubator/aries/trunk/application: application-api/src/main/java/org/apache/aries/application/management/ application-management/src/main/java/org/apache/aries/application/management/impl/ application-runtime/src/main/java/org...
Date Thu, 18 Feb 2010 14:21:13 GMT
Author: gnodet
Date: Thu Feb 18 14:21:13 2010
New Revision: 911415

URL: http://svn.apache.org/viewvc?rev=911415&view=rev
Log:
The application uninstallation should be fully delegated to the ApplicationContextManager

Modified:
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
    incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
    incubator/aries/trunk/application/application-runtime/src/main/java/org/apache/aries/application/runtime/impl/ApplicationContextManagerImpl.java

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java?rev=911415&r1=911414&r2=911415&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
Thu Feb 18 14:21:13 2010
@@ -50,5 +50,5 @@
    * 
    * @param app the application to remove.
    */
-  public void remove(ApplicationContext app);
+  public void remove(ApplicationContext app) throws BundleException;
 }

Modified: incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java?rev=911415&r1=911414&r2=911415&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
(original)
+++ incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
Thu Feb 18 14:21:13 2010
@@ -240,11 +240,6 @@
   
   public void uninstall(ApplicationContext app) throws BundleException 
   {
-    Set<Bundle> bundles = app.getApplicationContent();
-    for (Bundle b : bundles) { 
-      b.uninstall();
-    }
-
     _applicationContextManager.remove(app);
   }
 

Modified: incubator/aries/trunk/application/application-runtime/src/main/java/org/apache/aries/application/runtime/impl/ApplicationContextManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime/src/main/java/org/apache/aries/application/runtime/impl/ApplicationContextManagerImpl.java?rev=911415&r1=911414&r2=911415&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-runtime/src/main/java/org/apache/aries/application/runtime/impl/ApplicationContextManagerImpl.java
(original)
+++ incubator/aries/trunk/application/application-runtime/src/main/java/org/apache/aries/application/runtime/impl/ApplicationContextManagerImpl.java
Thu Feb 18 14:21:13 2010
@@ -31,6 +31,7 @@
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.ManagementException;
 import org.apache.aries.application.management.ApplicationContext.ApplicationState;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 
@@ -69,7 +70,7 @@
     return result;
   }
 
-  public void remove(ApplicationContext app)
+  public void remove(ApplicationContext app) throws BundleException
   {
     Iterator<Map.Entry<AriesApplication, ApplicationContextImpl>> it = _appToContextMap.entrySet().iterator();
     
@@ -80,11 +81,21 @@
       
       if (potentialMatch == app) {
         it.remove();
-        
-        potentialMatch.setState(ApplicationState.UNINSTALLED);
-        
+
+        uninstall(potentialMatch);
+
         break;
       }
     }
   }
+
+  protected void uninstall(ApplicationContextImpl app) throws BundleException
+  {
+      Set<Bundle> bundles = app.getApplicationContent();
+      for (Bundle b : bundles) {
+        b.uninstall();
+      }
+      app.setState(ApplicationState.UNINSTALLED);
+
+  }
 }
\ No newline at end of file



Mime
View raw message