Examples of ConnectionEventListener


Examples of javax.sql.ConnectionEventListener

  protected void notifyClose() {
      if (listeners.size()>0) {
        Iterator<ConnectionEventListener> oIter = listeners.iterator();
        while (oIter.hasNext()) {
          ConnectionEventListener oCevl = oIter.next();
          oCevl.connectionClosed(new ConnectionEvent(this));
        } // wend
      } // fi       
  } // notifyClose
View Full Code Here

Examples of javax.sql.ConnectionEventListener

     * @param ex the given exception
     */
    public void notifyError(final IManagedConnection proxy, final SQLException ex) {
        // Notify event to listeners
        for (int i = 0; i < eventListeners.size(); i++) {
            ConnectionEventListener l = eventListeners.elementAt(i);
            l.connectionErrorOccurred(new ConnectionEvent(proxy, ex));
        }
    }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

        ConnectionEvent event = new ConnectionEvent(this.pooledConnection, e);

        for (Iterator iterator = connectionListeners.iterator();
                iterator.hasNext(); ) {
            ConnectionEventListener connectionEventListener =
                (ConnectionEventListener) iterator.next();

            connectionEventListener.connectionErrorOccurred(event);
        }
    }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

        ConnectionEvent connectionEvent =
            new ConnectionEvent(this.pooledConnection);

        for (Iterator iterator = connectionListeners.iterator();
                iterator.hasNext(); ) {
            ConnectionEventListener connectionListener =
                (ConnectionEventListener) iterator.next();

            connectionListener.connectionClosed(connectionEvent);
        }
    }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

  void closeEvent(Connection conn)
  {
    ConnectionEvent event = new ConnectionEvent(this);
   
    for (int i = 0; i < _listeners.size(); i++) {
      ConnectionEventListener listener = _listeners.get(i);

      listener.connectionClosed(event);
    }
  }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

        if (eventListener != null && !eventListener.isEmpty()) {
            ConnectionEvent event = new ConnectionEvent(this, exception);
            eventIterators++;
            try {
                for (Iterator it = eventListener.iterator(); it.hasNext();) {
                    ConnectionEventListener l =
                            (ConnectionEventListener) it.next();
                    if (exception == null) {
                        l.connectionClosed(event);
                    } else {
                        l.connectionErrorOccurred(event);
                    }
                }
            } finally {
                eventIterators--;
            }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

        // Null out the reference to the logical connection that is currently
        // being closed.
        this.logicalConnection_ = null;

        for (Iterator e = listeners_.iterator(); e.hasNext();) {
            ConnectionEventListener listener =
                    (ConnectionEventListener)e.next();
            ConnectionEvent event = new ConnectionEvent(this);
            listener.connectionClosed(event);
        }
    }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

    if (exception.getErrorCode() < ExceptionSeverity.SESSION_SEVERITY)
      return;

        synchronized (this) {
            for (Iterator e = listeners_.iterator(); e.hasNext();) {
                ConnectionEventListener listener =
                        (ConnectionEventListener)e.next();
                SQLException sqle = exception.getSQLException();
                ConnectionEvent event = new ConnectionEvent(this, sqle);
                listener.connectionErrorOccurred(event);
            }
        }
    }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

      ConnectionEvent errorEvent = new ConnectionEvent(this, exception);

      for (Enumeration e = eventListener.elements();
         e.hasMoreElements(); )
      {
        ConnectionEventListener l =
          (ConnectionEventListener)e.nextElement();
        l.connectionErrorOccurred(errorEvent);
      }
    }
  }
View Full Code Here

Examples of javax.sql.ConnectionEventListener

      ConnectionEvent closeEvent = new ConnectionEvent(this);

      for (Enumeration e = eventListener.elements();
         e.hasMoreElements(); )
      {
        ConnectionEventListener l =
          (ConnectionEventListener)e.nextElement();
        l.connectionClosed(closeEvent);
      }
    }

    return false;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.