Try OpenEdge Now
skip to main content
Messaging and ESB
Implementing Messaging : Working with messages : Creating, populating, and accessing messages : Read-only and write-only modes
 
Read-only and write-only modes
As in Java–JMS, the StreamMessage, TextMessage, XMLMessage, and BytesMessage are created in write-only mode. In write-only mode, an application can use only data-setting methods, not data-extraction methods.
The reset procedure puts the cursor before the first item of the message and transfers it to read-only mode.
Note: The publishprocedure , sendToQueueprocedure , and requestReplyprocedure call the reset procedure implicitly.
The message is received by the receiver in read-only mode. The clearBodyprocedure clears the message body and transfers the message to write-only mode.
Note: Read-only and write-only refer to the body of the message, not its header. Read-only and write-only modes do not apply to Header messages, which lack a body.
Unlike in Java–JMS, a MapMessage in the ABL–JMS implementation is always in read/write mode; there is no read-only or write-only mode for a MapMessage.
Note: The reset procedure has no effect when called on Map and Header messages.