Package javax.sql

Examples of javax.sql.ConnectionEvent


        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


      return;

    // tell my listeners an exception is about to be thrown
    if (eventListener != null && eventListener.size() > 0)
    {
      ConnectionEvent errorEvent = new ConnectionEvent(this, exception);

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

    //the newly assigned currentConnectionHandle null, resulting in an NPE.
    currentConnectionHandle = null;
    // tell my listeners I am closed
    if (eventListener != null && eventListener.size() > 0)
    {
      ConnectionEvent closeEvent = new ConnectionEvent(this);

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

      return;

    // tell my listeners an exception is about to be thrown
    if (eventListener != null && eventListener.size() > 0)
    {
      ConnectionEvent errorEvent = new ConnectionEvent(this, exception);

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

  public synchronized void notifyClose()
  {
    // tell my listeners I am closed
    if (eventListener != null && eventListener.size() > 0)
    {
      ConnectionEvent closeEvent = new ConnectionEvent(this);

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

        this(con, autoCommit, false);
    }

    protected ConnectionEvent createConnectionEvent(SQLException sqle)
    {
        return new ConnectionEvent(this, sqle);
    }
View Full Code Here

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

  /**
   * INTERNAL
   */
  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);
View Full Code Here

    }
   
    @Override
    public void connectionClosed(ConnectionEvent event)
    {
      ConnectionEvent e = this.getEvent(event);
     
      if (e != null)
      {
        this.listener.connectionClosed(e);
      }
View Full Code Here

    }

    @Override
    public void connectionErrorOccurred(ConnectionEvent event)
    {
      ConnectionEvent e = this.getEvent(event);
     
      if (e != null)
      {
        this.listener.connectionErrorOccurred(e);
      }
View Full Code Here

TOP

Related Classes of javax.sql.ConnectionEvent

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.