コード例 #1
0
  @Override
  @TransactionAttribute(REQUIRED)
  public void onMessage(javax.jms.Message jmsMessage) {
    if (!isInitialized()) return;

    try {
      Event event = MessageUtil.getPart(jmsMessage, "event");

      // validate the message
      eventLoggerContext.initializeContext(jmsMessage);
      eventLoggerContext.validate(event);

      // handle the message
      logEventHandler.logEvent(event);

    } catch (Throwable e) {
      log.error(e);
      // TODO send this exception to "invalid" queue
      eventLoggerContext.fire_LogEvent_incoming_request_aborted(e);
    }
  }
コード例 #2
0
 @Override
 protected void validate(Message message) {
   Event event = message.getPart("event");
   eventLoggerContext.validate(event);
 }