airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1378660 - in /incubator/airavata/trunk/modules/ws-messenger: messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/ messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/
Date Wed, 29 Aug 2012 17:50:29 GMT
Author: lahiru
Date: Wed Aug 29 17:50:29 2012
New Revision: 1378660

URL: http://svn.apache.org/viewvc?rev=1378660&view=rev
Log:
Applying patches given by Chathuri Wimalasena for issues AIRAVATA-544 and AIRAVATA-545.

Modified:
    incubator/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
    incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/WsmgPersistantStorage.java

Modified: incubator/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java?rev=1378660&r1=1378659&r2=1378660&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
(original)
+++ incubator/airavata/trunk/modules/ws-messenger/messagebox/src/main/java/org/apache/airavata/wsmg/msgbox/Storage/dbpool/MessageBoxDB.java
Wed Aug 29 17:50:29 2012
@@ -73,7 +73,7 @@ public class MessageBoxDB {
     public static final String SQL_DELETE_MSGBOX_STATEMENT = "DELETE FROM " + MSGBOX_TABLENAME
+ " WHERE msgboxid = ?";
 
     public static final String SQL_DELETE_ANCIENT_STATEMENT = "DELETE FROM " + MSGBOX_TABLENAME
-            + " WHERE {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND, time, CURRENT_TIMESTAMP) } >
?";
+            + " WHERE {fn TIMESTAMPDIFF(SQL_TSI_SECOND, time, CURRENT_TIMESTAMP) }*1000000
> ?";
 
     private JdbcStorage db;
 

Modified: incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/WsmgPersistantStorage.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/WsmgPersistantStorage.java?rev=1378660&r1=1378659&r2=1378660&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/WsmgPersistantStorage.java
(original)
+++ incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/commons/storage/WsmgPersistantStorage.java
Wed Aug 29 17:50:29 2012
@@ -325,6 +325,21 @@ public class WsmgPersistantStorage imple
             } else {
                 throw new RuntimeException("MAX_ID Table is not init, redeploy the service
!!!");
             }
+            
+            /**
+             * Before executing the SQL_INSERT_STATEMENT query, we need to unlock 
+             * MaxIDTable and MinIDTable since we are going to insert data to another 
+             * table, disQ. If we do not unlock tables, insert query fails in MySQL. But

+             * in Derby, this will execute without any issues even without unlocking 
+             * tables. Since it fails with MySQL, we need to unlock the tables 
+             * before executing the insert query.
+             */
+            try{
+            	 unLockTables(connection);
+            }catch (SQLException sql) {
+                logger.error("Cannot Unlock Table", sql);
+            }
+           
 
             /*
              * After update MAX_ID put data into queue table



Mime
View raw message