Examples of connectionClosed()


Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

        Iterator iterator = listeners.iterator();
        while (iterator.hasNext())
        {
            ConnectionEventListener l = (ConnectionEventListener)iterator.next();
            l.connectionClosed(event);
        }
    }

    void fireErrorOccurredEvent(Exception error)
    {
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

        event.setConnectionHandle(proxy);
       
        Iterator iterator = listeners.iterator();
        while (iterator.hasNext()) {
            ConnectionEventListener l = (ConnectionEventListener) iterator.next();
            l.connectionClosed(event);
        }
    }

    private void fireErrorOccurredEvent(Exception error) {
        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this,
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

    public void closedEvent(MockConnection mockConnection) {
        ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
        connectionEvent.setConnectionHandle(mockConnection);
        for (Iterator iterator = new ArrayList(connectionEventListeners).iterator(); iterator.hasNext();) {
            ConnectionEventListener connectionEventListener = (ConnectionEventListener) iterator.next();
            connectionEventListener.connectionClosed(connectionEvent);
        }
    }

    public void errorEvent(MockConnection mockConnection) {
        ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

            for (Iterator<ConnectionEventListener> i = listeners.iterator(); i.hasNext();) {
                ConnectionEventListener listener = i.next();

                switch (event.getId()) {
                    case ConnectionEvent.CONNECTION_CLOSED:
                        listener.connectionClosed(event);
                        break;
                    case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
                        listener.connectionErrorOccurred(event);
                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

    protected void sendConnectionEvent(ConnectionEvent connEvent) {
  for (int i = listeners.size() - 1; i >= 0; i--) {
      ConnectionEventListener listener =
    (ConnectionEventListener) listeners.get(i);
      if (connEvent.getId() == ConnectionEvent.CONNECTION_CLOSED) {
    listener.connectionClosed(connEvent);
      } else if (connEvent.getId() ==
           ConnectionEvent.CONNECTION_ERROR_OCCURRED) {
    listener.connectionErrorOccurred(connEvent);
      } else if (connEvent.getId() ==
           ConnectionEvent.LOCAL_TRANSACTION_STARTED) {
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

    public void closedEvent(MockConnection mockConnection) {
        ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
        connectionEvent.setConnectionHandle(mockConnection);
        for (Iterator iterator = new ArrayList(connectionEventListeners).iterator(); iterator.hasNext();) {
            ConnectionEventListener connectionEventListener = (ConnectionEventListener) iterator.next();
            connectionEventListener.connectionClosed(connectionEvent);
        }
    }

    public void errorEvent(MockConnection mockConnection) {
        ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

            for (Iterator i = listeners.iterator(); i.hasNext();) {
                ConnectionEventListener listener = (ConnectionEventListener) i.next();

                switch (event.getId()) {
                    case ConnectionEvent.CONNECTION_CLOSED:
                        listener.connectionClosed(event);
                        break;
                    case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
                        listener.connectionErrorOccurred(event);
                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
View Full Code Here

Examples of javax.resource.spi.ConnectionEventListener.connectionClosed()

            for (Iterator<ConnectionEventListener> i = listeners.iterator(); i.hasNext();) {
                ConnectionEventListener listener = i.next();

                switch (event.getId()) {
                    case ConnectionEvent.CONNECTION_CLOSED:
                        listener.connectionClosed(event);
                        break;
                    case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
                        listener.connectionErrorOccurred(event);
                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
View Full Code Here

Examples of javax.sql.ConnectionEventListener.connectionClosed()

      Iterator iter = listeners.iterator();
      while(iter.hasNext()){
        ConnectionEventListener listener = (ConnectionEventListener)iter.next();
        if(e == null){
          //no exception
          listener.connectionClosed(new ConnectionEvent(this));
        }else{
          //exception occurred
          listener.connectionErrorOccurred(new ConnectionEvent(this, e))
        }
      }
View Full Code Here

Examples of javax.sql.ConnectionEventListener.connectionClosed()

        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
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.