Invoked when the application calls close() on its representation of the connection. @param event an event object describing the source of the event
366367368369370371372373374375376
try { for (Iterator it = eventListener.iterator(); it.hasNext();) { ConnectionEventListener l = (ConnectionEventListener) it.next(); if (exception == null) { l.connectionClosed(event); } else { l.connectionErrorOccurred(event); } } } finally {
397398399400401402403404405406407
try { for (Iterator it = listeners_.iterator(); it.hasNext(); ) { final ConnectionEventListener listener = (ConnectionEventListener) it.next(); if (exception == null) { listener.connectionClosed(event); } else { listener.connectionErrorOccurred(event); } } } finally {
184185186187188189190191192193194
for (Iterator iterator = connectionListeners.iterator(); iterator.hasNext(); ) { ConnectionEventListener connectionListener = (ConnectionEventListener) iterator.next(); connectionListener.connectionClosed(connectionEvent); } } public void setSchema(String schema) throws SQLException { throw new SQLException();
136137138139140141142143144145146
ConnectionEvent event = new ConnectionEvent(this); // go backward so that a listener can remove itself // (otherwise we need to clone the list) for (int i = listeners.size() - 1; i >= 0; i--) { ConnectionEventListener listener = listeners.get(i); listener.connectionClosed(event); } handleConn = null; } /**
441442443444445446447448449450451
for (Enumeration e = eventListener.elements(); e.hasMoreElements(); ) { ConnectionEventListener l = (ConnectionEventListener)e.nextElement(); l.connectionClosed(closeEvent); } } return false; }
341342343344345346347348349350351
for (Iterator e = listeners_.iterator(); e.hasNext();) { ConnectionEventListener listener = (ConnectionEventListener)e.next(); ConnectionEvent event = new ConnectionEvent(this); listener.connectionClosed(event); } } /** * Inform listeners that an error has occured on the connection, if the
362363364365366367368369370371372
396397398399400401402403404405406
122123124125126127128129130131132
ConnectionEvent e2 = new ConnectionEvent ( this ); Enumeration enumm = listeners_.elements (); while ( enumm.hasMoreElements () ) { ConnectionEventListener l = (ConnectionEventListener) enumm .nextElement (); l.connectionClosed ( e2 ); } afterCompletionDone_ = true; }
149150151152153154155156157158159
ConnectionEvent e2 = new ConnectionEvent ( this ); Enumeration enumm = listeners_.elements (); while ( enumm.hasMoreElements () ) { ConnectionEventListener l = (ConnectionEventListener) enumm .nextElement (); l.connectionClosed ( e2 ); } } } }