pstmt = txn.prepareAutoCloseStatement(sql);
pstmt.setLong(1, allocatedAmount);
pstmt.setLong(2, hostId);
pstmt.setShort(3, capacityType);
pstmt.executeUpdate(); // TODO: Make sure exactly 1 row was updated?
txn.commit();
} catch (Exception e) {
txn.rollback();
s_logger.warn("Exception updating capacity for host: " + hostId, e);
}
}