airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [28/50] [abbrv] airavata git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata into develop
Date Fri, 26 Aug 2016 15:43:23 GMT
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata into develop


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

Branch: refs/heads/lahiru/AIRAVATA-2057
Commit: 18ea6c24f9c42bc3e32c0853ac63d36243cbfe4c
Parents: 3f29cfd c6a82a0
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Mon Aug 15 16:39:56 2016 -0400
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Tue Aug 16 14:21:16 2016 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/impl/Factory.java  |  14 +-
 .../airavata/gfac/server/GfacServerHandler.java |   5 +-
 .../airavata/registry/core/Committer.java       |  29 ----
 .../apache/airavata/registry/core/JPAUtil.java  |  57 -------
 .../catalog/resources/ExperimentResource.java   | 148 +++++++++++++------
 5 files changed, 113 insertions(+), 140 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/18ea6c24/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
index 673f37b,673f37b..6ed6de3
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
@@@ -63,6 -63,6 +63,7 @@@ import org.apache.airavata.gfac.impl.ta
  import org.apache.airavata.gfac.impl.watcher.CancelRequestWatcherImpl;
  import org.apache.airavata.gfac.impl.watcher.RedeliveryRequestWatcherImpl;
  import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
++import org.apache.airavata.messaging.core.MessageHandler;
  import org.apache.airavata.messaging.core.MessagingFactory;
  import org.apache.airavata.messaging.core.Publisher;
  import org.apache.airavata.messaging.core.Subscriber;
@@@ -91,6 -91,6 +92,7 @@@ import org.slf4j.LoggerFactory
  import java.lang.reflect.Constructor;
  import java.util.ArrayList;
  import java.util.HashMap;
++import java.util.List;
  import java.util.Map;
  import java.util.UUID;
  
@@@ -168,10 -168,10 +170,16 @@@ public abstract class Factory 
  		return curatorClient;
  	}
  
++	public static synchronized void initPrcessLaunchSubscriber(MessageHandler processMessageHandler)
throws AiravataException {
++	    if(getProcessLaunchSubscriber() != null)
++			throw new AiravataException("Process launch Subscriber is already initialized");
++
++		List<String> routingKeys = new ArrayList<>();
++		routingKeys.add(ServerSettings.getRabbitmqProcessExchangeName());
++		 processLaunchSubscriber = MessagingFactory.getSubscriber(processMessageHandler, routingKeys,
Type.PROCESS_LAUNCH);
++	}
++
  	public static synchronized  Subscriber getProcessLaunchSubscriber() throws AiravataException
{
--		if (processLaunchSubscriber == null) {
--			processLaunchSubscriber = MessagingFactory.getSubscriber(message -> {}, new ArrayList<>(),
Type.PROCESS_LAUNCH);
--		}
  		return processLaunchSubscriber;
  	}
  

http://git-wip-us.apache.org/repos/asf/airavata/blob/18ea6c24/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index a7b0714,a7b0714..fd4acf4
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@@ -96,9 -96,9 +96,8 @@@ public class GfacServerHandler implemen
  
      private void initAMQPClient() throws AiravataException {
  	    // init process consumer
--        List<String> routingKeys = new ArrayList<>();
--        routingKeys.add(ServerSettings.getRabbitmqProcessExchangeName());
--        processLaunchSubscriber = MessagingFactory.getSubscriber(new ProcessLaunchMessageHandler(),routingKeys,
Type.PROCESS_LAUNCH);
++        Factory.initPrcessLaunchSubscriber(new ProcessLaunchMessageHandler());
++        processLaunchSubscriber = Factory.getProcessLaunchSubscriber();
          // init status publisher
  	    statusPublisher = Factory.getStatusPublisher();
      }


Mime
View raw message