diff --git a/assembly/broker-artemis/configurations/locator.xml b/assembly/broker-artemis/configurations/locator.xml
index d8048ae1faa..b0cc3325e45 100644
--- a/assembly/broker-artemis/configurations/locator.xml
+++ b/assembly/broker-artemis/configurations/locator.xml
@@ -21,8 +21,6 @@
- org.eclipse.kapua.commons
- org.eclipse.kapua.message
- org.eclipse.kapua.service
+ org.eclipse.kapua
diff --git a/assembly/broker-artemis/descriptors/kapua-broker-artemis.xml b/assembly/broker-artemis/descriptors/kapua-broker-artemis.xml
index 09689d7858d..a70d694dfdb 100644
--- a/assembly/broker-artemis/descriptors/kapua-broker-artemis.xml
+++ b/assembly/broker-artemis/descriptors/kapua-broker-artemis.xml
@@ -84,7 +84,7 @@
javax.cache:cache-api
aopalliance:aopalliance
${pom.groupId}:kapua-locator-guice
-
+
com.fasterxml.jackson.core:jackson-core
@@ -109,9 +109,11 @@
com.warrenstrange:googleauth
javax.cache:cache-api
javax.inject:javax.inject
+ javax.annotation:javax.annotation-api
org.apache.shiro:shiro-core
org.bitbucket.b_c:jose4j
org.javassist:javassist
+ com.google.zxing:core
${pom.groupId}:kapua-account-api
${pom.groupId}:kapua-account-internal
@@ -126,14 +128,17 @@
${pom.groupId}:kapua-message-api
${pom.groupId}:kapua-message-internal
${pom.groupId}:kapua-openid-api
+ ${pom.groupId}:kapua-openid-provider
${pom.groupId}:kapua-service-api
${pom.groupId}:kapua-security-authentication-api
${pom.groupId}:kapua-security-authorization-api
${pom.groupId}:kapua-security-certificate-api
+ ${pom.groupId}:kapua-security-registration-api
${pom.groupId}:kapua-security-certificate-internal
${pom.groupId}:kapua-security-shiro
${pom.groupId}:kapua-service-client
${pom.groupId}:kapua-tag-api
+ ${pom.groupId}:kapua-tag-internal
${pom.groupId}:kapua-user-api
${pom.groupId}:kapua-user-internal
diff --git a/assembly/broker-artemis/pom.xml b/assembly/broker-artemis/pom.xml
index f63873f96b9..45503c5aa4b 100644
--- a/assembly/broker-artemis/pom.xml
+++ b/assembly/broker-artemis/pom.xml
@@ -67,6 +67,10 @@
org.eclipse.kapua
kapua-locator-guice
+
+ org.eclipse.kapua
+ kapua-openid-provider
+
org.eclipse.kapua
kapua-service-api
@@ -87,10 +91,18 @@
org.eclipse.kapua
kapua-security-shiro
+
+ org.eclipse.kapua
+ kapua-security-registration-api
+
org.eclipse.kapua
kapua-tag-api
+
+ org.eclipse.kapua
+ kapua-tag-internal
+
org.eclipse.kapua
kapua-user-api
diff --git a/broker/artemis/plugin/src/main/java/org/eclipse/kapua/broker/artemis/plugin/security/ServerPlugin.java b/broker/artemis/plugin/src/main/java/org/eclipse/kapua/broker/artemis/plugin/security/ServerPlugin.java
index 34449771802..24d9064ee2c 100644
--- a/broker/artemis/plugin/src/main/java/org/eclipse/kapua/broker/artemis/plugin/security/ServerPlugin.java
+++ b/broker/artemis/plugin/src/main/java/org/eclipse/kapua/broker/artemis/plugin/security/ServerPlugin.java
@@ -124,6 +124,7 @@ public ServerPlugin() {
this.pluginUtility = kapuaLocator.getComponent(PluginUtility.class);
this.publishInfoMessageSizeLimit = brokerSetting.getInt(BrokerSettingKey.PUBLISHED_MESSAGE_SIZE_LOG_THRESHOLD, DEFAULT_PUBLISHED_MESSAGE_SIZE_LOG_THRESHOLD);
serverContext = kapuaLocator.getComponent(ServerContext.class);
+ deviceConnectionEventListenerService = kapuaLocator.getComponent(DeviceConnectionEventListenerService.class);
brokerEventHandler = new BrokerEventHandler(kapuaLocator.getComponent(CommonsMetric.class));
brokerEventHandler.registerConsumer((brokerEvent) -> disconnectClient(brokerEvent));
brokerEventHandler.start();
@@ -143,7 +144,7 @@ public void registered(ActiveMQServer server) {
deviceConnectionEventListenerService.addReceiver(serviceEvent -> processDeviceConnectionEvent(serviceEvent));
// Setup service events
- ServiceModuleBundle app = KapuaLocator.getInstance().getService(ServiceModuleBundle.class);
+ ServiceModuleBundle app = KapuaLocator.getInstance().getComponent(ServiceModuleBundle.class);
app.startup();
// Setup JAXB Context
@@ -356,7 +357,7 @@ protected void processDeviceConnectionEvent(ServiceEvent event) {
BrokerEvent disconnectEvent = new BrokerEvent(EventType.disconnectClientByConnectionId, sessionContext, sessionContext);
logger.info("Submitting broker event to disconnect clientId: {}, connectionId: {}", fullClientId, sessionContext.getConnectionId());
- BrokerEventHandler.getInstance().enqueueEvent(disconnectEvent);
+ brokerEventHandler.enqueueEvent(disconnectEvent);
} catch (Exception e) {
logger.warn("Error processing event: {}", e);
}
diff --git a/commons/src/main/java/org/eclipse/kapua/commons/CommonsModule.java b/commons/src/main/java/org/eclipse/kapua/commons/CommonsModule.java
index 3814e496f8d..8ade63ebe42 100644
--- a/commons/src/main/java/org/eclipse/kapua/commons/CommonsModule.java
+++ b/commons/src/main/java/org/eclipse/kapua/commons/CommonsModule.java
@@ -52,7 +52,6 @@ public class CommonsModule extends AbstractKapuaModule {
@Override
protected void configureModule() {
- bind(QueryFactory.class).to(QueryFactoryImpl.class);
bind(DataPopulatorRunner.class).in(Singleton.class);
bind(QueryFactory.class).to(QueryFactoryImpl.class).in(Singleton.class);
bind(CryptoSettings.class).toInstance(new CryptoSettings());
diff --git a/commons/src/main/java/org/eclipse/kapua/commons/liquibase/DatabaseCheckUpdate.java b/commons/src/main/java/org/eclipse/kapua/commons/liquibase/DatabaseCheckUpdate.java
index 08fbbbc3979..8b434286582 100644
--- a/commons/src/main/java/org/eclipse/kapua/commons/liquibase/DatabaseCheckUpdate.java
+++ b/commons/src/main/java/org/eclipse/kapua/commons/liquibase/DatabaseCheckUpdate.java
@@ -14,11 +14,14 @@
import com.google.common.base.MoreObjects;
import org.eclipse.kapua.commons.jpa.JdbcConnectionUrlResolvers;
+import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
import org.eclipse.kapua.commons.setting.system.SystemSetting;
import org.eclipse.kapua.commons.setting.system.SystemSettingKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.inject.Inject;
+
/**
* Call Liquibase database schema check and update (if enabled)
*/
@@ -26,8 +29,8 @@ public class DatabaseCheckUpdate {
private static final Logger logger = LoggerFactory.getLogger(DatabaseCheckUpdate.class);
- public DatabaseCheckUpdate() {
- final SystemSetting systemSetting = SystemSetting.getInstance();
+ @Inject
+ public DatabaseCheckUpdate(SystemSetting systemSetting, DataPopulatorRunner dataPopulatorRunner) {
logger.info("Kapua database schema check and update...");
try {
final boolean runLiquibase = systemSetting.getBoolean(SystemSettingKey.DB_SCHEMA_UPDATE, false);
@@ -56,6 +59,7 @@ public DatabaseCheckUpdate() {
} else {
logger.warn("Skipping Kapua Liquibase Client as per configured property! {}=false", SystemSettingKey.DB_SCHEMA_UPDATE);
}
+ dataPopulatorRunner.runPopulators();
} catch (Exception e) {
logger.error("Kapua database schema check and update... ERROR: {}", e.getMessage(), e);
throw new SecurityException(e);
diff --git a/console/web/src/main/java/org/eclipse/kapua/app/console/server/util/ConsoleListener.java b/console/web/src/main/java/org/eclipse/kapua/app/console/server/util/ConsoleListener.java
index 27fff1b07fc..59a5e4b4a78 100644
--- a/console/web/src/main/java/org/eclipse/kapua/app/console/server/util/ConsoleListener.java
+++ b/console/web/src/main/java/org/eclipse/kapua/app/console/server/util/ConsoleListener.java
@@ -15,15 +15,6 @@
import org.eclipse.kapua.KapuaException;
import org.eclipse.kapua.app.console.ConsoleJAXBContextProvider;
import org.eclipse.kapua.commons.core.ServiceModuleBundle;
-<<<<<<< HEAD
-import org.eclipse.kapua.commons.liquibase.DatabaseCheckUpdate;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
-import org.eclipse.kapua.commons.setting.system.SystemSetting;
-||||||| parent of d6ede90e91 (:fix: cleaner database initialization)
-import org.eclipse.kapua.commons.liquibase.DatabaseCheckUpdate;
-import org.eclipse.kapua.commons.setting.system.SystemSetting;
-=======
->>>>>>> d6ede90e91 (:fix: cleaner database initialization)
import org.eclipse.kapua.commons.util.xml.JAXBContextProvider;
import org.eclipse.kapua.commons.util.xml.XmlUtil;
import org.eclipse.kapua.locator.KapuaLocator;
@@ -54,13 +45,6 @@ public void contextInitialized(final ServletContextEvent event) {
LOG.error("Initialize Console JABContext Provider... ERROR! Error: {}", e.getMessage(), e);
throw new ExceptionInInitializerError(e);
}
-<<<<<<< HEAD
- new DatabaseCheckUpdate();
- KapuaLocator.getInstance().getService(DataPopulatorRunner.class).runPopulators();
-||||||| parent of d6ede90e91 (:fix: cleaner database initialization)
- new DatabaseCheckUpdate();
-=======
->>>>>>> d6ede90e91 (:fix: cleaner database initialization)
// Start Quartz scheduler
try {
LOG.info("Starting Quartz scheduler...");
diff --git a/consumer/lifecycle-app/src/main/java/org/eclipse/kapua/consumer/lifecycle/LifecycleApplication.java b/consumer/lifecycle-app/src/main/java/org/eclipse/kapua/consumer/lifecycle/LifecycleApplication.java
index f9bc393ce82..2b54205f59e 100644
--- a/consumer/lifecycle-app/src/main/java/org/eclipse/kapua/consumer/lifecycle/LifecycleApplication.java
+++ b/consumer/lifecycle-app/src/main/java/org/eclipse/kapua/consumer/lifecycle/LifecycleApplication.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.kapua.consumer.lifecycle;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
-import org.eclipse.kapua.locator.KapuaLocator;
import org.eclipse.kapua.service.camel.setting.ServiceSettingKey;
import org.eclipse.kapua.service.security.SecurityUtil;
import org.springframework.boot.SpringApplication;
@@ -44,7 +42,6 @@ public static void main(String[] args) {
System.setProperty(ServiceSettingKey.JAXB_CONTEXT_CLASS_NAME.key(), LifecycleJAXBContextProvider.class.getName());
//org.springframework.context.ApplicationContext is not needed now so don't keep the SpringApplication.run return
SpringApplication.run(LifecycleApplication.class, args);
- KapuaLocator.getInstance().getService(DataPopulatorRunner.class).runPopulators();
}
diff --git a/consumer/telemetry-app/src/main/java/org/eclipse/kapua/consumer/telemetry/TelemetryApplication.java b/consumer/telemetry-app/src/main/java/org/eclipse/kapua/consumer/telemetry/TelemetryApplication.java
index 2ba32f2cd16..658f5e9b902 100644
--- a/consumer/telemetry-app/src/main/java/org/eclipse/kapua/consumer/telemetry/TelemetryApplication.java
+++ b/consumer/telemetry-app/src/main/java/org/eclipse/kapua/consumer/telemetry/TelemetryApplication.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.kapua.consumer.telemetry;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
-import org.eclipse.kapua.locator.KapuaLocator;
import org.eclipse.kapua.service.camel.setting.ServiceSettingKey;
import org.eclipse.kapua.service.security.SecurityUtil;
import org.springframework.boot.SpringApplication;
@@ -44,7 +42,6 @@ public static void main(String[] args) {
System.setProperty(ServiceSettingKey.JAXB_CONTEXT_CLASS_NAME.key(), TelemetryJAXBContextProvider.class.getName());
//org.springframework.context.ApplicationContext is not needed now so don't keep the SpringApplication.run return
SpringApplication.run(TelemetryApplication.class, args);
- KapuaLocator.getInstance().getService(DataPopulatorRunner.class).runPopulators();
}
}
diff --git a/job-engine/app/web/src/main/java/org/eclipse/kapua/job/engine/app/web/JobEngineApplication.java b/job-engine/app/web/src/main/java/org/eclipse/kapua/job/engine/app/web/JobEngineApplication.java
index beae601057a..b55722d941c 100644
--- a/job-engine/app/web/src/main/java/org/eclipse/kapua/job/engine/app/web/JobEngineApplication.java
+++ b/job-engine/app/web/src/main/java/org/eclipse/kapua/job/engine/app/web/JobEngineApplication.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.kapua.job.engine.app.web;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
import org.eclipse.kapua.commons.rest.errors.ExceptionConfigurationProvider;
import org.eclipse.kapua.commons.setting.system.SystemSetting;
import org.eclipse.kapua.commons.util.xml.XmlUtil;
@@ -68,8 +67,6 @@ public void onStartup(Container container) {
JobEngineJAXBContextProvider provider = serviceLocator.createAndInitialize(JobEngineJAXBContextProvider.class);
XmlUtil.setContextProvider(provider);
final KapuaLocator kapuaLocator = KapuaLocator.getInstance();
- //TODO: Move to databaseUpdate
- kapuaLocator.getService(DataPopulatorRunner.class).runPopulators();
if (kapuaLocator instanceof GuiceLocatorImpl) {
GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
diff --git a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java
index 3a41a044eab..102b391af49 100644
--- a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java
+++ b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java
@@ -241,7 +241,7 @@ public void startBaseDockerEnvironment() throws Exception {
@Given("Service events are setup")
public void startEventBus() throws Exception {
- ServiceModuleBundle serviceModuleBundle = KapuaLocator.getInstance().getService(ServiceModuleBundle.class);
+ ServiceModuleBundle serviceModuleBundle = KapuaLocator.getInstance().getComponent(ServiceModuleBundle.class);
serviceModuleBundle.startup();
}
diff --git a/rest-api/web/src/main/java/org/eclipse/kapua/app/api/web/RestApisApplication.java b/rest-api/web/src/main/java/org/eclipse/kapua/app/api/web/RestApisApplication.java
index efecc02cd19..ee2a48f603a 100644
--- a/rest-api/web/src/main/java/org/eclipse/kapua/app/api/web/RestApisApplication.java
+++ b/rest-api/web/src/main/java/org/eclipse/kapua/app/api/web/RestApisApplication.java
@@ -15,7 +15,6 @@
import org.eclipse.kapua.app.api.core.KapuaSerializableBodyWriter;
import org.eclipse.kapua.app.api.core.ListBodyWriter;
import org.eclipse.kapua.app.api.core.MoxyJsonConfigContextResolver;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
import org.eclipse.kapua.commons.rest.errors.ExceptionConfigurationProvider;
import org.eclipse.kapua.commons.util.xml.XmlUtil;
import org.eclipse.kapua.locator.KapuaLocator;
@@ -77,8 +76,6 @@ public void onStartup(Container container) {
RestApiJAXBContextProvider provider = serviceLocator.createAndInitialize(RestApiJAXBContextProvider.class);
XmlUtil.setContextProvider(provider);
final KapuaLocator kapuaLocator = KapuaLocator.getInstance();
- //TODO: Move to databaseUpdate
- kapuaLocator.getService(DataPopulatorRunner.class).runPopulators();
if (kapuaLocator instanceof GuiceLocatorImpl) {
GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
diff --git a/service/authentication-app/src/main/java/org/eclipse/kapua/service/authentication/AuthenticationApplication.java b/service/authentication-app/src/main/java/org/eclipse/kapua/service/authentication/AuthenticationApplication.java
index e7cfce2593f..62796431bed 100644
--- a/service/authentication-app/src/main/java/org/eclipse/kapua/service/authentication/AuthenticationApplication.java
+++ b/service/authentication-app/src/main/java/org/eclipse/kapua/service/authentication/AuthenticationApplication.java
@@ -16,8 +16,6 @@
import org.apache.shiro.env.BasicIniEnvironment;
import org.apache.shiro.env.Environment;
import org.apache.shiro.mgt.SecurityManager;
-import org.eclipse.kapua.commons.populators.DataPopulatorRunner;
-import org.eclipse.kapua.locator.KapuaLocator;
import org.eclipse.kapua.service.camel.setting.ServiceSettingKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +56,6 @@ public static void main(String[] args) {
System.setProperty(ServiceSettingKey.JAXB_CONTEXT_CLASS_NAME.key(), AuthenticationJAXBContextProvider.class.getName());
//org.springframework.context.ApplicationContext is not needed now so don't keep the SpringApplication.run return
SpringApplication.run(AuthenticationApplication.class, args);
- KapuaLocator.getInstance().getService(DataPopulatorRunner.class).runPopulators();
}
}
diff --git a/service/datastore/internal/src/main/java/org/eclipse/kapua/service/datastore/internal/DatastoreModule.java b/service/datastore/internal/src/main/java/org/eclipse/kapua/service/datastore/internal/DatastoreModule.java
index 17d61aaddb9..4c248f45e67 100644
--- a/service/datastore/internal/src/main/java/org/eclipse/kapua/service/datastore/internal/DatastoreModule.java
+++ b/service/datastore/internal/src/main/java/org/eclipse/kapua/service/datastore/internal/DatastoreModule.java
@@ -55,7 +55,6 @@
import javax.inject.Named;
import javax.inject.Singleton;
-import java.lang.reflect.Constructor;
public class DatastoreModule extends AbstractKapuaModule {
@Override
@@ -153,4 +152,4 @@ public boolean isServiceEnabled(TxContext txContext, KapuaId scopeId) {
}
});
}
-}
+}
\ No newline at end of file
diff --git a/service/device/registry/api/src/main/java/org/eclipse/kapua/service/device/registry/DeviceDomains.java b/service/device/registry/api/src/main/java/org/eclipse/kapua/service/device/registry/DeviceDomains.java
deleted file mode 100644
index 4974f0333f3..00000000000
--- a/service/device/registry/api/src/main/java/org/eclipse/kapua/service/device/registry/DeviceDomains.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2018, 2022 Eurotech and/or its affiliates and others
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Eurotech - initial API and implementation
- *******************************************************************************/
-package org.eclipse.kapua.service.device.registry;
-
-import org.eclipse.kapua.service.device.registry.connection.DeviceConnectionDomain;
-import org.eclipse.kapua.service.device.registry.event.DeviceEventDomain;
-
-public class DeviceDomains {
-
- private DeviceDomains() {
- }
-
- public static final DeviceDomain DEVICE_DOMAIN = new DeviceDomain();
-
- public static final DeviceConnectionDomain DEVICE_CONNECTION_DOMAIN = new DeviceConnectionDomain();
-
- public static final DeviceEventDomain DEVICE_EVENT_DOMAIN = new DeviceEventDomain();
-}
diff --git a/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerModule.java b/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerModule.java
index 3e4849f49eb..60399387804 100644
--- a/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerModule.java
+++ b/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerModule.java
@@ -12,14 +12,15 @@
*******************************************************************************/
package org.eclipse.kapua.service.device.connection.listener.internal;
-import javax.inject.Named;
-
+import com.google.inject.Module;
+import com.google.inject.multibindings.ProvidesIntoSet;
import org.eclipse.kapua.commons.core.AbstractKapuaModule;
import org.eclipse.kapua.commons.core.ServiceModule;
import org.eclipse.kapua.commons.event.ServiceEventHouseKeeperFactoryImpl;
import org.eclipse.kapua.commons.service.event.store.api.EventStoreFactory;
import org.eclipse.kapua.commons.service.event.store.api.EventStoreRecordRepository;
import org.eclipse.kapua.commons.service.event.store.internal.EventStoreServiceImpl;
+import org.eclipse.kapua.event.ServiceEventBus;
import org.eclipse.kapua.event.ServiceEventBusException;
import org.eclipse.kapua.service.authorization.AuthorizationService;
import org.eclipse.kapua.service.authorization.permission.PermissionFactory;
@@ -28,8 +29,7 @@
import org.eclipse.kapua.service.device.registry.KapuaDeviceRegistrySettings;
import org.eclipse.kapua.storage.TxManager;
-import com.google.inject.Module;
-import com.google.inject.multibindings.ProvidesIntoSet;
+import javax.inject.Named;
/**
* {@code kapua-account-internal} {@link Module} implementation.
@@ -45,14 +45,16 @@ protected void configureModule() {
@ProvidesIntoSet
protected ServiceModule deviceConnectionEventListenerServiceModule(DeviceConnectionEventListenerService deviceConnectionEventListenerService,
- AuthorizationService authorizationService,
- PermissionFactory permissionFactory,
- @Named("DeviceRegistryTransactionManager") TxManager txManager,
- EventStoreFactory eventStoreFactory,
- EventStoreRecordRepository eventStoreRecordRepository
+ AuthorizationService authorizationService,
+ PermissionFactory permissionFactory,
+ KapuaDeviceRegistrySettings kapuaDeviceRegistrySettings,
+ @Named("DeviceRegistryTransactionManager") TxManager txManager,
+ EventStoreFactory eventStoreFactory,
+ EventStoreRecordRepository eventStoreRecordRepository,
+ ServiceEventBus serviceEventBus
) throws ServiceEventBusException {
- String address = KapuaDeviceRegistrySettings.getInstance().getString(KapuaDeviceRegistrySettingKeys.DEVICE_EVENT_ADDRESS);
+ String address = kapuaDeviceRegistrySettings.getString(KapuaDeviceRegistrySettingKeys.DEVICE_EVENT_ADDRESS);
return new DeviceConnectionEventListenerServiceModule(
deviceConnectionEventListenerService,
address,
@@ -64,7 +66,9 @@ protected ServiceModule deviceConnectionEventListenerServiceModule(DeviceConnect
eventStoreFactory,
eventStoreRecordRepository
),
- txManager
- ));
+ txManager,
+ serviceEventBus
+ ),
+ serviceEventBus);
}
}
diff --git a/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerServiceModule.java b/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerServiceModule.java
index 4e219286846..a93ee2893f7 100644
--- a/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerServiceModule.java
+++ b/service/device/registry/internal/src/main/java/org/eclipse/kapua/service/device/connection/listener/internal/DeviceConnectionEventListenerServiceModule.java
@@ -17,14 +17,16 @@
import org.eclipse.kapua.commons.event.ServiceEventHouseKeeperFactory;
import org.eclipse.kapua.commons.event.ServiceEventTransactionalModule;
import org.eclipse.kapua.commons.event.ServiceInspector;
+import org.eclipse.kapua.event.ServiceEventBus;
import org.eclipse.kapua.service.device.connection.listener.DeviceConnectionEventListenerService;
public class DeviceConnectionEventListenerServiceModule extends ServiceEventTransactionalModule implements ServiceModule {
- public DeviceConnectionEventListenerServiceModule(DeviceConnectionEventListenerService deviceConnectionEventListenerService, String eventAddress, ServiceEventHouseKeeperFactory serviceEventTransactionalHousekeeperFactory) {
+ public DeviceConnectionEventListenerServiceModule(DeviceConnectionEventListenerService deviceConnectionEventListenerService, String eventAddress, ServiceEventHouseKeeperFactory serviceEventTransactionalHousekeeperFactory,
+ ServiceEventBus serviceEventBus) {
super(ServiceInspector.getEventBusClients(deviceConnectionEventListenerService, DeviceConnectionEventListenerService.class).toArray(new ServiceEventClientConfiguration[0]),
eventAddress,
- serviceEventTransactionalHousekeeperFactory);
+ serviceEventTransactionalHousekeeperFactory, serviceEventBus);
}
}