/** * Sets the serializable object containing this message's data. It is * important to note that an <CODE>ObjectMessage</CODE> contains a * snapshot of the object at the time <CODE>setObject()</CODE> is called; * subsequent modifications of the object will have no effect on the * <CODE>ObjectMessage</CODE> body. * * @param newObject the message's data * @throws JMSException if the JMS provider fails to set the object due to * some internal error. * @throws javax.jms.MessageFormatException if object serialization fails. * @throws javax.jms.MessageNotWriteableException if the message is in * read-only mode. */ @Override public void setObject(Serializable newObject) throws JMSException { checkReadOnlyBody(); this.object = newObject; setContent(null); ActiveMQConnection connection = getConnection(); if (connection == null || !connection.isObjectMessageSerializationDefered()) { storeContent(); } }
/** * Sets the serializable object containing this message's data. It is * important to note that an <CODE>ObjectMessage</CODE> contains a * snapshot of the object at the time <CODE>setObject()</CODE> is called; * subsequent modifications of the object will have no effect on the * <CODE>ObjectMessage</CODE> body. * * @param newObject the message's data * @throws JMSException if the JMS provider fails to set the object due to * some internal error. * @throws javax.jms.MessageFormatException if object serialization fails. * @throws javax.jms.MessageNotWriteableException if the message is in * read-only mode. */ @Override public void setObject(Serializable newObject) throws JMSException { checkReadOnlyBody(); this.object = newObject; setContent(null); ActiveMQConnection connection = getConnection(); if (connection == null || !connection.isObjectMessageSerializationDefered()) { storeContent(); } }
/** * Sets the serializable object containing this message's data. It is * important to note that an <CODE>ObjectMessage</CODE> contains a * snapshot of the object at the time <CODE>setObject()</CODE> is called; * subsequent modifications of the object will have no effect on the * <CODE>ObjectMessage</CODE> body. * * @param newObject the message's data * @throws JMSException if the JMS provider fails to set the object due to * some internal error. * @throws javax.jms.MessageFormatException if object serialization fails. * @throws javax.jms.MessageNotWriteableException if the message is in * read-only mode. */ public void setObject(Serializable newObject) throws JMSException { checkReadOnlyBody(); this.object = newObject; setContent(null); ActiveMQConnection connection = getConnection(); if (connection == null || !connection.isObjectMessageSerializationDefered()) { storeContent(); } }
/** * Sets the serializable object containing this message's data. It is * important to note that an <CODE>ObjectMessage</CODE> contains a * snapshot of the object at the time <CODE>setObject()</CODE> is called; * subsequent modifications of the object will have no effect on the * <CODE>ObjectMessage</CODE> body. * * @param newObject the message's data * @throws JMSException if the JMS provider fails to set the object due to * some internal error. * @throws javax.jms.MessageFormatException if object serialization fails. * @throws javax.jms.MessageNotWriteableException if the message is in * read-only mode. */ @Override public void setObject(Serializable newObject) throws JMSException { checkReadOnlyBody(); this.object = newObject; setContent(null); ActiveMQConnection connection = getConnection(); if (connection == null || !connection.isObjectMessageSerializationDefered()) { storeContent(); } }
/** * Sets the serializable object containing this message's data. It is * important to note that an <CODE>ObjectMessage</CODE> contains a * snapshot of the object at the time <CODE>setObject()</CODE> is called; * subsequent modifications of the object will have no effect on the * <CODE>ObjectMessage</CODE> body. * * @param newObject the message's data * @throws JMSException if the JMS provider fails to set the object due to * some internal error. * @throws javax.jms.MessageFormatException if object serialization fails. * @throws javax.jms.MessageNotWriteableException if the message is in * read-only mode. */ @Override public void setObject(Serializable newObject) throws JMSException { checkReadOnlyBody(); this.object = newObject; setContent(null); ActiveMQConnection connection = getConnection(); if (connection == null || !connection.isObjectMessageSerializationDefered()) { storeContent(); } }