private void sendJsonResponse(final String jsonResponse){
  if (replyDestination == null) {
    LOG.error("sendJsonResponse() : JMSReplyTo destination is null - cannot send reply.");
    return;
  }
  MessageProducer messageProducer=null;
  try {
    messageProducer=session.createProducer(replyDestination);
    messageProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    messageProducer.setTimeToLive(defaultReplyTTL);
    Message replyMessage=null;
    replyMessage=session.createTextMessage(jsonResponse);
    messageProducer.send(replyMessage);
    if (LOG.isDebugEnabled()) {
      LOG.debug("ClientRequestReportHandler() : Report sent.");
    }
  }
 catch (  Throwable e) {
    LOG.warn("daqTotalParts(): Failed to send Progress report :" + e.getMessage(),e);
  }
 finally {
    if (messageProducer != null) {
      try {
        messageProducer.close();
      }
 catch (      JMSException ignore) {
      }
    }
  }
}

private void sendJsonResponse ( final String jsonResponse ) { if ( replyDestination == null ) { LOG . error ( "sendJsonResponse() : JMSReplyTo destination is null - cannot send reply." ) ; return ; } MessageProducer messageProducer = null ; try { messageProducer = session . createProducer ( replyDestination ) ; messageProducer . setDeliveryMode ( DeliveryMode . NON_PERSISTENT ) ; messageProducer . setTimeToLive ( defaultReplyTTL ) ; Message replyMessage = null ; replyMessage = session . createTextMessage ( jsonResponse ) ; messageProducer . send ( replyMessage ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "ClientRequestReportHandler() : Report sent." ) ; } } catch ( Throwable e ) { LOG . warn ( "daqTotalParts(): Failed to send Progress report :" + e . getMessage ( ) , e ) ; } finally { if ( messageProducer != null ) { try { messageProducer . close ( ) ; } catch ( JMSException ignore ) { } } } }
reports are sent to the clients as json messages .
