/[projects]/dao/DaoMqPump2/DaoMqPump2/Transport.cs
ViewVC logotype

Diff of /dao/DaoMqPump2/DaoMqPump2/Transport.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2051 by torben, Fri Aug 23 20:03:47 2013 UTC revision 2056 by torben, Tue Aug 27 06:33:28 2013 UTC
# Line 187  namespace DaoMqPump2 Line 187  namespace DaoMqPump2
187                          MySqlCommand updateCmd = new MySqlCommand(updateSql, sqlWriteConnection);                          MySqlCommand updateCmd = new MySqlCommand(updateSql, sqlWriteConnection);
188                          int numrows = updateCmd.ExecuteNonQuery();                          int numrows = updateCmd.ExecuteNonQuery();
189    
190                          translog.WriteLine(getNowString() + " " + msgString + "\n");                          translog.WriteLine(getNowString() + " " + msgString);
191    
192                          if (numrows != 1)                          if (numrows != 1)
193                          {                          {
# Line 285  namespace DaoMqPump2 Line 285  namespace DaoMqPump2
285    
286                                      if (numrows == 1)                                      if (numrows == 1)
287                                      {                                      {
288                                          translog.WriteLine(getNowString() + " " + msgString + "\n");                                          translog.WriteLine(getNowString() + " " + msgString);
289                                          mqMgr.Commit();                                          mqMgr.Commit();
290                                          statusData.counter++;                                          statusData.counter++;
291                                      }                                      }
# Line 328  namespace DaoMqPump2 Line 328  namespace DaoMqPump2
328                  }                  }
329                  catch (Exception e)                  catch (Exception e)
330                  {                  {
331                        //Det vil være mest korrekt at Rollback/backout MQ Transaktionen her - for at være sikker på at Message'n fjernes fra køen
332                        try
333                        {
334                            if (mqMgr != null)
335                            {
336                                mqMgr.Backout();
337                            }
338                        }
339                        catch (Exception e2)
340                        {
341                            this.addLogEntry("Error backing out from MQ Transaction: " + e2.Message);
342                        }
343    
344                      statusData.lastrunOk = false;                      statusData.lastrunOk = false;
345    
346                      statusData.lastErrorMessage = name + ".transportMq2Sql error: " + e.GetType().FullName + " " + e.Message;                      statusData.lastErrorMessage = name + ".transportMq2Sql error: " + e.GetType().FullName + " " + e.Message;

Legend:
Removed from v.2051  
changed lines
  Added in v.2056

  ViewVC Help
Powered by ViewVC 1.1.20