Package javax.resource.spi

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


        {
            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

    @Test
    public void testClose() throws Exception {
        final Object o = new Object();
        ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
        listener.connectionClosed(EasyMock.isA(ConnectionEvent.class));
        EasyMock.expectLastCall();
        EasyMock.replay(listener);
        mc.addConnectionEventListener(listener);
        mc.close(o);
        EasyMock.verify(listener);
View Full Code Here

            ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
            ce.setConnectionHandle(handle);

            for (Iterator<ConnectionEventListener> i = copy.iterator(); i.hasNext();) {
                ConnectionEventListener cel = i.next();
                cel.connectionClosed(ce);
            }
        }
    }

    /**
 
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

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

}
View Full Code Here

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

}
View Full Code Here

        event.setConnectionHandle(proxy);

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

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

/* 308 */       copy = new ArrayList(this.cels);
/*     */     }
/* 310 */     for (Iterator i = ((Collection)copy).iterator(); i.hasNext(); )
/*     */     {
/* 312 */       ConnectionEventListener cel = (ConnectionEventListener)i.next();
/* 313 */       cel.connectionClosed(ce);
/*     */     }
/*     */   }
/*     */
/*     */   Throwable connectionError(Throwable t)
/*     */   {
View Full Code Here

        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

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.