Example usage for javax.jms JMSSecurityException JMSSecurityException

List of usage examples for javax.jms JMSSecurityException JMSSecurityException

Introduction

In this page you can find the example usage for javax.jms JMSSecurityException JMSSecurityException.

Prototype

public JMSSecurityException(String reason, String errorCode) 

Source Link

Document

Constructs a JMSSecurityException with the specified reason and error code.

Usage

From source file:com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.java

private JMSException handleException(AmazonClientException e, String operationName) throws JMSException {
    JMSException jmsException;//from w ww  . j  ava  2s . c o  m
    if (e instanceof AmazonServiceException) {
        AmazonServiceException se = (AmazonServiceException) e;

        if (e instanceof QueueDoesNotExistException) {
            jmsException = new InvalidDestinationException(logAndGetAmazonServiceException(se, operationName),
                    se.getErrorCode());
        } else if (isJMSSecurityException(se)) {
            jmsException = new JMSSecurityException(logAndGetAmazonServiceException(se, operationName),
                    se.getErrorCode());
        } else {
            jmsException = new JMSException(logAndGetAmazonServiceException(se, operationName),
                    se.getErrorCode());
        }

    } else {
        jmsException = new JMSException(logAndGetAmazonClientException(e, operationName));
    }
    jmsException.initCause(e);
    return jmsException;
}