Package javax.jms

Examples of javax.jms.QueueSession.createTemporaryQueue()


      getLog().debug("Starting InvaidDestinationQueueSend test");
      connect();

      QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      TemporaryQueue queue = session.createTemporaryQueue();
      QueueSender sender = session.createSender(queue);
      queue.delete();

      TextMessage message = session.createTextMessage("hello");
      boolean caught = false;
View Full Code Here


      getLog().debug("Starting InvalidDestinationQueueBrowse test");
      connect();

      QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      TemporaryQueue queue = session.createTemporaryQueue();
      QueueBrowser browser = session.createBrowser(queue);
      queue.delete();

      boolean caught = false;
      try
View Full Code Here

      }
      else {
        // Perform all calls on QueueSession reference for JMS 1.0.2 compatibility...
        // DEPRECATED but kept around with the deprecated JmsTemplate102 etc classes for the time being.
        QueueSession queueSession = (QueueSession) session;
        responseQueue = queueSession.createTemporaryQueue();
        QueueSender sender = queueSession.createSender(queue);
        producer = sender;
        consumer = queueSession.createReceiver(responseQueue);
        requestMessage.setJMSReplyTo(responseQueue);
        sender.send(requestMessage);
View Full Code Here

    MessageConsumer consumer = null;
    try {
      if (session instanceof QueueSession) {
        // Perform all calls on QueueSession reference for JMS 1.0.2 compatibility...
        QueueSession queueSession = (QueueSession) session;
        responseQueue = queueSession.createTemporaryQueue();
        QueueSender sender = queueSession.createSender(queue);
        producer = sender;
        consumer = queueSession.createReceiver(responseQueue);
        requestMessage.setJMSReplyTo(responseQueue);
        sender.send(requestMessage);
View Full Code Here

        final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA");
        final QueueConnection connection = factory.createQueueConnection();
        connection.start();
        try {
            final QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue replyDestination = session.createTemporaryQueue();
            final QueueReceiver receiver = session.createReceiver(replyDestination);
            final Message message = session.createTextMessage("Test");
            message.setJMSReplyTo(replyDestination);
            final Destination destination = (Destination) ctx.lookup("queue/myAwesomeQueue");
            final MessageProducer producer = session.createProducer(destination);
View Full Code Here

        final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA");
        final QueueConnection connection = factory.createQueueConnection();
        try {
            connection.start();
            final QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue replyDestination = session.createTemporaryQueue();
            final String requestMessage = "test";
            final Message message = session.createTextMessage(requestMessage);
            message.setJMSReplyTo(replyDestination);
            final Destination destination = (Destination) ctx.lookup(Constants.QUEUE_JNDI_NAME);
            final MessageProducer producer = session.createProducer(destination);
View Full Code Here

       
        final QueueConnection connection = factory.createQueueConnection("guest","guest");
        try {
            connection.start();
            final QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue replyDestination = session.createTemporaryQueue();
            final String requestMessage = "test";
            final Message message = session.createTextMessage(requestMessage);
            message.setJMSReplyTo(replyDestination);
            final Destination destination = (Destination) context.lookup(Constants.QUEUE_JNDI_NAME);
            final MessageProducer producer = session.createProducer(destination);
View Full Code Here

                            selector = "JMSCorrelationID = '" + generateUniqueSelector(ret) + "'";
                        }
                       
                        if (destination == null) {
                            //neither replyDestination not replyDest are present.
                            destination = session.createTemporaryQueue();
                            selector = "JMSCorrelationID = '" + generateUniqueSelector(ret) + "'";
                        }
                       
                        ret.destination(destination);
                        MessageConsumer consumer = session.createReceiver(destination, selector);
View Full Code Here

           
            selector =  "JMSCorrelationID = '" + generateUniqueSelector(session) + "'";
           
           
        } else {
            destination = session.createTemporaryQueue();
        }
       
        MessageConsumer consumer = session.createReceiver((Queue)destination, selector);
        return new PooledSession(session,
                                 destination,
View Full Code Here

            AMQQueue queue = (AMQQueue) queueSession.createQueue("MyQueue");

            assertEquals(queue.getExchangeName().toString(), "test.direct");

            AMQQueue tempQueue = (AMQQueue) queueSession.createTemporaryQueue();

            assertEquals(tempQueue.getExchangeName().toString(), "tmp.direct");

            queueSession.close();
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.