Package org.apache.activemq.transport.failover

Examples of org.apache.activemq.transport.failover.FailoverTransport


            }
            transportInterruptionProcessingComplete.set(0);
    }

    private void signalInterruptionProcessingNeeded() {
        FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class);
        if (failoverTransport != null) {
            failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId());
            if (LOG.isDebugEnabled()) {
                LOG.debug("notified failover transport (" + failoverTransport
                        + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId());
            }
        }
View Full Code Here


        }

        TransactionInfo info = new TransactionInfo(getConnectionId(), null, TransactionInfo.RECOVER);
        try {
            this.connection.checkClosedOrFailed();
            final FailoverTransport failoverTransport = this.connection.getTransport().narrow(FailoverTransport.class);
            if (failoverTransport != null && !failoverTransport.isConnected()) {
                // otherwise call will block on reconnect forfeting any app level periodic check
                XAException xaException = new XAException("Failover transport not connected: " + this.getConnection().getTransport());
                xaException.errorCode = XAException.XAER_RMERR;
                throw xaException;
            }
View Full Code Here

*/
public class DiscoveryTransportFactory extends FailoverTransportFactory {
       
    public Transport createTransport(CompositeData compositeData) throws IOException {
        Map<String, String> parameters = new HashMap<String, String>(compositeData.getParameters());
        FailoverTransport failoverTransport = createTransport(parameters);
        return createTransport(failoverTransport, compositeData, parameters);
    }
View Full Code Here

        consumer.close();
        session.close();

        ResponseCorrelator respCorr = (ResponseCorrelator) connection.getTransport();
        MutexTransport mutexTrans = (MutexTransport) respCorr.getNext();
        FailoverTransport failoverTrans = (FailoverTransport) mutexTrans.getNext();
        Field stateTrackerField = FailoverTransport.class.getDeclaredField("stateTracker");
        stateTrackerField.setAccessible(true);
        ConnectionStateTracker stateTracker = (ConnectionStateTracker) stateTrackerField.get(failoverTrans);
        Field statesField = ConnectionStateTracker.class.getDeclaredField("connectionStates");
        statesField.setAccessible(true);
View Full Code Here

        // Send the message using the fail over publisher.
        connection3.request(createMessage(producerInfo3, destination, deliveryMode));

        // The message will be sent to one of the brokers.
        FailoverTransport ft = (FailoverTransport)connection3.getTransport().narrow(FailoverTransport.class);

        // See which broker we were connected to.
        StubConnection connectionA;
        StubConnection connectionB;
        TransportConnector serverA;
        if (connector.getServer().getConnectURI().getPort() == ft.getConnectedTransportURI().getPort()) {
            connectionA = connection1;
            connectionB = connection2;
            serverA = connector;
        } else {
            connectionA = connection2;
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.failover.FailoverTransport

Copyright © 2018 www.massapicom. 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.