Package com.cloud.utils.db

Examples of com.cloud.utils.db.Transaction.rollback()


                pstmt.addBatch();
            }
            pstmt.executeBatch();
            txn.commit();
        } catch (Exception ex) {
            txn.rollback();
            s_logger.error("error saving usage records to cloud_usage db", ex);
            throw new CloudRuntimeException(ex.getMessage());
        }
    }
}
View Full Code Here


        pstmt.setLong(4, usage.getSecurityGroupId());
      }
      pstmt.executeUpdate();
      txn.commit();
    } catch (Exception e) {
      txn.rollback();
      s_logger.warn("Error updating UsageSecurityGroupVO", e);
    } finally {
        txn.close();
    }
  }
View Full Code Here

                }

                usageRecords.add(new UsageSecurityGroupVO(zoneId, acctId, dId, vmId, sgId, createdDate, deletedDate));
            }
        } catch (Exception e) {
            txn.rollback();
            s_logger.warn("Error getting usage records", e);
        } finally {
            txn.close();
        }
View Full Code Here

      pstmt.setLong(1, accountId);
      pstmt.setLong(2, lbId);
      pstmt.executeUpdate();
      txn.commit();
    } catch (Exception e) {
      txn.rollback();
      s_logger.warn("Error removing UsageLoadBalancerPolicyVO", e);
    } finally {
        txn.close();
    }
  }
View Full Code Here

        pstmt.setLong(3, usage.getId());
      }
      pstmt.executeUpdate();
      txn.commit();
    } catch (Exception e) {
      txn.rollback();
      s_logger.warn("Error updating UsageLoadBalancerPolicyVO", e);
    } finally {
        txn.close();
    }
  }
View Full Code Here

                }

                usageRecords.add(new UsageLoadBalancerPolicyVO(lbId, zoneId, acctId, dId, createdDate, deletedDate));
            }
        } catch (Exception e) {
            txn.rollback();
            s_logger.warn("Error getting usage records", e);
        } finally {
            txn.close();
        }
View Full Code Here

                        .getFirst());
                bucketAdapter.deleteContainer(
                        shost_storagelocation_pair.getSecond(),
                        request.getBucketName());
            }
            txn.rollback();
            txn.close();
        }
        return response;
    }
View Full Code Here

        pstmt.setLong(4, usage.getNetworkOfferingId());
      }
      pstmt.executeUpdate();
      txn.commit();
    } catch (Exception e) {
      txn.rollback();
      s_logger.warn("Error updating UsageNetworkOfferingVO", e);
    } finally {
        txn.close();
    }
  }
View Full Code Here

                }

                usageRecords.add(new UsageNetworkOfferingVO(zoneId, acctId, dId, vmId, noId, nicId, isDefault, createdDate, deletedDate));
            }
        } catch (Exception e) {
            txn.rollback();
            s_logger.warn("Error getting usage records", e);
        } finally {
            txn.close();
        }
View Full Code Here

            pstmt = txn.prepareAutoCloseStatement(sql);
            pstmt.setLong(1, maxEventTime);
            pstmt.executeUpdate();
            txn.commit();
        } catch (Exception ex) {
            txn.rollback();
            s_logger.error("error deleting old usage disk stats", ex);
        }
  }
   
    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.