Package javax.jms

Examples of javax.jms.QueueSession.createTemporaryQueue()


              return null;
            }
          };
          try{
            QueueSession replyToConsumerSession = ((QueueConnection)replyToConsumerConnection).createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
            Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue();
            replyToConsumerSession.close();
            bridge.setConsumerQueue(replyToConsumerQueue);
            bridge.setProducerQueue(replyToProducerQueue);
            bridge.setProducerConnection((QueueConnection)replyToProducerConnection);
            bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection);
View Full Code Here


            Queue q = (Queue)ctx.lookup(qn);
            Assert.assertNotNull("queue-handle", q);
            Assert.assertEquals("queue-handle-name", qn, q.getQueueName());

            TemporaryQueue tq = qs.createTemporaryQueue();

            try {
                ctx.lookup(tq.getQueueName());
                Assert.fail("temporary queue must not be exposed to jndi");
            } catch(javax.naming.NamingException ex) {
View Full Code Here

      {
         try
         {
            Queue queue = (Queue)context.lookup(TEST_QUEUE);
            QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            TemporaryQueue temp = session.createTemporaryQueue();
            Message message = session.createTextMessage();
            message.setJMSReplyTo(temp);

            QueueSender sender = session.createSender(queue);
            sender.send(message);
View Full Code Here

            Topic topic = (Topic)context.lookup(TEST_TOPIC);
            TopicSession session = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            Message message = session.createTextMessage();

            QueueSession qsession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            TemporaryQueue temp = qsession.createTemporaryQueue();
            message.setJMSReplyTo(temp);

            TopicPublisher publisher = session.createPublisher(topic);
            publisher.publish(message);
View Full Code Here

      try
      {
         MyMessageListener messageListener = new MyMessageListener();
        
         QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue1 = session.createTemporaryQueue();
         QueueSender sender1 = session.createSender(queue1);
         QueueReceiver receiver1 = session.createReceiver(queue1);
         receiver1.setMessageListener(messageListener);
         TemporaryQueue queue2 = session.createTemporaryQueue();
         QueueSender sender2 = session.createSender(queue2);
View Full Code Here

         QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue1 = session.createTemporaryQueue();
         QueueSender sender1 = session.createSender(queue1);
         QueueReceiver receiver1 = session.createReceiver(queue1);
         receiver1.setMessageListener(messageListener);
         TemporaryQueue queue2 = session.createTemporaryQueue();
         QueueSender sender2 = session.createSender(queue2);
         QueueReceiver receiver2 = session.createReceiver(queue2);
         receiver2.setMessageListener(messageListener);
         Message message = session.createMessage();
         queueConnection.start();
View Full Code Here

      Queue queue = null;
      QueueConnection connection = factory.createQueueConnection();
      try
      {
         QueueSession s = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         queue = s.createTemporaryQueue();
         QueueConnection connection2 = factory.createQueueConnection();
         try
         {
            connection2.createConnectionConsumer(queue, "", MockServerSessionPool.getServerSessionPool(), 1);
            fail("Expected an error listening to a temporary destination from a different connection");
View Full Code Here

   {
      connect();
      try
      {
         QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue temp = session.createTemporaryQueue();
         session.createConsumer(temp);
         session.close();
         session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         session.createConsumer(temp).close();
      }
View Full Code Here

   {
      connect();
      try
      {
         QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue temp = session.createTemporaryQueue();
         session.createConsumer(temp);
         disconnect();
         connect();
         session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         try
View Full Code Here

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

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

      queue.delete();

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