Package javax.resource.spi

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


                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
                        listener.localTransactionRolledback(event);
                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
                        listener.localTransactionStarted(event);
                        break;
                    default:
                        // Unknown event, skip
                }
            }
View Full Code Here


                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
                        listener.localTransactionRolledback(event);
                        break;
                    case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
                        listener.localTransactionStarted(event);
                        break;
                    default:
                        // Unknown event, skip
                }
            }
View Full Code Here

    @Test
    public void testSendEventTxStarted() throws Exception {
        ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
        ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
        mc.addConnectionEventListener(listener);
        listener.localTransactionStarted(EasyMock.isA(ConnectionEvent.class));
        EasyMock.expectLastCall();
        EasyMock.replay(listener);
        mc.sendEvent(event);
        EasyMock.verify(listener);
    }
View Full Code Here

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

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

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

      {
        case ConnectionEvent.CONNECTION_CLOSED:
          l.connectionClosed(ce);
          break;
        case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
          l.localTransactionStarted(ce);
          break;
        case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
          l.localTransactionCommitted(ce);
          break;
        case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
View Full Code Here

    @Test
    public void testSendEventTxStarted() throws Exception {
        ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
        ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
        mc.addConnectionEventListener(listener);
        listener.localTransactionStarted(EasyMock.isA(ConnectionEvent.class));
        EasyMock.expectLastCall();
        EasyMock.replay(listener);
        mc.sendEvent(event);
        EasyMock.verify(listener);
    }
View Full Code Here

            ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);

            for (Iterator<ConnectionEventListener> i = copy.iterator(); i.hasNext();) {
                ConnectionEventListener cel = i.next();
                try {
                    cel.localTransactionStarted(ce);
                } catch (Throwable t) {
                    getLog().trace("Error notifying of connection committed for listener: " + cel, t);
                }
            }
        }
View Full Code Here

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

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

                ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
                Iterator iterator = listeners.iterator();
                while (iterator.hasNext()) {
                    ConnectionEventListener l = (ConnectionEventListener) iterator
                            .next();
                    l.localTransactionStarted(event);
                }
            }

            public void commitEvent() {
                ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
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.