Example usage for javax.resource.spi ConnectionEvent LOCAL_TRANSACTION_ROLLEDBACK

List of usage examples for javax.resource.spi ConnectionEvent LOCAL_TRANSACTION_ROLLEDBACK

Introduction

In this page you can find the example usage for javax.resource.spi ConnectionEvent LOCAL_TRANSACTION_ROLLEDBACK.

Prototype

int LOCAL_TRANSACTION_ROLLEDBACK

To view the source code for javax.resource.spi ConnectionEvent LOCAL_TRANSACTION_ROLLEDBACK.

Click Source Link

Document

Event notification that a Resource Manager Local Transaction was rolled back on the connection

Usage

From source file:org.eclipse.ecr.core.storage.sql.ra.ManagedConnectionImpl.java

protected void sendTxRolledbackEvent(ConnectionImpl connection) {
    sendEvent(ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK, connection, null);
}

From source file:org.eclipse.ecr.core.storage.sql.ra.ManagedConnectionImpl.java

/**
 * Notifies the application server, through the
 * {@link ConnectionEventListener}s it has registered with us, of what
 * happens with this connection.//w w  w .java  2s  . c om
 */
private void sendEvent(ConnectionEvent event) {
    for (Object object : listeners.getListeners()) {
        ConnectionEventListener listener = (ConnectionEventListener) object;
        switch (event.getId()) {
        case ConnectionEvent.CONNECTION_CLOSED:
            listener.connectionClosed(event);
            break;
        case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
            listener.localTransactionStarted(event);
            break;
        case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
            listener.localTransactionCommitted(event);
            break;
        case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
            listener.localTransactionRolledback(event);
            break;
        case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
            listener.connectionErrorOccurred(event);
            break;
        }
    }
}

From source file:org.nuxeo.ecm.core.jca.JCAManagedConnection.java

/**
 * Send event.// www .j  a  v a  2  s.  co  m
 */
private void sendEvent(ConnectionEvent event) {
    Object[] listenersArray = listeners.getListenersCopy();
    for (Object object : listenersArray) {
        ConnectionEventListener listener = (ConnectionEventListener) object;

        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:
            listener.localTransactionCommitted(event);
            break;
        case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
            listener.localTransactionRolledback(event);
            break;
        case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
            listener.localTransactionStarted(event);
            break;
        }
    }
}

From source file:org.nuxeo.ecm.core.jca.JCAManagedConnection.java

/**
 * Send transaction rolledback event.
 */
public void sendTxRolledbackEvent(JCAConnection handle) {
    sendEvent(ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK, handle, null);
}