Examples of createTemporaryTopic()


Examples of javax.jms.Session.createTemporaryTopic()

     {
       producerConnection = cf.createConnection();

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

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

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

      //
      // Create the destination on which messages are being tested.
      //

    LOG.trace("Creating destination");
    cons_dest = sess.createTemporaryTopic();

    testOneDest(conn, sess, cons_dest, prod_broker_url, cons_broker_url, num_msg);


      //
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

        Connection conn = factory.createConnection("guest", "password");
        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        String name = "org.apache.activemq:BrokerName=localhost,Type=TempTopic";
        try {
            conn.start();
            TemporaryTopic temp = sess.createTemporaryTopic();
            name += ",Destination=" + temp.getTopicName().replaceAll(":", "_");
            fail("Should have failed creating a temp topic");
        } catch (Exception ignore) {}
       
        ObjectName objName = new ObjectName(name);
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

    public void testCreateTemporaryQueue() throws Exception {
        connection = createConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = session.createTemporaryQueue();
        assertTrue("No queue created!", queue != null);
        Topic topic = session.createTemporaryTopic();
        assertTrue("No topic created!", topic != null);
    }

    public void testTryToReproduceNullPointerBug() throws Exception {
        String url = bindAddress;
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

    public void testCreateTemporaryQueue() throws Exception {
        connection = createConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = session.createTemporaryQueue();
        assertTrue("No queue created!", queue != null);
        Topic topic = session.createTemporaryTopic();
        assertTrue("No topic created!", topic != null);
    }

    public void testTryToReproduceNullPointerBug() throws Exception {
        String url = bindAddress;
View Full Code Here

Examples of javax.jms.Session.createTemporaryTopic()

        ConnectionFactory factory=createConnectionFactory();
        Connection connection=factory.createConnection();
        for(int i=0;i<MESSAGE_COUNT;i++){
          
            Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
            Destination dest=session.createTemporaryTopic();
            MessageConsumer mc=session.createConsumer(dest);
            MessageProducer mp=session.createProducer(dest);
            Message msg=session.createTextMessage("test"+i);
            mp.send(msg);
            session.close();
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()

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

      Session session = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      TemporaryTopic topic = session.createTemporaryTopic();
      MessageProducer publisher = session.createProducer(topic);
      topic.delete();

      TextMessage message = session.createTextMessage("hello");
      boolean caught = false;
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
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.