Example usage for javax.jms MessageNotWriteableException MessageNotWriteableException

List of usage examples for javax.jms MessageNotWriteableException MessageNotWriteableException

Introduction

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

Prototype

public MessageNotWriteableException(String reason) 

Source Link

Document

Constructs a MessageNotWriteableException with the specified reason.

Usage

From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java

void checkCanWrite() throws JMSException {
    if (dataOut == null) {
        throw new MessageNotWriteableException("Message is not writeable");
    }/*from ww  w .j  av a  2 s .c o m*/
}

From source file:org.apache.rocketmq.jms.msg.RocketMQMessage.java

protected void checkIsWriteOnly() throws MessageNotWriteableException {
    if (!writeOnly) {
        throw new MessageNotWriteableException("Not writable");
    }//from w w  w  . j  av a 2  s .c  o m
}