Package org.apache.qpid

Examples of org.apache.qpid.AMQException


                messageOk = getMessageSelectorFilter().matches(message);
            }
        }
        catch (Exception e)
        {
            throw new AMQException(AMQConstant.INTERNAL_ERROR, "Error when evaluating message selector", e);
        }

        if (_logger.isDebugEnabled())
        {
            _logger.debug("messageOk " + messageOk);
View Full Code Here


    {
        _0_10session.messageAcknowledge
            (Range.newInstance((int) message.getDeliveryTag()),
             getAcknowledgeMode() != org.apache.qpid.jms.Session.NO_ACKNOWLEDGE);

        final AMQException amqe = _0_10session.getCurrentException();
        if (amqe != null)
        {
            throw amqe;
        }
    }
View Full Code Here

     */
    private void flushUnwantedMessage(final AbstractJMSMessage message) throws AMQException
    {
        _0_10session.flushProcessed(Range.newInstance((int) message.getDeliveryTag()),false);

        final AMQException amqe = _0_10session.getCurrentException();
        if (amqe != null)
        {
            throw amqe;
        }
    }
View Full Code Here

        {
            try
            {
                if (!_delegate.verifyClientID())
                {
                    throw new AMQException(AMQConstant.ALREADY_EXISTS,"ClientID must be unique");
                }
            }
            catch(JMSException e)
            {
                    throw new AMQException(e.getMessage(),e);
            }
        }
    }
View Full Code Here

                throw new UnsupportedOperationException("'" + getName() + "' is a reserved exchange and can't be deleted");
            }

            if(_exchange.hasReferrers())
            {
                throw new AMQException( AMQConstant.NOT_ALLOWED, "Exchange in use as an alternate exchange", null);
            }

            synchronized(exchangeRegistry)
            {
                exchangeRegistry.unregisterExchange(getName(), false);
View Full Code Here

        {
            super.checkNotClosed();
        }
        catch (IllegalStateException ise)
        {
            AMQException ex = getLastException();
            if (ex != null)
            {
                IllegalStateException ssnClosed = new IllegalStateException(
                        "Session has been closed", ex.getErrorCode().toString());

                ssnClosed.setLinkedException(ex);
                ssnClosed.initCause(ex);
                throw ssnClosed;
            }
View Full Code Here

        {
            synchronized (_messageDeliveryLock)
            {
                // An AMQException has an error code and message already and will be passed in when closure occurs as a
                // result of a channel close request
                AMQException amqe;
                if (e instanceof AMQException)
                {
                    amqe = (AMQException) e;
                }
                else
                {
                    amqe = new AMQException("Closing session forcibly", e);
                }

                _connection.deregisterSession(_channelId);
                closeProducersAndConsumers(amqe);
            }
View Full Code Here

                {
                    return requestQueueDepth(amqd, sync);
                }
                catch (TransportException e)
                {
                    throw new AMQException(AMQConstant.getConstant(getErrorCode(e)), e.getMessage(), e);
                }
            }
        }, _connection).execute();
    }
View Full Code Here

        {
            consumeFromQueue(consumer, queueName, protocolHandler, nowait);
        }
        catch (FailoverException e)
        {
            throw new AMQException(null, "Fail-over exception interrupted basic consume.", e);
        }
    }
View Full Code Here

                _suspended = suspend;
                sendSuspendChannel(suspend);
            }
            catch (FailoverException e)
            {
                throw new AMQException(null, "Fail-over interrupted suspend/unsuspend channel.", e);
            }
            catch (TransportException e)
            {
                throw new AMQException(AMQConstant.getConstant(getErrorCode(e)), e.getMessage(), e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.AMQException

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.