felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apan...@apache.org
Subject svn commit: r1407155 - in /felix/trunk/webconsole-plugins/servicediagnostics: ./ core/src/main/resources/html/ core/src/main/scala/servicediagnostics/impl/ sample/src/main/scala/servicediagnostics/sample/
Date Thu, 08 Nov 2012 16:25:44 GMT
Author: apanday
Date: Thu Nov  8 16:25:44 2012
New Revision: 1407155

URL: http://svn.apache.org/viewvc?rev=1407155&view=rev
Log:
do not filter optional dependencies from DS

Modified:
    felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt
    felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/resources/html/index.html
    felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
    felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDM.scala
    felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDS.scala

Modified: felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt?rev=1407155&r1=1407154&r2=1407155&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt (original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt Thu Nov  8 16:25:44 2012
@@ -1,13 +1,20 @@
-Changes from 3.0.0 to 3.0.1
+Changes from 0.1.1 to 0.2.0
 ---------------------------
 
 ** Bug
 
-   [FELIX-3005] - Compatibility API does not add components in DependencyManager
-
 ** Improvement
 
-Release 3.0.0
+* complete rewrite
+* support for service properties
+* detection of circular dependencies
+* doesn't embedd scala and json anymore
+
+** Backward compatibility
+
+* broken: plugin API changed
+
+Release 0.1.1
 -------------
 
 Initial version.

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/resources/html/index.html
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/resources/html/index.html?rev=1407155&r1=1407154&r2=1407155&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/resources/html/index.html
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/resources/html/index.html
Thu Nov  8 16:25:44 2012
@@ -64,7 +64,7 @@ function graphUnavail(json) {
   // show unresolved
   var unresolved = json.unresolved
   if (unresolved) for (s in unresolved) {
-    $("#warning").html("unresolvable components detected!");
+    $("#warning").html("circular dependencies detected!");
     for (i = 0; i < unresolved[s].length; i++) {
       g.addEdge(s, unresolved[s][i], { directed : true } );
     }

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala?rev=1407155&r1=1407154&r2=1407155&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
Thu Nov  8 16:25:44 2012
@@ -45,7 +45,6 @@ class DSNotAvail extends ServiceDiagnost
             comp <- Option(scrService.getComponents).flatten.map(_.asInstanceOf[Component])
             service <- Option(comp.getServices).flatten
             deps = Option(comp.getReferences).flatten
-                          .filterNot(_.isOptional)
                           .map(dep => new Dependency(dep.getServiceName,
                                                      dep.getTarget,
                                                      dep.isSatisfied)).toList

Modified: felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDM.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDM.scala?rev=1407155&r1=1407154&r2=1407155&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDM.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDM.scala
Thu Nov  8 16:25:44 2012
@@ -100,7 +100,7 @@ class TestDM extends DependencyActivator
                 .setCallbacks(null, null, null)
                 .setRequired(true)))
 
-        // test3: loop
+        // test3: loop (required)
         // DML1 -> DSL1 -> DML2 -> DML1
 
         dm.add(createComponent
@@ -131,6 +131,22 @@ class TestDM extends DependencyActivator
                 .setAutoConfig(false)
                 .setCallbacks(null, null, null)
                 .setRequired(true)))
+
+        // test4: loop (optional)
+        // DSL2 -(opt)-> DML3 --> DSL3 -> DSL2
+
+        dm.add(createComponent
+            .setInterface(classOf[DML3].getName, new jHT[String,String]() {{
+              put("p", "3")
+              put("q", "3")
+            }})
+            .setImplementation(classOf[DML3])
+            .add(createServiceDependency
+                .setService(classOf[DSL3], "(q=3)")
+                .setAutoConfig(false)
+                .setCallbacks(null, null, null)
+                .setRequired(true)))
+
     }
 
     override def destroy(bc:BundleContext, dm:DependencyManager) = {}
@@ -152,3 +168,4 @@ class DM2
 class DMP
 class DML1
 class DML2
+class DML3

Modified: felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDS.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDS.scala?rev=1407155&r1=1407154&r2=1407155&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDS.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/sample/src/main/scala/servicediagnostics/sample/TestDS.scala
Thu Nov  8 16:25:44 2012
@@ -48,15 +48,15 @@ class DSL1 
     @Reference(target="(p=2)") def bind(s:DML2) = {}
 }
 
-/* DSL2 -> DML2 -x-> DSL3 -> DSL2
-@Component(provide=Array(classOf[DSL2]), properties=Array("p=1","q=0")) 
+// DSL2 -(opt)-> DML3 --> DSL3 -> DSL2
+@Component(provide=Array(classOf[DSL2]), properties=Array("p=1","q=2")) 
 class DSL2 
 {
-    @Reference(target="(p=2)") def bind(s:DML2) = {}
+    @Reference(target="(p=3)", optional=true, dynamic=true) def bind(s:DML3) = {}
 }
-@Component(provide=Array(classOf[DSL3]), properties=Array("p=1","q=0")) 
+@Component(provide=Array(classOf[DSL3]), properties=Array("p=0","q=3")) 
 class DSL3 
 {
-    @Reference(target="(q=0)") def bind(s:DSL2) = {}
-}*/
+    @Reference(target="(q=2)") def bind(s:DSL2) = {}
+}
 



Mime
View raw message