Package javax.jms

Examples of javax.jms.MessageNotWriteableException


   protected void checkWrite() throws JMSException
   {
      if (readOnly)
      {
         throw new MessageNotWriteableException("Message is read-only");
      }
   }
View Full Code Here


   {
      if (propertiesReadOnly)
      {
         if (name.equals(HornetQJMSConstants.JMS_HORNETQ_INPUT_STREAM))
         {
            throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + HornetQJMSConstants.JMS_HORNETQ_OUTPUT_STREAM +
                                                   " or " +
                                                   HornetQJMSConstants.JMS_HORNETQ_SAVE_STREAM +
                                                   "?");
         }
         else
         {
            throw new MessageNotWriteableException("Message is read-only");
         }
      }

      if (name == null)
      {
View Full Code Here

    protected void checkWritable() throws MessageNotWriteableException
    {
        if (isReadOnly())
        {
            throw new MessageNotWriteableException("You need to call clearBody() to make the message writable");
        }
    }
View Full Code Here

        setObjectProperty(name, value);
    }

    private void checkReadOnlyProperties() throws MessageNotWriteableException {
        if (readOnlyProperties) {
            throw new MessageNotWriteableException("Message properties are read-only");
        }
    }
View Full Code Here

        }
    }

    protected void checkReadOnlyBody() throws MessageNotWriteableException {
        if (readOnlyBody) {
            throw new MessageNotWriteableException("Message body is read-only");
        }
    }
View Full Code Here

    protected void checkWritableProperties() throws MessageNotWriteableException
    {
        if (_readableProperties)
        {
            throw new MessageNotWriteableException("You need to call clearProperties() to make the message writable");
        }
    }
View Full Code Here

   }

   public void writeBoolean(boolean value) throws JMSException
   {
      if (bodyReadOnly)
         throw new MessageNotWriteableException("The message body is readonly");
      bodyChange();
      ((StreamMessage)message).writeBoolean(value);
   }
View Full Code Here

   }

   public void writeByte(byte value) throws JMSException
   {
      if (bodyReadOnly)
         throw new MessageNotWriteableException("The message body is readonly");
      bodyChange();
      ((StreamMessage)message).writeByte(value);
   }
View Full Code Here

   }
  
   public void writeBytes(byte[] value) throws JMSException
   {
      if (bodyReadOnly)
         throw new MessageNotWriteableException("The message body is readonly");
      bodyChange();
      ((StreamMessage)message).writeBytes(value);
   }
View Full Code Here

   }
  
   public void writeBytes(byte[] value, int offset, int length) throws JMSException
   {
      if (bodyReadOnly)
         throw new MessageNotWriteableException("The message body is readonly");
      bodyChange();
      ((StreamMessage)message).writeBytes(value, offset, length);
   }
View Full Code Here

TOP

Related Classes of javax.jms.MessageNotWriteableException

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.