airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [03/50] [abbrv] airavata git commit: Move db-event handlers before registry server start
Date Wed, 05 Apr 2017 19:10:27 GMT
Move db-event handlers before registry server start


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/06ec5552
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/06ec5552
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/06ec5552

Branch: refs/heads/develop
Commit: 06ec5552e23e05909225fabce469e31dcd8d4325
Parents: d581d4e
Author: Gourav Shenoy <shenoy.200@gmail.com>
Authored: Fri Mar 31 14:18:58 2017 -0400
Committer: Gourav Shenoy <shenoy.200@gmail.com>
Committed: Fri Mar 31 14:18:58 2017 -0400

----------------------------------------------------------------------
 .../profile/client/samples/TenantProfileSample.java   |  3 ++-
 .../registry/api/service/RegistryAPIServer.java       | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/06ec5552/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
index d200587..66c6e56 100644
--- a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
+++ b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
@@ -27,7 +27,8 @@ public class TenantProfileSample {
 
             // test addGateway
             testGatewayId = tenantProfileClient.addGateway(getGateway(null));
-
+            assert (testGatewayId != null) : "Gateway creation failed!";
+            System.out.println("Gateway created with gatewayId: " + testGatewayId);
 
 
         } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ec5552/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/RegistryAPIServer.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/RegistryAPIServer.java
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/RegistryAPIServer.java
index a47fc0d..69cd7cd 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/RegistryAPIServer.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/RegistryAPIServer.java
@@ -72,6 +72,14 @@ public class RegistryAPIServer implements IServer {
                 serverTransport = new TServerSocket(inetSocketAddress);
             }
 
+            // db-event handlers
+            logger.info("Registring registry service with publishers for db-events.");
+            RegistryServiceDBEventMessagingFactory.registerRegistryServiceWithPublishers(Constants.DB_EVENT_SUBSCRIBERS);
+
+            logger.info("Starting registry service db-event-handler subscriber.");
+            RegistryServiceDBEventMessagingFactory.getDBEventSubscriber();
+
+            // thrift server start
             TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
             options.minWorkerThreads = Integer.parseInt(ServerSettings.getSetting(Constants.REGISTRY_SERVER_MIN_THREADS,
"30"));
             server = new TThreadPoolServer(options.processor(orchestratorServerHandlerProcessor));
@@ -97,12 +105,6 @@ public class RegistryAPIServer implements IServer {
                     }
                 }
             }.start();
-
-            logger.info("Registring registry service with publishers for db-events.");
-            RegistryServiceDBEventMessagingFactory.registerRegistryServiceWithPublishers(Constants.DB_EVENT_SUBSCRIBERS);
-
-            logger.info("Starting registry service db-event-handler subscriber.");
-            RegistryServiceDBEventMessagingFactory.getDBEventSubscriber();
         } catch (TTransportException e) {
             logger.error(e.getMessage());
             setStatus(ServerStatus.FAILED);


Mime
View raw message