Package org.apache.activemq.command

Examples of org.apache.activemq.command.ConnectionError


                    // is restored.
                    if (!remoteInterupted.get()) {
                        stop();
                    }
                } else if (command.getClass() == ConnectionError.class) {
                    ConnectionError ce = (ConnectionError)command;
                    serviceLocalException(ce.getException());
                } else {
                    switch (command.getDataStructureType()) {
                    case WireFormatInfo.DATA_STRUCTURE_TYPE:
                        break;
                    default:
View Full Code Here


public class ConnectionErrorTest extends BaseCommandTestSupport {

    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();

    public Object createObject() throws Exception {
        ConnectionError info = new ConnectionError();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ConnectionError info = (ConnectionError)object;
        info.setException(createThrowable("Exception:1"));
        info.setConnectionId(createConnectionId("ConnectionId:2"));

    }
View Full Code Here


    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();

    public Object createObject() throws Exception {
        ConnectionError info = new ConnectionError();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ConnectionError info = (ConnectionError) object;

        info.setException(createThrowable("Exception:1"));
        info.setConnectionId(createConnectionId("ConnectionId:2"));
    }
View Full Code Here


    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();

    public Object createObject() throws Exception {
        ConnectionError info = new ConnectionError();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ConnectionError info = (ConnectionError) object;

        info.setException(createThrowable("Exception:1"));
        info.setConnectionId(createConnectionId("ConnectionId:2"));
    }
View Full Code Here

                    serviceRemoteConsumerAdvisory(md.getMessage().getDataStructure());
                    ackAdvisory(md.getMessage());
                } else if (command.isBrokerInfo()) {
                    futureRemoteBrokerInfo.set((BrokerInfo) command);
                } else if (command.getClass() == ConnectionError.class) {
                    ConnectionError ce = (ConnectionError) command;
                    serviceRemoteException(ce.getException());
                } else {
                    if (isDuplex()) {
                        if (LOG.isTraceEnabled()) {
                            LOG.trace(configuration.getBrokerName() + " duplex command type: " + command.getDataStructureType());
                        }
View Full Code Here

                    futureLocalBrokerInfo.set((BrokerInfo) command);
                } else if (command.isShutdownInfo()) {
                    LOG.info(configuration.getBrokerName() + " Shutting down");
                    stop();
                } else if (command.getClass() == ConnectionError.class) {
                    ConnectionError ce = (ConnectionError) command;
                    serviceLocalException(ce.getException());
                } else {
                    switch (command.getDataStructureType()) {
                        case WireFormatInfo.DATA_STRUCTURE_TYPE:
                            break;
                        default:
View Full Code Here

            // But the client is still connected.
            if (!stopping.get()) {
                if (SERVICELOG.isDebugEnabled()) {
                    SERVICELOG.debug("Broker has been stopped.  Notifying client and closing his connection.");
                }
                ConnectionError ce = new ConnectionError();
                ce.setException(e);
                dispatchSync(ce);
                // Record the error that caused the transport to stop
                this.stopError = e;
                // Wait a little bit to try to get the output buffer to flush
                // the exception notification to the client.
                try {
                    Thread.sleep(500);
                } catch (InterruptedException ie) {
                    Thread.currentThread().interrupt();
                }
                // Worst case is we just kill the connection before the
                // notification gets to him.
                stopAsync();
            }
        } else if (!stopping.get() && !inServiceException) {
            inServiceException = true;
            try {
                SERVICELOG.warn("Async error occurred: " + e, e);
                ConnectionError ce = new ConnectionError();
                ce.setException(e);
                if (pendingStop) {
                    dispatchSync(ce);
                } else {
                    dispatchAsync(ce);
                }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ConnectionError

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.