From 95434d8a581813f6b6813a8ea5cc34261300a3ca Mon Sep 17 00:00:00 2001 From: J-N-K Date: Wed, 27 Mar 2024 21:03:09 +0100 Subject: [PATCH] [mongodb] Fix missing service pid (#16568) Signed-off-by: Jan N. Klug --- .../mongodb/internal/MongoDBPersistenceService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.persistence.mongodb/src/main/java/org/openhab/persistence/mongodb/internal/MongoDBPersistenceService.java b/bundles/org.openhab.persistence.mongodb/src/main/java/org/openhab/persistence/mongodb/internal/MongoDBPersistenceService.java index 3ad12dbe61b..3f163da514b 100644 --- a/bundles/org.openhab.persistence.mongodb/src/main/java/org/openhab/persistence/mongodb/internal/MongoDBPersistenceService.java +++ b/bundles/org.openhab.persistence.mongodb/src/main/java/org/openhab/persistence/mongodb/internal/MongoDBPersistenceService.java @@ -42,6 +42,7 @@ import org.openhab.core.persistence.strategy.PersistenceStrategy; import org.openhab.core.types.State; import org.openhab.core.types.UnDefType; import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.ConfigurationPolicy; @@ -65,7 +66,8 @@ import com.mongodb.client.result.DeleteResult; */ @NonNullByDefault @Component(service = { PersistenceService.class, QueryablePersistenceService.class, - ModifiablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE) + ModifiablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE, property = Constants.SERVICE_PID + + "=org.openhab.mongodb") public class MongoDBPersistenceService implements ModifiablePersistenceService { private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class);