Examples of QueueImpl


Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        return context;
    }

    public void createQueue(String name) {
        try {
            context.bind(name, new QueueImpl("/queue/"+name));
        } catch (NamingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        return context;
    }

    public void createQueue(String name) {
        try {
            context.bind(name, new QueueImpl("queue://"+name));
        } catch (NamingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

    @Test(timeout = 30000)
    public void testSendReceive() throws Exception {
        ConnectionFactoryImpl factory = new ConnectionFactoryImpl("localhost", port, "admin", "password");
        Connection connection = factory.createConnection("user", "userPassword");
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueImpl queue = new QueueImpl("queue://txqueue");
        MessageProducer p = session.createProducer(queue);
        TextMessage message = null;
        message = session.createTextMessage();
        String messageText = "hello  sent at " + new java.util.Date().toString();
        message.setText(messageText);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=native"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = createAmqpConnection();
        QueueImpl queue = new QueueImpl("queue://" + TEST_QUEUE);

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = amqpSession.createProducer(queue);
        p.setPriority(7);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=raw"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = createAmqpConnection();
        QueueImpl queue = new QueueImpl("queue://" + TEST_QUEUE);

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = amqpSession.createProducer(queue);
        p.setPriority(7);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=jms"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = createAmqpConnection();
        QueueImpl queue = new QueueImpl("queue://" + TEST_QUEUE);

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = amqpSession.createProducer(queue);

        TextMessage amqpMessage = amqpSession.createTextMessage();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        runSimpleSendReceiveTest(connection);
    }

    public void runSimpleSendReceiveTest(Connection connection) throws JMSException{
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueImpl queue = new QueueImpl("queue://txqueue");
        MessageProducer producer = session.createProducer(queue);
        TextMessage message = session.createTextMessage();
        String messageText = "hello  sent at " + new java.util.Date().toString();
        message.setText(messageText);
        producer.send(message);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

        Connection connection = createAMQPConnection(port, false);

        long startTime = System.currentTimeMillis();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueImpl queue = new QueueImpl(QUEUE_NAME);
        MessageProducer producer = session.createProducer(queue);
        TextMessage message = session.createTextMessage();
        message.setText(payload);
        producer.send(message);
        long endTime = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

    @Test(timeout = 60000)
    public void testMessagesAreAckedAMQProducer() throws Exception {
        int messagesSent = 3;
        ActiveMQAdmin.enableJMSFrameTracing();
        QueueImpl queue = new QueueImpl("queue://txqueue");
        assertTrue(brokerService.isPersistent());

        Connection connection = createAMQConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = session.createQueue("txqueue");
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.QueueImpl

    }

    @Test(timeout = 60000)
    public void testSelectingOnAMQPMessageID() throws Exception {
        ActiveMQAdmin.enableJMSFrameTracing();
        QueueImpl queue = new QueueImpl("queue://txqueue");
        assertTrue(brokerService.isPersistent());

        Connection connection = createAMQPConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = session.createQueue("txqueue");
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.