airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1432270 - in /airavata/trunk/modules: registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ xbaya-gui...
Date Fri, 11 Jan 2013 20:29:31 GMT
Author: chathuri
Date: Fri Jan 11 20:29:30 2013
New Revision: 1432270

URL: http://svn.apache.org/viewvc?rev=1432270&view=rev
Log:
fixing AIRAVATA-680

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java?rev=1432270&r1=1432269&r2=1432270&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
Fri Jan 11 20:29:30 2013
@@ -287,9 +287,8 @@ public class ResourceUtils {
     public static boolean isConfigurationExists(String configKey, String configVal){
         try{
             //Currently categoryID is hardcoded value
-            String categoryID = "SYSTEM";
             EntityManager em = ResourceUtils.getEntityManager();
-            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey,
configVal, categoryID));
+            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey,
configVal, AbstractResource.ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE));
             em.close();
             return existing!= null;
         } catch (Exception e){

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java?rev=1432270&r1=1432269&r2=1432270&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
Fri Jan 11 20:29:30 2013
@@ -55,6 +55,8 @@ public abstract class AbstractResource i
         public static final String CONFIG_KEY = "config_key";
         public static final String CONFIG_VAL = "config_val";
         public static final String EXPIRE_DATE = "expire_date";
+        public static final String CATEGORY_ID = "category_id";
+        public static final String CATEGORY_ID_DEFAULT_VALUE = "SYSTEM";
     }
 
 

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java?rev=1432270&r1=1432269&r2=1432270&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
Fri Jan 11 20:29:30 2013
@@ -42,7 +42,7 @@ public class ConfigurationResource exten
     private String configKey;
     private String configVal;
     private Timestamp expireDate;
-    private String categoryID = "SYSTEM";
+    private String categoryID = ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE;
 
     public ConfigurationResource() {
     }

Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java?rev=1432270&r1=1432269&r2=1432270&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
(original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
Fri Jan 11 20:29:30 2013
@@ -107,7 +107,11 @@ public class ComponentRegistryLoader imp
     /**
      * @param registry
      */
-    private void runInThread(ComponentRegistry registry) {
+    /**
+     * TODO : this method triggered twice when connecting to the registy. We need to find
+     *  why it is happening
+     */
+    private synchronized void runInThread(ComponentRegistry registry) {
         try {
         	if (getComponentTreeNodesMap().containsKey(registry.getName())){
         		this.getEngine().getGUI().getComponentSelector().removeComponentTree(getComponentTreeNodesMap().get(registry.getName()));



Mime
View raw message