Package org.wijiscommons.ssaf.queue.impl

Examples of org.wijiscommons.ssaf.queue.impl.QueueMessageImpl


  public boolean receiveMessage(Message message) throws DropoffMailBoxException
  {
   
    boolean isMessageInsertedWithoutError = false;
    QueueMessage queueMessage = new QueueMessageImpl();
    Queue queue = null;
    DropoffMailBoxException de = null;
    String messageID = message.getMessageID();
    try {
     
      queue = QueueService.getQueue(provider.getInboundQueueName(message.getFolderSource()));
      queueMessage.setObject(message.getIncomingMessageXML());
      queueMessage.setMessageID(messageID);
      queueMessage.setBody("Inserting processed message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(false);
      isMessageInsertedWithoutError = true;
      getProcessesExecuted(message);

    }
    catch (SSAFAuthenticationException authentication)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(authentication);
    }
    catch (SSAFAuthorizationException authorization)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(authorization);
    }
    catch (SSAFValidationException validation)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(validation);
    }
    catch (Exception exception)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(exception);
    }
View Full Code Here

TOP

Related Classes of org.wijiscommons.ssaf.queue.impl.QueueMessageImpl

Copyright © 2018 www.massapicom. 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.