Package javax.jms

Examples of javax.jms.QueueSession.createBrowser()


      //sender.send(queue, message, DeliveryMode.PERSISTENT, 10, 0);

      //message.setText("Expiring Persistent message");
      //sender.send(queue, message, DeliveryMode.NON_PERSISTENT, 4, 1);

      QueueBrowser browser = session.createBrowser(queue);
      Enumeration i = browser.getEnumeration();
      //message = (TextMessage)enum.nextElement();
      //if( !message.getText().equals("High Priority Persistent message") )
      //  throw new Exception("Queue is not prioritizing messages correctly. Unexpected Message:"+message);
      getLog().debug(message.getText());
View Full Code Here


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

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

      boolean caught = false;
      try
      {
View Full Code Here

                            ObjectName.getInstance(CONNECTION_FACTORY_NAME),
                            "$getResource");
                    qConnection = qConFactory.createQueueConnection();
                    qSession = qConnection.createQueueSession(false,
                            QueueSession.AUTO_ACKNOWLEDGE);
                    qBrowser = qSession.createBrowser(queue);
                    qConnection.start();
                    for (Enumeration e = qBrowser.getEnumeration(); e
                            .hasMoreElements();) {
                        Object o = e.nextElement();
                        ret.add(o);
View Full Code Here

                            JCA_MANAGED_CONNECTION_FACTORY_NAME,
                            "$getResource");
                    qConnection = qConFactory.createQueueConnection();
                    qSession = qConnection.createQueueSession(false,
                            QueueSession.AUTO_ACKNOWLEDGE);
                    qBrowser = qSession.createBrowser(queue);
                    qConnection.start();
                    for (Enumeration e = qBrowser.getEnumeration(); e
                            .hasMoreElements();) {
                        Object o = e.nextElement();
                        ret.add(o);
View Full Code Here

                    Utils.getTenantAwareCurrentUserName());
            queueSession = queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);

            // Create browser
            Queue queue = getDurableQueue(queueName, queueSession);
            queueBrowser = queueSession.createBrowser(queue);
            queueConnection.start();

            // Browse queue
            Enumeration messageEnumeration = queueBrowser.getEnumeration();
            List<Message> messageList = new ArrayList<Message>();
View Full Code Here

      //sender.send(queue, message, DeliveryMode.PERSISTENT, 10, 0);

      //message.setText("Expiring Persistent message");
      //sender.send(queue, message, DeliveryMode.NON_PERSISTENT, 4, 1);

      QueueBrowser browser = session.createBrowser(queue);
      Enumeration i = browser.getEnumeration();
      //message = (TextMessage)enum.nextElement();
      //if( !message.getText().equals("High Priority Persistent message") )
      //  throw new Exception("Queue is not prioritizing messages correctly. Unexpected Message:"+message);
      getLog().debug(message.getText());
View Full Code Here

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

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

      boolean caught = false;
      try
      {
View Full Code Here

                    }

                    String selector = "JMSPriority = 4";
                    QueueBrowser browser = null;
                    if (cmdline.exists("selector")) {
                        browser = session.createBrowser(queue, selector);
                    } else {
                        browser = session.createBrowser(queue);
                    }
                    // return the number of messages to receive
                    int count = -1;
View Full Code Here

                    String selector = "JMSPriority = 4";
                    QueueBrowser browser = null;
                    if (cmdline.exists("selector")) {
                        browser = session.createBrowser(queue, selector);
                    } else {
                        browser = session.createBrowser(queue);
                    }
                    // return the number of messages to receive
                    int count = -1;
                    if (cmdline.exists("count")) {
                        try {
View Full Code Here

          connection.start();

          //establish session
          Queue queue = (Queue) context.lookup("queue1");
          QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
          QueueBrowser browser = session.createBrowser(queue);

          Enumeration e = browser.getEnumeration();
          while (e.hasMoreElements()) {
            System.out.println("------------------------------------");
            Message msg = (Message)e.nextElement();
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.