Iterator iter = eventListeners.iterator();
List tempListeners = new ArrayList(eventListeners);  Iterator iter = tempListeners.iterator();
    public void connectionErrorOccured(PooledConnectionHandler connection, SQLException ex) {        ConnectionEvent event = new ConnectionEvent(this, ex);        Iterator iter = eventListeners.iterator();        while (iter.hasNext()) {            ((ConnectionEventListener)iter.next()).connectionErrorOccurred(                event);        }    }