felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1792445 - in /felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl: Configurator.java ServicesListener.java
Date Mon, 24 Apr 2017 09:43:52 GMT
Author: cziegeler
Date: Mon Apr 24 09:43:52 2017
New Revision: 1792445

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

Modified:
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/ServicesListener.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=1792445&r1=1792444&r2=1792445&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 09:43:52 2017
@@ -139,6 +139,16 @@ public class Configurator {
         });
     }
 
+    public void configAdminAdded() {
+        queue.enqueue(new Runnable() {
+
+            @Override
+            public void run() {
+                process();
+            }
+        });
+    }
+
     private String getBundleIdentity(final Bundle bundle) {
         if ( bundle.getSymbolicName() == null ) {
             return bundle.getBundleId() + " (" + bundle.getLocation() + ")";
@@ -323,15 +333,13 @@ 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() ) {
-                    if ( !process(configList) ) {
-                        noRetryNeeded = false;
-                    }
+                    process(configList);
                     State.writeState(this.bundleContext, state);
                 }
             }
@@ -340,9 +348,6 @@ public class Configurator {
                 CoordinatorUtil.endCoordination(coordination);
             }
         }
-        if ( !noRetryNeeded ) {
-            // TODO
-        }
     }
 
     /**

Modified: felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/ServicesListener.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/ServicesListener.java?rev=1792445&r1=1792444&r2=1792445&view=diff
==============================================================================
--- felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/ServicesListener.java
(original)
+++ felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/ServicesListener.java
Mon Apr 24 09:43:52 2017
@@ -115,6 +115,8 @@ public class ServicesListener {
                 configurator.setCoordinator(coordinator);
                 if ( isNew ) {
                     configurator.start();
+                } else {
+                    configurator.configAdminAdded();
                 }
             } else {
                 if ( configurator != null ) {



Mime
View raw message