Package javax.sql

Examples of javax.sql.ConnectionEventListener


        debugCode("closedHandle();");
        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;
    }
View Full Code Here


  void closedHandle() {
    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;
  }
View Full Code Here

        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

        userConnection = null;

        reset();

        for (int i = 0; i < listeners.size(); i++) {
            ConnectionEventListener connectionEventListener =
                (ConnectionEventListener) listeners.get(i);

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

        ConnectionEvent event = new ConnectionEvent(this, e);

        reset();

        for (int i = 0; i < listeners.size(); i++) {
            ConnectionEventListener connectionEventListener =
                (ConnectionEventListener) listeners.get(i);

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

    public void connectionClosed() {
        synchronized( listeners ) {
            Iterator it = listeners.iterator();
           
            while( it.hasNext() ) {
                ConnectionEventListener lstnr;

                lstnr = (ConnectionEventListener)it.next();
                lstnr.connectionClosed(new ConnectionEvent(this));
            }
            logical = null;
            listeners.notifyAll();
        }
    }
View Full Code Here

    public void connectionErrored(SQLException e) {
        synchronized( listeners ) {
            Iterator it = listeners.iterator();
           
            while( it.hasNext() ) {
                ConnectionEventListener lstnr;

                lstnr = (ConnectionEventListener)it.next();
                lstnr.connectionErrorOccurred(new ConnectionEvent(this, e));
            }
        }
    }
View Full Code Here

        debugCode("closedHandle();");
        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;
    }
View Full Code Here

      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

      ConnectionEvent closeEvent = new ConnectionEvent(this);

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

TOP

Related Classes of javax.sql.ConnectionEventListener

Copyright © 2018 www.massapicom. 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.