removed synchronized block in Orchestrator Server handler

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

Branch: refs/heads/master
Commit: be6aecdaf1bdec6c0bbea9beb5d006a1f1d175db
Parents: 2b45c6d
Author: shamrath <[email protected]>
Authored: Fri Mar 20 12:58:08 2015 -0400
Committer: shamrath <[email protected]>
Committed: Fri Mar 20 12:58:08 2015 -0400

----------------------------------------------------------------------
 .../server/OrchestratorServerHandler.java       | 25 +++++++++-----------
 1 file changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/be6aecda/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git 
a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
 
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 4209bb9..a0e25d7 100644
--- 
a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ 
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -249,24 +249,21 @@ public class OrchestratorServerHandler implements 
OrchestratorService.Iface,
                 throw new AiravataException("Couldn't identify the gateway Id 
using the credential token");
             }
             ExecutionType executionType = 
DataModelUtils.getExecutionType(gatewayId, experiment);
-            synchronized (this) {
-               if (executionType==ExecutionType.SINGLE_APP) {
-                  //its an single application execution experiment
-                  log.debugId(experimentId, "Launching single application 
experiment {}.", experimentId);
-                  
OrchestratorServerThreadPoolExecutor.getFixedThreadPool().execute(new 
SingleAppExperimentRunner(experimentId, token));
-            } 
-               else if (executionType == ExecutionType.WORKFLOW){
-                                       //its a workflow execution experiment
-                  log.debugId(experimentId, "Launching workflow experiment 
{}.", experimentId);
-                                 launchWorkflowExperiment(experimentId, token);
+            if (executionType == ExecutionType.SINGLE_APP) {
+                //its an single application execution experiment
+                log.debugId(experimentId, "Launching single application 
experiment {}.", experimentId);
+                
OrchestratorServerThreadPoolExecutor.getFixedThreadPool().execute(new 
SingleAppExperimentRunner(experimentId, token));
+            } else if (executionType == ExecutionType.WORKFLOW) {
+                //its a workflow execution experiment
+                log.debugId(experimentId, "Launching workflow experiment {}.", 
experimentId);
+                launchWorkflowExperiment(experimentId, token);
             } else {
                 log.errorId(experimentId, "Couldn't identify experiment type, 
experiment {} is neither single application nor workflow.", experimentId);
                 throw new TException("Experiment '" + experimentId + "' launch 
failed. Unable to figureout execution type for application " + 
experiment.getApplicationId());
             }
-          }
-         }catch(Exception e){
-             throw new TException("Experiment '" + experimentId + "' launch 
failed. Unable to figureout execution type for application " + 
experiment.getApplicationId());
-         }
+        } catch (Exception e) {
+            throw new TException("Experiment '" + experimentId + "' launch 
failed. Unable to figureout execution type for application " + 
experiment.getApplicationId());
+        }
         return true;
        }
 

Reply via email to