Package javax.jms

Examples of javax.jms.Session.createBrowser()


         // create a connection to node 1
         conn = createConnectionOnServer(cf, 1);

         Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         QueueBrowser browser = session.createBrowser(queue[1]);

         Enumeration en = browser.getEnumeration();
         assertFalse(en.hasMoreElements());

         // send one persistent and one non-persistent message
View Full Code Here


         // create a connection to node 1
         conn = createConnectionOnServer(cf, 1);

         Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         QueueBrowser browser = session.createBrowser(queue[1]);

         Enumeration en = browser.getEnumeration();
         assertFalse(en.hasMoreElements());

         // register a failover listener
View Full Code Here

      if (HornetQRASession.trace)
      {
         HornetQRASession.log.trace("createBrowser " + session + " queue=" + queue);
      }

      QueueBrowser result = session.createBrowser(queue);

      if (HornetQRASession.trace)
      {
         HornetQRASession.log.trace("createdBrowser " + session + " browser=" + result);
      }
View Full Code Here

      if (HornetQRASession.trace)
      {
         HornetQRASession.log.trace("createBrowser " + session + " queue=" + queue + " selector=" + messageSelector);
      }

      QueueBrowser result = session.createBrowser(queue, messageSelector);

      if (HornetQRASession.trace)
      {
         HornetQRASession.log.trace("createdBrowser " + session + " browser=" + result);
      }
View Full Code Here

         prod.send(m);

         // Give the message time to reach the queue
         Thread.sleep(2000);

         QueueBrowser browser = session.createBrowser(HornetQServerTestCase.queue1);

         Enumeration e = browser.getEnumeration();

         TextMessage bm = (TextMessage)e.nextElement();
View Full Code Here

   {
      Connection conn = JMSTestCase.cf.createConnection();
      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      MessageConsumer consumer = sess.createConsumer(HornetQServerTestCase.topic1);
      MessageProducer producer = sess.createProducer(HornetQServerTestCase.topic1);
      sess.createBrowser(HornetQServerTestCase.queue1);
      Message m = sess.createMessage();

      conn.close();

      // Session
View Full Code Here

         Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         try
         {
            session.createBrowser(null);
            ProxyAssertSupport.fail("should throw exception");
         }
         catch (InvalidDestinationException e)
         {
            // OK
View Full Code Here

      {
         Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         try
         {
            ps.createBrowser(new Queue()
            {
               public String getQueueName() throws JMSException
               {
                  return "NoSuchQueue";
               }
View Full Code Here

         Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         MessageProducer producer = session.createProducer(HornetQServerTestCase.queue1);

         QueueBrowser browser = session.createBrowser(HornetQServerTestCase.queue1);

         ProxyAssertSupport.assertEquals(browser.getQueue(), HornetQServerTestCase.queue1);

         ProxyAssertSupport.assertNull(browser.getMessageSelector());
View Full Code Here

         Message m = session.createTextMessage("A");
         producer.send(m);

         // make sure we can browse it

         QueueBrowser browser = session.createBrowser(HornetQServerTestCase.queue1);

         Enumeration en = browser.getEnumeration();

         ProxyAssertSupport.assertTrue(en.hasMoreElements());
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.