Package org.apache.stonehenge.stocktrader.dal

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


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


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

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

    try {
      MarketSummaryDAO marketSummaryDAO = new MySQLMarketSummaryDAO(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 {
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) {
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 {
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

    try {
      updateLogout = sqlConnection.prepareStatement(SQL_UPDATE_LOGOUT);
      updateLogout.setString(1, userId);
      updateLogout.executeUpdate();
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      if (updateLogout != null) {
        try {
          updateLogout.close();
        } catch (SQLException e) {
View Full Code Here

            logger.debug("", e);
          }
        }
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      if (getCustomerByUserId != null) {
        try {
          getCustomerByUserId.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.