You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/03/12 06:28:42 UTC

git commit: Adding more changes to do proper threading - AIRAVATA-1072

Repository: airavata
Updated Branches:
  refs/heads/master 6d1797d2c -> b32cb524c


Adding more changes to do proper threading - AIRAVATA-1072


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

Branch: refs/heads/master
Commit: b32cb524c7160e6736aaa59f14f8574a3a22174e
Parents: 6d1797d
Author: lahiru <la...@apache.org>
Authored: Wed Mar 12 01:28:23 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Wed Mar 12 01:28:23 2014 -0400

----------------------------------------------------------------------
 .../airavata/job/monitor/impl/push/amqp/UnRegisterThread.java   | 3 ++-
 .../airavata-server/src/main/resources/conf/log4j.properties    | 4 ++--
 .../persistance/registry/jpa/impl/AiravataJPARegistry.java      | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b32cb524/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/push/amqp/UnRegisterThread.java
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/push/amqp/UnRegisterThread.java b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/push/amqp/UnRegisterThread.java
index 3b118c0..528b9f6 100644
--- a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/push/amqp/UnRegisterThread.java
+++ b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/push/amqp/UnRegisterThread.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.job.monitor.impl.push.amqp;
 
 import com.rabbitmq.client.Channel;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.job.monitor.MonitorID;
 import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.job.monitor.util.CommonUtils;
@@ -42,7 +43,7 @@ public class UnRegisterThread extends Thread {
     }
 
     public void run() {
-        while (true) {
+        while (!ServerSettings.isStopAllThreads()) {
             try {
                 MonitorID monitorID = this.finishQueue.take();
                 unRegisterListener(monitorID);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b32cb524/modules/distribution/airavata-server/src/main/resources/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/modules/distribution/airavata-server/src/main/resources/conf/log4j.properties b/modules/distribution/airavata-server/src/main/resources/conf/log4j.properties
index ee40d6f..79adab6 100644
--- a/modules/distribution/airavata-server/src/main/resources/conf/log4j.properties
+++ b/modules/distribution/airavata-server/src/main/resources/conf/log4j.properties
@@ -19,7 +19,7 @@
 
 # Set root category priority to INFO and its only appender to CONSOLE.
 log4j.rootCategory=INFO, CONSOLE,LOGFILE
-log4j.rootLogger=INFO, CONSOLE, LOGFILE
+log4j.rootLogger=DEBUG,INFO, CONSOLE, LOGFILE
 
 # Set the enterprise logger priority to FATAL
 log4j.logger.org.apache.axis2.enterprise=FATAL
@@ -34,7 +34,7 @@ log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
 
 # LOGFILE is set to be a File appender using a PatternLayout.
 log4j.appender.LOGFILE=org.apache.log4j.FileAppender
-log4j.appender.LOGFILE.File=../../bin/axis2.log
+log4j.appender.LOGFILE.File=airavata.log
 log4j.appender.LOGFILE.Append=true
 log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/airavata/blob/b32cb524/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
index 83fbff8..086d996 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
@@ -24,6 +24,7 @@ import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataJobState;
 import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.Version;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
@@ -101,9 +102,9 @@ public class AiravataJPARegistry extends AiravataRegistry2{
     	
         initializeCustomRegistries();
         String apiVersion = getVersion().toString();
-        String registryVersion;
+        String registryVersion = null;
         int tries=0;
-        while(true){
+        while(!ServerSettings.isStopAllThreads()){
 			try {
 				tries++;
 				registryVersion = getConfiguration("registry.version").toString();