// Add the cart items and update the quantities in the DB
Item item = null;
Iterator i = cart.getLineItems().iterator();
while (i.hasNext())
{
LineItem lineItem = (LineItem) i.next();
_catalogControl.updateItemQuantity(lineItem.getItem().getItemId(), lineItem.getQuantity());
_dbControl.addOrderItem(orderId, lineItem.getItem().getItemId(), lineItem.getQuantity());
}
connection.commit();
connection.setAutoCommit( true );
} catch (SQLException e) {