UNOMI-5 Karaf 4 update: Fix service registration that didn't include all the 
classes interfaces


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/bf8c6096
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/bf8c6096
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/bf8c6096

Branch: refs/heads/feature-UNOMI-5-KARAF4-1
Commit: bf8c6096a54de626ae5ca043f25c91129ce47a46
Parents: 1927b66
Author: Serge Huber <shu...@apache.org>
Authored: Tue Mar 6 12:24:43 2018 +0100
Committer: Serge Huber <shu...@apache.org>
Committed: Tue Mar 6 15:55:14 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/unomi/itests/BaseIT.java    |  5 +--
 .../resources/OSGI-INF/blueprint/blueprint.xml  |  1 +
 .../resources/OSGI-INF/blueprint/blueprint.xml  | 36 +++++++++++++++++---
 3 files changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bf8c6096/itests/src/test/java/org/apache/unomi/itests/BaseIT.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java 
b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java
index 9da6b85..5849e4c 100644
--- a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java
@@ -25,7 +25,8 @@ import org.ops4j.pax.exam.options.MavenUrlReference;
 
 import java.io.File;
 
-import static org.ops4j.pax.exam.CoreOptions.*;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*;
 
 /**
@@ -107,7 +108,7 @@ public abstract class BaseIT {
                 keepRuntimeFolder(),
                 configureConsole().ignoreLocalConsole(),
                 logLevel(LogLevel.INFO),
-                editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", 
"log4j2.rootLogger.level", "DEBUG"),
+                editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", 
"log4j2.rootLogger.level", "INFO"),
                 editConfigurationFilePut("etc/org.apache.karaf.features.cfg", 
"serviceRequirements", "disable"),
 //                editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", 
"org.osgi.service.http.port", HTTP_PORT),
 //                
systemProperty("org.osgi.service.http.port").value(HTTP_PORT),

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bf8c6096/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git 
a/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
 
b/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 3b63a69..a1f13b5 100644
--- 
a/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ 
b/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -66,6 +66,7 @@
     <service id="elasticSearchPersistenceService" 
ref="elasticSearchPersistenceServiceImpl">
         <interfaces>
             <value>org.apache.unomi.persistence.spi.PersistenceService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
         </interfaces>
     </service>
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bf8c6096/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml 
b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index f5d20aa..2e1ee27 100644
--- a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -60,7 +60,12 @@
         <property name="persistenceService" ref="persistenceService"/>
         <property name="bundleContext" ref="blueprintBundleContext"/>
     </bean>
-    <service id="definitionsService" ref="definitionsServiceImpl" 
interface="org.apache.unomi.api.services.DefinitionsService"/>
+    <service id="definitionsService" ref="definitionsServiceImpl">
+        <interfaces>
+            <value>org.apache.unomi.api.services.DefinitionsService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
+        </interfaces>
+    </service>
 
     <bean id="eventServiceImpl" 
class="org.apache.unomi.services.services.EventServiceImpl"
         init-method="init" destroy-method="destroy">
@@ -98,7 +103,12 @@
         <property name="rulesService" ref="rulesServiceImpl"/>
         <property name="bundleContext" ref="blueprintBundleContext"/>
     </bean>
-    <service id="goalsService" ref="goalsServiceImpl" 
interface="org.apache.unomi.api.services.GoalsService"/>
+    <service id="goalsService" ref="goalsServiceImpl">
+        <interfaces>
+            <value>org.apache.unomi.api.services.GoalsService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
+        </interfaces>
+    </service>
 
     <bean id="actionExecutorDispatcherImpl"
           class="org.apache.unomi.services.actions.ActionExecutorDispatcher">
@@ -113,7 +123,13 @@
         <property name="actionExecutorDispatcher" 
ref="actionExecutorDispatcherImpl"/>
         <property name="bundleContext" ref="blueprintBundleContext"/>
     </bean>
-    <service id="rulesService" ref="rulesServiceImpl" 
interface="org.apache.unomi.api.services.RulesService"/>
+    <service id="rulesService" ref="rulesServiceImpl">
+        <interfaces>
+            <value>org.apache.unomi.api.services.RulesService</value>
+            <value>org.apache.unomi.api.services.EventListenerService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
+        </interfaces>
+    </service>
 
     <bean id="segmentServiceImpl" 
class="org.apache.unomi.services.services.SegmentServiceImpl"
           init-method="postConstruct" destroy-method="preDestroy">
@@ -125,7 +141,12 @@
         <property name="taskExecutionPeriod" value="86400000"/>
         <property name="segmentUpdateBatchSize" 
value="${services.segment.update.batchSize}" />
     </bean>
-    <service id="segmentService" ref="segmentServiceImpl" 
interface="org.apache.unomi.api.services.SegmentService"/>
+    <service id="segmentService" ref="segmentServiceImpl">
+        <interfaces>
+            <value>org.apache.unomi.api.services.SegmentService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
+        </interfaces>
+    </service>
 
     <bean id="userListServiceImpl" 
class="org.apache.unomi.services.services.UserListServiceImpl"
           init-method="postConstruct" destroy-method="preDestroy">
@@ -153,7 +174,12 @@
         <property name="purgeSessionsAndEventsTime" 
value="${services.event.purge.existTime}"/>
         <property name="forceRefreshOnSave" 
value="${services.profile.forceRefreshOnSave}" />
     </bean>
-    <service id="profileService" ref="profileServiceImpl" 
interface="org.apache.unomi.api.services.ProfileService"/>
+    <service id="profileService" ref="profileServiceImpl">
+        <interfaces>
+            <value>org.apache.unomi.api.services.ProfileService</value>
+            <value>org.osgi.framework.SynchronousBundleListener</value>
+        </interfaces>
+    </service>
 
     <bean id="queryServiceImpl" 
class="org.apache.unomi.services.services.QueryServiceImpl"
           init-method="postConstruct" destroy-method="preDestroy">

Reply via email to