You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/08/28 16:59:31 UTC

git commit: fixing AIRAVATA-1418

Repository: airavata
Updated Branches:
  refs/heads/master e8e6949c8 -> 6821ce1ac


fixing AIRAVATA-1418


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

Branch: refs/heads/master
Commit: 6821ce1ac4722e7ef05f2e1f34c13c2878dcdb48
Parents: e8e6949
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Aug 28 10:59:24 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Aug 28 10:59:24 2014 -0400

----------------------------------------------------------------------
 .../catalog/data/model/Configuration.java       | 57 +++++++++++++++++
 .../catalog/data/model/Configuration_PK.java    | 65 ++++++++++++++++++++
 .../catalog/data/util/AppCatalogJPAUtils.java   |  3 +-
 .../src/main/resources/META-INF/persistence.xml |  1 +
 .../src/main/resources/appcatalog-derby.sql     | 11 ++++
 .../src/main/resources/appcatalog-mysql.sql     |  9 +++
 .../src/test/resources/appcatalog-derby.sql     | 11 ++++
 .../main/resources/airavata-server.properties   |  2 +-
 .../main/resources/airavata-server.properties   |  2 +-
 9 files changed, 158 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration.java
new file mode 100644
index 0000000..5bee8bf
--- /dev/null
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration.java
@@ -0,0 +1,57 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.aiaravata.application.catalog.data.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name ="CONFIGURATION")
+@IdClass(Configuration_PK.class)
+public class Configuration implements Serializable {
+    @Id
+    @Column(name = "CONFIG_KEY")
+    private String config_key;
+
+    @Id
+    @Column(name = "CONFIG_VAL")
+    private String config_val;
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration_PK.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration_PK.java
new file mode 100644
index 0000000..f9cfbab
--- /dev/null
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/Configuration_PK.java
@@ -0,0 +1,65 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.aiaravata.application.catalog.data.model;
+
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
+    private String config_key;
+    private String config_val;
+
+    public Configuration_PK(String config_key, String config_val) {
+        this.config_key = config_key;
+        this.config_val = config_val;
+    }
+
+    public Configuration_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index b8774da..c4420f8 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -51,7 +51,8 @@ public class AppCatalogJPAUtils {
             String connectionProperties = "DriverClassName=" + readServerProperties(APPCATALOG_JDBC_DRIVER) + "," +
                     "Url=" + readServerProperties(APPCATALOG_JDBC_URL) + "?autoReconnect=true," +
                     "Username=" + readServerProperties(APPCATALOG_JDBC_USER) + "," +
-                    "Password=" + readServerProperties(APPCATALOG_JDBC_PWD);
+                    "Password=" + readServerProperties(APPCATALOG_JDBC_PWD) +
+                    ",validationQuery=" + readServerProperties(APPCATALOG_VALIDATION_QUERY);
             System.out.println(connectionProperties);
             Map<String, String> properties = new HashMap<String, String>();
             properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
index 0f9bb72..b0d5a1a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
@@ -57,6 +57,7 @@
         <class>org.apache.aiaravata.application.catalog.data.model.LocalSubmission</class>
         <class>org.apache.aiaravata.application.catalog.data.model.LocalDataMovement</class>
         <class>org.apache.aiaravata.application.catalog.data.model.Workflow</class>
+        <class>org.apache.aiaravata.application.catalog.data.model.Configuration</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 238a823..9129559 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -383,3 +383,14 @@ CREATE TABLE WORKFLOW
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.14');
+
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index 5b09829..f00fb3b 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -371,3 +371,12 @@ CREATE TABLE WORKFLOW
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.14');
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
index 238a823..9129559 100644
--- a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
@@ -383,3 +383,14 @@ CREATE TABLE WORKFLOW
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.14');
+
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 44d25c0..10c0a51 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -84,7 +84,7 @@ appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=air
 #appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
 appcatalog.jdbc.user=airavata
 appcatalog.jdbc.password=airavata
-appcatalog.validationQuery=SELECT 1 from COMPUTE_RESOURCE
+appcatalog.validationQuery=SELECT 1 from CONFIGURATION
 
 #user defined registry accessor classes
 #class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry

http://git-wip-us.apache.org/repos/asf/airavata/blob/6821ce1a/modules/credential-store-service/credential-store-webapp/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/credential-store-service/credential-store-webapp/src/main/resources/airavata-server.properties b/modules/credential-store-service/credential-store-webapp/src/main/resources/airavata-server.properties
index 1e64c99..91a8ae6 100644
--- a/modules/credential-store-service/credential-store-webapp/src/main/resources/airavata-server.properties
+++ b/modules/credential-store-service/credential-store-webapp/src/main/resources/airavata-server.properties
@@ -84,7 +84,7 @@ appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=air
 #appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
 appcatalog.jdbc.user=airavata
 appcatalog.jdbc.password=airavata
-appcatalog.validationQuery=SELECT 1 from COMPUTE_RESOURCE
+appcatalog.validationQuery=SELECT 1 from CONFIGURATION
 
 #user defined registry accessor classes
 #class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry