<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-eos-common-api</artifactId>
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions combine.children="append">
+ <Bundle-Activator>org.opendaylight.mdsal.eos.dom.simple.Activator</Bundle-Activator>
+ </instructions>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.eos.dom.simple;
+
+import com.google.common.annotations.Beta;
+import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+@Beta
+public class Activator implements BundleActivator {
+ private ServiceRegistration<?> reg;
+
+ @Override
+ public void start(final BundleContext context) {
+ reg = context.registerService(DOMEntityOwnershipService.class, new SimpleDOMEntityOwnershipService(), null);
+ }
+
+ @Override
+ public void stop(final BundleContext context) {
+ if (reg != null) {
+ reg.unregister();
+ reg = null;
+ }
+ }
+}