Examples of QueueExistsException


Examples of org.apache.qpid.server.virtualhost.QueueExistsException

        assertEquals(TEST_DESCRIPTION, actualAttributes.get(Queue.DESCRIPTION));
    }

    public void testCreateQueueThatAlreadyExists() throws Exception
    {
        doThrow(new QueueExistsException("mocked exception", null)).when(_mockVirtualHost).createQueue(any(Map.class));

        try
        {
            _virtualHostManagerMBean.createNewQueue(TEST_QUEUE_NAME, TEST_OWNER, true);
            fail("Exception not thrown");
View Full Code Here

Examples of org.apache.qpid.server.virtualhost.plugins.QueueExistsException

        synchronized (_queueRegistry)
        {
            if(_queueRegistry.getQueue(queueName) != null)
            {
                throw new QueueExistsException("Queue with name " + queueName + " already exists", _queueRegistry.getQueue(queueName));
            }
            if(id == null)
            {

                id = UUIDGenerator.generateExchangeUUID(queueName, getName());
                while(_queueRegistry.getQueue(id) != null)
                {
                    id = UUID.randomUUID();
                }

            }
            else if(_queueRegistry.getQueue(id) != null)
            {
                throw new QueueExistsException("Queue with id " + id + " already exists", _queueRegistry.getQueue(queueName));
            }
            return _queueFactory.createQueue(id, queueName, durable, owner, autoDelete, exclusive, deleteOnNoConsumer,
                    arguments);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.