felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1792435 - /felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
Date Mon, 24 Apr 2017 08:20:38 GMT
Author: cziegeler
Date: Mon Apr 24 08:20:38 2017
New Revision: 1792435

URL: http://svn.apache.org/viewvc?rev=1792435&view=rev
Log:
Implementing correct configuration admin handling (WiP)

Modified:
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java

Modified: felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java?rev=1792435&r1=1792434&r2=1792435&view=diff
==============================================================================
--- felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
(original)
+++ felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
Mon Apr 24 08:20:38 2017
@@ -323,12 +323,15 @@ public class Configurator {
         if ( localCoordinator != null ) {
             coordination = CoordinatorUtil.getCoordination(localCoordinator);
         }
+        boolean noRetryNeeded = true;
         try {
             for(final String pid : state.getPids()) {
                 final ConfigList configList = state.getConfigurations(pid);
 
                 if ( configList.hasChanges() ) {
-                    process(configList);
+                    if ( !process(configList) ) {
+                        noRetryNeeded = false;
+                    }
                     State.writeState(this.bundleContext, state);
                 }
             }
@@ -337,13 +340,17 @@ public class Configurator {
                 CoordinatorUtil.endCoordination(coordination);
             }
         }
+        if ( !noRetryNeeded ) {
+            // TODO
+        }
     }
 
     /**
      * Process changes to a pid.
      * @param configList The config list
+     * @return {@code true} if the change has been processed, {@code false} if a retry is
required
      */
-    public void process(final ConfigList configList) {
+    public boolean process(final ConfigList configList) {
         Config toActivate = null;
         Config toDeactivate = null;
 
@@ -421,9 +428,8 @@ public class Configurator {
 
             // mark as processed
             configList.setHasChanges(false);
-        } else {
-            // TODO
         }
+        return noRetryNeeded;
     }
 
     private ConfigurationAdmin getConfigurationAdmin(final long configAdminServiceBundleId)
{



Mime
View raw message