Examples of createTemporaryTopic()


Examples of javax.jms.TopicSession.createTemporaryTopic()

    public void testSendingSameMessage() throws Exception
    {
        AMQConnection conn = (AMQConnection) getConnection("guest", "guest");
        TopicSession session = conn.createTopicSession(true, Session.AUTO_ACKNOWLEDGE);
        TemporaryTopic topic = session.createTemporaryTopic();
        assertNotNull(topic);
        TopicPublisher producer = session.createPublisher(topic);
        MessageConsumer consumer = session.createConsumer(topic);
        conn.start();
        TextMessage sentMessage = session.createTextMessage("Test Message");
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

                    }
                };
                try {
                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
                    replyToConsumerSession.close();
                    bridge.setConsumerTopic(replyToConsumerTopic);
                    bridge.setProducerTopic(replyToProducerTopic);
                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

                    }
                };
                try {
                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
                    replyToConsumerSession.close();
                    bridge.setConsumerTopic(replyToConsumerTopic);
                    bridge.setProducerTopic(replyToProducerTopic);
                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

                    }
                };
                try {
                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
                    replyToConsumerSession.close();
                    bridge.setConsumerTopic(replyToConsumerTopic);
                    bridge.setProducerTopic(replyToProducerTopic);
                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

                    }
                };
                try {
                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
                    replyToConsumerSession.close();
                    bridge.setConsumerTopic(replyToConsumerTopic);
                    bridge.setProducerTopic(replyToProducerTopic);
                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

            AMQTopic topic = (AMQTopic) topicSession.createTopic("silly.topic");

            assertEquals(topic.getExchangeName().toString(), "test.topic");

            AMQTopic tempTopic = (AMQTopic) topicSession.createTemporaryTopic();

            assertEquals(tempTopic.getExchangeName().toString(), "tmp.topic");

            topicSession.close();
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

              return null;
            }
          };
          try{
            TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection).createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
            Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
            replyToConsumerSession.close();
            bridge.setConsumerTopic(replyToConsumerTopic);
            bridge.setProducerTopic(replyToProducerTopic);
            bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
            bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

              return null;
            }
          };
          try{
            TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection).createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
            Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
            replyToConsumerSession.close();
            bridge.setConsumerTopic(replyToConsumerTopic);
            bridge.setProducerTopic(replyToProducerTopic);
            bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
            bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
View Full Code Here

Examples of javax.jms.TopicSession.createTemporaryTopic()

            Topic t = (Topic)ctx.lookup(tn);
            Assert.assertNotNull("topic-handle", t);
            Assert.assertEquals("topic-handle-name", tn, t.getTopicName());

            TemporaryTopic tt = ts.createTemporaryTopic();

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

Examples of javax.jms.TopicSession.createTemporaryTopic()

      Topic topic = null;
      TopicConnection connection = factory.createTopicConnection();
      try
      {
         TopicSession s = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         topic = s.createTemporaryTopic();
         TopicConnection connection2 = factory.createTopicConnection();
         try
         {
            connection2.createConnectionConsumer(topic, "", MockServerSessionPool.getServerSessionPool(), 1);
            fail("Expected an error listening to a temporary destination from a different connection");
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.