The following code constructs a message, adds a Unicode field with a value
of "Hello World!" and the message is then put to the
SYSTEM.DEFAULT.LOCAL.QUEUE on
the local
HelloWorldQM queue manager.
public void put() throws Exception {
System.out.println("Putting the test message");
MQeMsgObject msg = new MQeMsgObject();
// Add my hello world text to the message.
msg.putUnicode("myFieldName" , "Hello World!");
myQueueManager.putMessage(queueManagerName,
MQe.System_Default_Queue_Name, msg, null, 0L);
System.out.println("Put the test message");
}