code: public BatchReceiver getBatchReceiver(String queueName, long timeout){
          try {
              return new BatchReceiver((Queue) jmsServer.lookup(QUEUE_NAMESPACE + queueName), timeout, consumerConnection);
          } catch (Exception e) {
              throw new AsyncException(e);
          }
      }
docs: Generate a {@link BatchReceiver} to receive and process stored messages.
  This method ALWAYS works in the context of a transaction.
  
  @param queueName name of queue
  @param timeout timeout to wait.
  @return instance  of {@link BatchReceiver}.