WebLogic Messaging API Class Library |

# IMapMessage.SetObject Method

Sets an object value with the specified name into the Map.

This method works only for the objectified primitive object types (`int`, `double`, `long` ...), `String` objects, and byte arrays.

void SetObject(
String name,
Object value
);

#### Parameters

String
  key name under which object is to be stored
Object
  value to set in the Map

#### Remarks

Unsigned byte

    byte

Value will be stored as converted signed byte

    sbyte

instead of unsigned byte. This is because of java dot interoperability maintenence. Value will be converted back without any loss of data if

    GetUnsignedByte

method is used.

#### Exceptions

Exception Type | Condition
--- | ---
MessageException | if JMS fails to write the message due to some internal error.
ArgumentException | if the name is null or if the name is an empty string.
MessageFormatException | if the object is invalid.
MessageNotWriteableException | if the message is in read-only mode.

#### See Also

IMapMessage Interface | WebLogic.Messaging Namespace