Package javax.resource.spi

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


    protected void sendConnectionEvent(ConnectionEvent connEvent) {
        for (int i = listeners.size() - 1; i >= 0; i--) {
            ConnectionEventListener listener =
                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

            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

    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

            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

            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

        {
            case ConnectionEvent.CONNECTION_CLOSED:
                for (Iterator i = copy.iterator(); i.hasNext();)
                {
                    ConnectionEventListener cel = (ConnectionEventListener) i.next();
                    cel.connectionClosed(ce);
                }
                break;
            case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
                for (Iterator i = copy.iterator(); i.hasNext();)
                {
View Full Code Here

      ConnectionEventListener l =
          (ConnectionEventListener) list.elementAt(i);
      switch (ce.getId())
      {
        case ConnectionEvent.CONNECTION_CLOSED:
          l.connectionClosed(ce);
          break;
        case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
          l.localTransactionStarted(ce);
          break;
        case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
View Full Code Here

            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

    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

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.