Package org.apache.stonehenge.stocktrader.dal

Examples of org.apache.stonehenge.stocktrader.dal.DAOException


    try {
      sqlConnection.rollback();
      sqlConnection.setAutoCommit(true);
      sqlConnection.setTransactionIsolation(previousTransactionIsolation);
    } catch (SQLException e) {
      throw new DAOException("Exception is thrown during the rollback of transaction", e);
    }
  }
View Full Code Here


  public void close() throws DAOException {
    try {
      sqlConnection.close();
    } catch (SQLException e) {
      throw new DAOException("", e);
    }
  }
View Full Code Here

      if (rs.next()) {
        return rs.getObject(1);
      }
      return null;
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      if (preparedStatement != null) {
        try {
          preparedStatement.close();
        } catch (SQLException e) {
View Full Code Here

    try {
      OrderDAO orderDAO = new MSSQLOrderDAO(getConnection());
      return orderDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating MSSQLOrderDAO object", e);
    }
  }
View Full Code Here

    try {
      CustomerDAO customerDAO = new MSSQLCustomerDAO(getConnection());
      return customerDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MSSQLCustomerDAO", e);
    }
  }
View Full Code Here

    try {
      MarketSummaryDAO marketSummaryDAO = new MSSQLMarketSummaryDAO(getConnection());
      return marketSummaryDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MarketSummaryDAO", e);
    }
  }
View Full Code Here

                        logger.debug("", e);
                    }
                }
            }
        } catch (SQLException e) {
            throw new DAOException("Exception is thrown when selecting the holding entry for order ID :" + orderId, e);
        } finally {
            if (selectHoldingLockStat != null) {
                try {
                    selectHoldingLockStat.close();
                } catch (SQLException e) {
View Full Code Here

                    }
                }
            }
        } catch (SQLException e) {
            logger.debug("", e);
            throw new DAOException("Exception is thrown when selecting the holding entry for userID :" + userId + " and orderID :" + holdingID, e);

        } finally {
            if (selectHoldingNoLockStat != null) {
                try {
                    selectHoldingNoLockStat.close();
View Full Code Here

            debitAccountStat.setBigDecimal(1, total);
            debitAccountStat.setInt(2, accountId);
            debitAccountStat.executeUpdate();

        } catch (SQLException e) {
            throw new DAOException("Excpetion is thrown when updating the account balance for accountID :" + accountId + " total :" + total, e);
        } finally {
            if (debitAccountStat != null) {
                try {
                    debitAccountStat.close();
                } catch (SQLException e) {
View Full Code Here

                                        logger.debug("", e);
                                    }
                                }
                            }
                        } catch (SQLException e) {
                            throw new DAOException("", e);
                        } finally {
                            if (updateCustomerLogin != null) {
                                try {
                                    updateCustomerLogin.close();
                                } catch (SQLException e) {
                                    logger.debug("", e);
                                }
                            }
                            if (selectCustomerLogin != null) {
                                try {
                                    selectCustomerLogin.close();
                                } catch (SQLException e) {
                                    logger.debug("", e);
                                }
                            }
                        }
                    }
                } finally {
                    try {
                        customerProfileRS.close();
                    } catch (SQLException e) {
                        logger.debug("", e);
                    }
                }
            }

        } catch (SQLException e) {
            throw new DAOException("", e);
        } finally {
            if (selectCustomerProfileByUserId != null) {
                try {
                    selectCustomerProfileByUserId.close();
                } catch (SQLException e) {
View Full Code Here

TOP

Related Classes of org.apache.stonehenge.stocktrader.dal.DAOException

Copyright © 2018 www.massapicom. 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.