Examples of createTemporaryTopic()


Examples of javax.jms.QueueSession.createTemporaryTopic()

    public void testQueueSessionCannotCreateTemporaryTopics() throws Exception
    {
        QueueSession queueSession = getQueueSession();
        try
        {
            queueSession.createTemporaryTopic();
            fail("expected exception did not occur");
        }
        catch (javax.jms.IllegalStateException s)
        {
            // PASS
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

   {
      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
      Connection conn = cf.createConnection();
      conn.setClientID("doesn't actually matter");
      Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      Topic temporaryTopic = s.createTemporaryTopic();

      try
      {
         s.createDurableSubscriber(temporaryTopic, "mySubscription");
         fail("this should throw exception");
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

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

      Session session = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      TemporaryTopic topic = session.createTemporaryTopic();

      topic.delete();

      disconnect();
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

      try
      {
         Session session = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         Topic topic = (Topic) context.lookup(TEST_TOPIC);
         TemporaryTopic temp = session.createTemporaryTopic();

         boolean caught = false;
         try
         {
            session.createConsumer(null);
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

      try
      {
         Session session = getSession();
         if (trace)
            log.trace("createTemporaryTopic " + session);
         TemporaryTopic temp = session.createTemporaryTopic();
         if (trace)
            log.trace("createdTemporaryTopic " + session + " temp=" + temp);
         sf.addTemporaryTopic(temp);
         return temp;
      }
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

    public void testDurableSubscribeWithTemporaryTopic() throws Exception
    {
        Connection conn = getConnection();
        conn.start();
        Session ssn = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Topic topic = ssn.createTemporaryTopic();
        try
        {
            ssn.createDurableSubscriber(topic, "test");
            fail("expected InvalidDestinationException");
        }
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

         ConnectionFactory cf1 = JMSUtil.createFactory(NettyConnectorFactory.class.getName(),
                                                       JMSServerControl2Test.CONNECTION_TTL,
                                                       JMSServerControl2Test.PING_PERIOD);
         Connection connection = cf1.createConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryTopic temporaryTopic = session.createTemporaryTopic();

         // create a regular message consumer
         MessageConsumer consumer = session.createConsumer(queue);

         jsonStr = control.listConnectionsAsJSON();
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("createTemporaryTopic " + session);
         }

         TemporaryTopic temp = session.createTemporaryTopic();

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("createdTemporaryTopic " + session + " temp=" + temp);
         }
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

         producerSession.close();

         try
         {
            producerSession.createTemporaryTopic();
            ProxyAssertSupport.fail("should throw exception");
         }
         catch (javax.jms.IllegalStateException e)
         {
            // OK
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

      {
         producerConnection = JMSTestCase.cf.createConnection();

         Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);

         TemporaryTopic tempTopic = producerSession.createTemporaryTopic();
         String topicName = tempTopic.getTopicName();

         try
         {
            JMSTestCase.ic.lookup("/topic/" + topicName);
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.