Fixing remote install; now starting as upstart daemon.
diff --git a/core/store/src/main/java/org/onlab/onos/store/StoreService.java b/core/store/src/main/java/org/onlab/onos/store/StoreService.java
new file mode 100644
index 0000000..a672f54
--- /dev/null
+++ b/core/store/src/main/java/org/onlab/onos/store/StoreService.java
@@ -0,0 +1,18 @@
+package org.onlab.onos.store;
+
+import com.hazelcast.core.HazelcastInstance;
+
+/**
+ * Bootstrap service to get a handle on a share Hazelcast instance.
+ */
+public interface StoreService {
+
+ /**
+ * Returns the shared Hazelcast instance for use as a distributed store
+ * backing.
+ *
+ * @return shared Hazelcast instance
+ */
+ HazelcastInstance getHazelcastInstance();
+
+}
diff --git a/core/store/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java b/core/store/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
index 5f81aef..b8c1cdf 100644
--- a/core/store/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
+++ b/core/store/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
@@ -40,6 +40,7 @@
import org.onlab.onos.net.device.DeviceStore;
import org.onlab.onos.net.device.PortDescription;
import org.onlab.onos.net.provider.ProviderId;
+import org.onlab.onos.store.StoreService;
import org.onlab.util.KryoPool;
import org.slf4j.Logger;
@@ -187,12 +188,15 @@
// FIXME change to protected once we remove DistributedDeviceManagerTest.
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected StoreService storeService;
+
/*protected*/public HazelcastInstance theInstance;
@Activate
public void activate() {
log.info("Started");
+ theInstance = storeService.getHazelcastInstance();
// IMap event handler needs value
final boolean includeValue = true;
diff --git a/core/store/src/main/java/org/onlab/onos/store/impl/StoreManager.java b/core/store/src/main/java/org/onlab/onos/store/impl/StoreManager.java
new file mode 100644
index 0000000..d7f09f8
--- /dev/null
+++ b/core/store/src/main/java/org/onlab/onos/store/impl/StoreManager.java
@@ -0,0 +1,39 @@
+package org.onlab.onos.store.impl;
+
+import com.hazelcast.core.Hazelcast;
+import com.hazelcast.core.HazelcastInstance;
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
+import org.onlab.onos.store.StoreService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Auxiliary bootstrap of distributed store.
+ */
+@Component(immediate = true)
+@Service
+public class StoreManager implements StoreService {
+
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private HazelcastInstance instance;
+
+ @Activate
+ public void activate() {
+ instance = Hazelcast.newHazelcastInstance();
+ log.info("Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ log.info("Stopped");
+ }
+
+ @Override
+ public HazelcastInstance getHazelcastInstance() {
+ return instance;
+ }
+}
diff --git a/features/features.xml b/features/features.xml
index 9fb78d3..c9c72a90 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -10,9 +10,13 @@
<bundle>mvn:com.google.guava/guava/18.0</bundle>
<bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
+ <bundle>mvn:com.hazelcast/hazelcast/3.3</bundle>
+ <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle>
+
<bundle>mvn:com.esotericsoftware.kryo/kryo/2.24.0</bundle>
<bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle>
<bundle>mvn:org.objenesis/objenesis/2.1</bundle>
+ <bundle>mvn:de.javakaffee/kryo-serializers/0.27</bundle>
</feature>
<feature name="onos-thirdparty-web" version="1.0.0"
@@ -42,6 +46,13 @@
description="ONOS core components">
<feature>onos-api</feature>
<bundle>mvn:org.onlab.onos/onos-core-net/1.0.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.onlab.onos/onos-core-store/1.0.0-SNAPSHOT</bundle>
+ </feature>
+
+ <feature name="onos-core-trivial" version="1.0.0"
+ description="ONOS core components">
+ <feature>onos-api</feature>
+ <bundle>mvn:org.onlab.onos/onos-core-net/1.0.0-SNAPSHOT</bundle>
<bundle>mvn:org.onlab.onos/onos-core-trivial/1.0.0-SNAPSHOT</bundle>
</feature>
diff --git a/pom.xml b/pom.xml
index 0d57c3f..0e51910 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,6 +139,11 @@
<version>3.3</version>
</dependency>
<dependency>
+ <groupId>com.eclipsesource.minimal-json</groupId>
+ <artifactId>minimal-json</artifactId>
+ <version>0.9.1</version>
+ </dependency>
+ <dependency>
<groupId>com.esotericsoftware.kryo</groupId>
<artifactId>kryo</artifactId>
<version>2.24.0</version>
diff --git a/utils/misc/pom.xml b/utils/misc/pom.xml
index f49f0fa..899edcf 100644
--- a/utils/misc/pom.xml
+++ b/utils/misc/pom.xml
@@ -35,6 +35,11 @@
<artifactId>commons-lang3</artifactId>
</dependency>
+ <!-- TODO: do we still need this here? -->
+ <dependency>
+ <groupId>com.eclipsesource.minimal-json</groupId>
+ <artifactId>minimal-json</artifactId>
+ </dependency>
<dependency>
<groupId>com.esotericsoftware.kryo</groupId>
<artifactId>kryo</artifactId>