airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1399725 - in /airavata/trunk/modules: distribution/src/main/resources/bin/ ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/ ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/
Date Thu, 18 Oct 2012 16:27:23 GMT
Author: chathuri
Date: Thu Oct 18 16:27:21 2012
New Revision: 1399725

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

Removed:
    airavata/trunk/modules/distribution/src/main/resources/bin/derby.sh
    airavata/trunk/modules/distribution/src/main/resources/bin/startNetworkServer
Modified:
    airavata/trunk/modules/ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/JdbcStorage.java
    airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java

Modified: airavata/trunk/modules/ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/JdbcStorage.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/JdbcStorage.java?rev=1399725&r1=1399724&r2=1399725&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/JdbcStorage.java
(original)
+++ airavata/trunk/modules/ws-messenger/commons/src/main/java/org/apache/airavata/wsmg/commons/storage/JdbcStorage.java
Thu Oct 18 16:27:21 2012
@@ -123,6 +123,21 @@ public class JdbcStorage {
         return rows;
     }
 
+    public int executeUpdateAndCloseWithPrintLogMessages(PreparedStatement stmt, boolean
printLogs) throws SQLException {
+        int rows = 0;
+        try {
+            rows = stmt.executeUpdate();
+            if (rows == 0) {
+                if(printLogs){
+                    log.info("Problem: 0 rows affected by insert/update/delete statement.");
+                }
+            }
+        } finally {
+            stmt.close();
+        }
+        return rows;
+    }
+
     public int countRow(String tableName, String columnName) throws SQLException {
         String query = new String("SELECT COUNT(" + columnName + ") FROM " + tableName);
         int count = -1;

Modified: airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java?rev=1399725&r1=1399724&r2=1399725&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
(original)
+++ airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
Thu Oct 18 16:27:21 2012
@@ -52,6 +52,8 @@ public class MessageBoxDB {
     private static final String MSGBOXES_TABLENAME = "msgBoxes";
     private static final String    MSGBOX_TABLENAME = "msgbox";
 
+    private static final String    MSGBOX_TABLE_ID = "MSGBOXID";
+
     private static final Logger logger = LoggerFactory.getLogger(MessageBoxDB.class);
 
     private static Set<String> msgBoxids;
@@ -232,7 +234,7 @@ public class MessageBoxDB {
             connection = db.connect();
             PreparedStatement stmt = connection.prepareStatement(SQL_DELETE_ANCIENT_STATEMENT);
             stmt.setLong(1, this.time);
-            db.executeUpdateAndClose(stmt);
+            db.executeUpdateAndCloseWithPrintLogMessages(stmt, false);
             db.commitAndFree(connection);
         } catch (SQLException sql) {
             db.rollbackAndFree(connection);



Mime
View raw message