Loosen Kryo config only for DistributedIntentStore

Change-Id: Ie3f05e2d894b0d44f7c0ad645b77c65d1f2ce02b
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java
index 366ae3e..8c18fb0 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java
@@ -30,6 +30,9 @@
 import org.onlab.onos.net.intent.IntentStoreDelegate;
 import org.onlab.onos.store.hz.AbstractHazelcastStore;
 import org.onlab.onos.store.hz.SMap;
+import org.onlab.onos.store.serializers.KryoNamespaces;
+import org.onlab.onos.store.serializers.KryoSerializer;
+import org.onlab.util.KryoNamespace;
 import org.slf4j.Logger;
 
 import java.util.List;
@@ -61,9 +64,21 @@
     @Activate
     public void activate() {
         // FIXME: We need a way to add serializer for intents which has been plugged-in.
-        // TODO: As a short term workaround, relax Kryo config to
-        //       registrationRequired=false?
+        // As a short term workaround, relax Kryo config to
+        // registrationRequired=false
         super.activate();
+        super.serializer = new KryoSerializer() {
+
+            @Override
+            protected void setupKryoPool() {
+                serializerPool = KryoNamespace.newBuilder()
+                        .setRegistrationRequired(false)
+                        .register(KryoNamespaces.API)
+                        .build()
+                        .populate(1);
+            }
+
+        };
 
         // TODO: enable near cache, allow read from backup for this IMap
         IMap<byte[], byte[]> rawIntents = super.theInstance.getMap("intents");