use of org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException in project activemq-artemis by apache.
the class ActiveMQMapMessage method setObject.
@Override
public void setObject(final String name, final Object value) throws JMSException {
checkName(name);
try {
TypedProperties.setObjectProperty(new SimpleString(name), value, map);
} catch (ActiveMQPropertyConversionException e) {
throw new MessageFormatException(e.getMessage());
}
invalid = true;
}
use of org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException in project activemq-artemis by apache.
the class ServerJMSMapMessage method setObject.
@Override
public void setObject(final String name, final Object value) throws JMSException {
try {
// primitives and String
Object val = value;
if (value instanceof UnsignedInteger) {
val = ((UnsignedInteger) value).intValue();
} else if (value instanceof UnsignedShort) {
val = ((UnsignedShort) value).shortValue();
} else if (value instanceof UnsignedByte) {
val = ((UnsignedByte) value).byteValue();
} else if (value instanceof UnsignedLong) {
val = ((UnsignedLong) value).longValue();
}
TypedProperties.setObjectProperty(new SimpleString(name), val, map);
} catch (ActiveMQPropertyConversionException e) {
throw new MessageFormatException(e.getMessage());
}
}
Aggregations