Register sharing service with listed publishers
@@ -22,7 +22,9 @@ package org.apache.airavata.sharing.registry.server;
import org.apache.airavata.common.utils.IServer;
import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.sharing.registry.messaging.SharingServiceDBEventPublisher;
import org.apache.airavata.sharing.registry.service.cpi.SharingRegistryService;
+import org.apache.airavata.sharing.registry.utils.Constants;
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TThreadPoolServer;
import org.apache.thrift.transport.TServerSocket;
@@ -63,6 +65,9 @@ public class SharingRegistryServer implements IServer {
public void start() throws Exception {
try {
setStatus(IServer.ServerStatus.STARTING);
+
+ SharingServiceDBEventPublisher.registerSharingServiceWithPublishers(Constants.PUBLISHERS);
+
final int serverPort = Integer.parseInt(ServerSettings.getSetting(SHARING_REG_SERVER_PORT));
final String serverHost = ServerSettings.getSetting(SHARING_REG_SERVER_HOST);
SharingRegistryService.Processor processor = new SharingRegistryService.Processor(new SharingRegistryServerHandler());
