Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.ConnectionClose


        if (exc == null)
        {
            return;
        }

        ConnectionClose close = exc.getClose();
        if (close == null)
        {
            try
            {
                if (_conn.firePreFailover(false) && _conn.attemptReconnection())
                {
                    _conn.failoverPrep();
                    _qpidConnection.resume();
                    _conn.fireFailoverComplete();
                    return;
                }
            }
            catch (Exception e)
            {
                _logger.error("error during failover", e);
            }
        }

        ExceptionListener listener = _conn._exceptionListener;
        if (listener == null)
        {
            _logger.error("connection exception: " + conn, exc);
        }
        else
        {
            String code = null;
            if (close != null)
            {
                code = close.getReplyCode().toString();
            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.initCause(exc);
            listener.onException(ex);
View Full Code Here


        if (exc == null)
        {
            return;
        }

        ConnectionClose close = exc.getClose();
        if (close == null)
        {
            try
            {
                if (_conn.firePreFailover(false) && _conn.attemptReconnection())
                {
                    _conn.failoverPrep();
                    _qpidConnection.resume();
                    _conn.fireFailoverComplete();
                    return;
                }
            }
            catch (Exception e)
            {
                _logger.error("error during failover", e);
            }
        }

        ExceptionListener listener = _conn._exceptionListener;
        if (listener == null)
        {
            _logger.error("connection exception: " + conn, exc);
        }
        else
        {
            String code = null;
            if (close != null)
            {
                code = close.getReplyCode().toString();
            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.setLinkedException(exc);
            ex.initCause(exc);
View Full Code Here

        if (exc == null)
        {
            return;
        }

        ConnectionClose close = exc.getClose();
        if (close == null || close.getReplyCode() == ConnectionCloseCode.CONNECTION_FORCED)
        {
            _conn.getProtocolHandler().setFailoverLatch(new CountDownLatch(1));

            _qpidConnection.notifyFailoverRequired();

            synchronized (_conn.getFailoverMutex())
            {
                try
                {
                    if (_conn.firePreFailover(false) && _conn.attemptReconnection())
                    {
                        _conn.failoverPrep();
                        _conn.resubscribeSessions();
                        _conn.fireFailoverComplete();
                        return;
                    }
                }
                catch (Exception e)
                {
                    _logger.error("error during failover", e);
                }
                finally
                {
                    _conn.getProtocolHandler().getFailoverLatch().countDown();
                    _conn.getProtocolHandler().setFailoverLatch(null);
                }
            }
        }

        ExceptionListener listener = _conn.getExceptionListenerNoCheck();
        if (listener == null)
        {
            _logger.error("connection exception: " + conn, exc);
        }
        else
        {
            String code = null;
            if (close != null)
            {
                code = close.getReplyCode().toString();
            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.setLinkedException(exc);
            ex.initCause(exc);
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.ConnectionClose

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.