09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

General Features of JMS<br />

Stream Message<br />

A StreamMessage is used to send a stream of Java primitives. It is filled and read<br />

sequentially. It inherits from Message and adds a stream message body. Its methods<br />

are based largely on those found in java.io.DataInputStream and<br />

java.io.DataOutputStream.<br />

The primitive types can be read or written explicitly using methods for each type.<br />

They may also be read or written generically as objects. To use Stream Messages,<br />

create the queue table with the SYS.AQ$_JMS_STREAM_MESSAGE or AQ$_JMS_<br />

MESSAGE payload types.<br />

Stream messages support the following conversion table. A value written as the row<br />

type can be read as the column type.<br />

Table 12–4 Stream Message Conversion<br />

boolean byte short char int long float double String byte[]<br />

boolean X - - - - - - - X -<br />

byte - X X - X X - - X -<br />

short - - X - X X - - X -<br />

char - - - X - - - - X -<br />

int - - - - X X - - X -<br />

long - - - - - X - - X -<br />

float - - - - - - X X X -<br />

double - - - - - - - X X -<br />

String X X X X X X X X X -<br />

byte[] - - - - - - - - - X<br />

Bytes Message<br />

A BytesMessage is used to send a message containing a stream of uninterpreted<br />

bytes. It inherits Message and adds a bytes message body. The receiver of the<br />

message supplies the interpretation of the bytes. Its methods are based largely on<br />

those found in java.io.DataInputStream and<br />

java.io.DataOutputStream.<br />

This message type is for client encoding of existing message formats. If possible,<br />

one of the other self-defining message types should be used instead.<br />

Creating Applications Using JMS 12-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!