Workarounds to startup DatabaseService

- shaded copycat
- switched Chronicle log to InMemory log until we fix the OSGi issue

Change-Id: Icf8ee8c18b518a8ee785924413681bdb61fc5037
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocol.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocol.java
index 6de66bc..c561221 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocol.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocol.java
@@ -64,7 +64,8 @@
  */
 @Component(immediate = true)
 @Service
-public class ClusterMessagingProtocol implements Protocol<TcpMember> {
+public class ClusterMessagingProtocol
+    implements DatabaseProtocolService, Protocol<TcpMember> {
 
     private final Logger log = getLogger(getClass());
 
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
index 7db4bc7..183a6db 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
@@ -11,9 +11,8 @@
 import net.kuujo.copycat.cluster.TcpCluster;
 import net.kuujo.copycat.cluster.TcpClusterConfig;
 import net.kuujo.copycat.cluster.TcpMember;
-import net.kuujo.copycat.log.ChronicleLog;
+import net.kuujo.copycat.log.InMemoryLog;
 import net.kuujo.copycat.log.Log;
-
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
@@ -52,7 +51,7 @@
     protected ClusterService clusterService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected ClusterMessagingProtocol copycatMessagingProtocol;
+    protected DatabaseProtocolService copycatMessagingProtocol;
 
     public static final String LOG_FILE_PREFIX = "onos-copy-cat-log";
 
@@ -61,6 +60,7 @@
 
     @Activate
     public void activate() {
+        log.info("Starting.");
 
         // TODO: Not every node can be part of the consensus ring.
 
@@ -88,7 +88,9 @@
 
         StateMachine stateMachine = new DatabaseStateMachine();
         ControllerNode thisNode = clusterService.getLocalNode();
-        Log consensusLog = new ChronicleLog(LOG_FILE_PREFIX + "_" + thisNode.id());
+        // FIXME resolve Chronicle + OSGi issue
+        //Log consensusLog = new ChronicleLog(LOG_FILE_PREFIX + "_" + thisNode.id());
+        Log consensusLog = new InMemoryLog();
 
         copycat = new Copycat(stateMachine, consensusLog, cluster, copycatMessagingProtocol);
         copycat.start();
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseProtocolService.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseProtocolService.java
new file mode 100644
index 0000000..6d9f129
--- /dev/null
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseProtocolService.java
@@ -0,0 +1,10 @@
+package org.onlab.onos.store.service.impl;
+
+import net.kuujo.copycat.cluster.TcpMember;
+import net.kuujo.copycat.spi.protocol.Protocol;
+
+// interface required for connecting DatabaseManager + ClusterMessagingProtocol
+// TODO: Consider changing ClusterMessagingProtocol to non-Service class
+public interface DatabaseProtocolService extends Protocol<TcpMember> {
+
+}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/package-info.java
index d630870..5f65452 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/package-info.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/package-info.java
@@ -1,4 +1,21 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Distributed core state management services.
  */
-package org.onlab.onos.store.service;
\ No newline at end of file
+package org.onlab.onos.store.service;
+