Examples of ActiveMQTempQueue


Examples of org.apache.activemq.command.ActiveMQTempQueue

   
    public void initCombosForTestDesintaionOptions() {
        addCombinationValues("destination", new Object[]{
                new ActiveMQQueue("TEST?k1=v1&k2=v2"),
                new ActiveMQTopic("TEST?k1=v1&k2=v2"),
                new ActiveMQTempQueue("TEST:1?k1=v1&k2=v2"),
                new ActiveMQTempTopic("TEST:1?k1=v1&k2=v2"),
        });
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        case QUEUE:
            return new ActiveMQQueue(physicalName);
           
        case TEMPORARY_QUEUE:
            return new ActiveMQTempQueue(physicalName);

        case TEMPORARY_TOPIC:
            return new ActiveMQTempTopic(physicalName);

        default:
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if( topic ) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }
       
        DestinationInfo info = new DestinationInfo();
        info.setConnectionId(this.info.getConnectionId());
        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

              return (ActiveMQDestination) destination;
             
            }
            else {
                if (destination instanceof TemporaryQueue) {
                  activeMQDestination = new ActiveMQTempQueue(((Queue) destination).getQueueName());
                }
                else if (destination instanceof TemporaryTopic) {
                  activeMQDestination = new ActiveMQTempTopic(((Topic) destination).getTopicName());
                }
                else if (destination instanceof Queue) {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if (topic) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }

        DestinationInfo info = new DestinationInfo();
        info.setConnectionId(this.info.getConnectionId());
        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

    }

    public ActiveMQDestination createTempQueue(String name) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            rc = new ActiveMQTempQueue(connectionId, tempDestinationGenerator.getNextSequenceId());
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
        }
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        // lets subscribe to a personal inbox for replies

        // Check if Destination info is of temporary type.
        if (inboxDestination == null) {
            inboxDestination = new ActiveMQTempQueue(connectionInfo.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());

            DestinationInfo info = new DestinationInfo();
            info.setConnectionId(connectionInfo.getConnectionId());
            info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
            info.setDestination(inboxDestination);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        ActiveMQConnectionFactory sendFactory = createConnectionFactory(a);
        ActiveMQConnection sendConnection = createConnection(sendFactory);

        ActiveMQSession sendSession = (ActiveMQSession)sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer producer = sendSession.createProducer(sendQ);
        ActiveMQTempQueue realReplyQ = (ActiveMQTempQueue) sendSession.createTemporaryQueue();
        TextMessage message = sendSession.createTextMessage("1");
        message.setJMSReplyTo(realReplyQ);
        producer.send(message);
        LOG.info("request sent");
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if (topic) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }

        DestinationInfo info = new DestinationInfo();
        info.setConnectionId(this.info.getConnectionId());
        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempQueue

        ConnectionId id = new ConnectionId(new IdGenerator().generateId());
        DestinationMap map = new DestinationMap();
        Object value = new Object();
        int count = 1000;
        for (int i = 0; i < count; i++) {
            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
            map.put(queue, value);
        }
        for (int i = 0; i < count; i++) {
            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
            map.remove(queue, value);
            Set<?> set = map.get(queue);
            assertTrue(set.isEmpty());
        }
    }
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.