예제 #1
0
 /// <summary>
 /// ɾ������
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="mqNodeConn"></param>
 /// <param name="id"></param>
 /// <param name="partitionId"></param>
 /// <returns></returns>
 public int DeleteMqQueue(DbConn conn, DbConn mqNodeConn, int id, int partitionId)
 {
     int flag = this.IsDeleted(conn, mqNodeConn, id, partitionId);
     if (flag != 1) return flag;
     try
     {
         conn.BeginTransaction();
         if (this.DeletePartition(conn, partitionId))
         {
             if (!partitionDal.UpdateIsUsed(conn, 0, partitionId))
                 throw new Exception("���³���");
         }
         else
         {
             throw new Exception("ɾ������");
         }
         conn.Commit();
     }
     catch (Exception ex)
     {
         conn.Rollback();
         XXF.Log.ErrorLog.Write("ɾ��MQ���г���:", ex);
         return -1;
     }
     return 1;
 }