Examples of receiveNoWait()


Examples of javax.jms.TopicSubscriber.receiveNoWait()

         resource.rollback(xid1);

         xid1 = new MyXid();
         resource.start(xid1, XAResource.TMNOFLAGS);
         // Receive the message using "AutoAcknowledge"
         message = subscriber.receiveNoWait();
         if (message == null)
            fail("No message after rollback?");
         resource.end(xid1, XAResource.TMSUCCESS);
         resource.commit(xid1, true);
View Full Code Here

Examples of javax.jms.TopicSubscriber.receiveNoWait()

      //send it back
      sender2.publish(msg);

      msg = (TextMessage) subscriber1.receive(2000);
      assertTrue("Subscriber1 should get a message, got " + msg, msg != null && msg.getText().equals("Message"));
      assertTrue("Subscriber2 should not get a message", subscriber2.receiveNoWait() == null);

      topicConnection1.stop();
      topicConnection1.close();
      topicConnection2.stop();
      topicConnection2.close();
View Full Code Here

Examples of org.apache.activemq.MessageAvailableConsumer.receiveNoWait()

                    continue;
                }

                // Look for any available messages
                while (messages < maximumMessages) {
                    message = consumer.receiveNoWait();
                    if (message == null) {
                        break;
                    }
                    messages++;
                    String id = consumerIdMap.get(consumer);
View Full Code Here

Examples of org.apache.camel.ConsumerTemplate.receiveNoWait()

        assertEquals("Size should be 0", 0, template.getCurrentCacheSize());

        // test that we cache at most 500 consumers to avoid it eating to much memory
        for (int i = 0; i < 503; i++) {
            Endpoint e = context.getEndpoint("direct:queue:" + i);
            template.receiveNoWait(e);
        }

        assertEquals("Size should be 500", 500, template.getCurrentCacheSize());
        template.stop();
View Full Code Here

Examples of org.apache.camel.PollingConsumer.receiveNoWait()

        if (LOG.isDebugEnabled()) {
            LOG.debug("<<<< " + endpoint);
        }

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
View Full Code Here

Examples of org.jbpm.msg.db.DbMessageService.receiveNoWait()

        throw new ConfigurationException("CommandExecutorThread only works with the DbMessageService implementation of the MessageService. please, configure jbpm.cfg.xml accordingly.");
      }
      if (dbMessageService==null) {
        throw new ConfigurationException("no messaging service available");
      }
      message = dbMessageService.receiveNoWait(destination);
     
      if (message!=null) {
        checkForMoreMessages = true;
        Command command = (Command) message;
        log.trace("executing command '"+command+"'");
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.