boolean publishQuotePriceChange) throws Exception {
if (TradeConfig.getUpdateQuotePrices() == false)
return new QuoteDataBeanImpl();
QuoteDataBean quoteData = null;
Connection conn = null;
try {
if (Log.doTrace())
Log.trace("TradeJdbc:updateQuotePriceVolume - inSession(" + this.inSession + ")", symbol,
changeFactor, new Double(sharesTraded));
conn = getConn();
quoteData = getQuoteForUpdate(conn, symbol);
BigDecimal oldPrice = quoteData.getPrice();
double newVolume = quoteData.getVolume() + sharesTraded;
if (oldPrice.equals(TradeConfig.PENNY_STOCK_PRICE)) {
changeFactor = TradeConfig.PENNY_STOCK_RECOVERY_MIRACLE_MULTIPLIER;
} else if (oldPrice.compareTo(TradeConfig.MAXIMUM_STOCK_PRICE) > 0) {
changeFactor = TradeConfig.MAXIMUM_STOCK_SPLIT_MULTIPLIER;
}
BigDecimal newPrice = changeFactor.multiply(oldPrice).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal low = quoteData.getLow();
BigDecimal high= quoteData.getHigh();
if (newPrice.compareTo(high) == 1) high = newPrice;
else if (newPrice.compareTo(low) == -1) low = newPrice;
updateQuotePriceVolume(conn, quoteData.getSymbol(), newPrice, newVolume, low, high);
quoteData = getQuote(conn, symbol);
commit(conn);
} catch (Exception e) {