09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

General Features of JMS<br />

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

may also be written generically as objects. To use Bytes Messages, create the queue<br />

table with SYS.AQ$_JMS_BYTES_MESSAGE or AQ$_JMS_MESSAGE payload types.<br />

Map Message<br />

A MapMessage is used to send a set of name-value pairs where names are Strings<br />

and values are Java primitive types. The entries can be accessed sequentially or<br />

randomly by name. The order of the entries is undefined. It inherits from Message<br />

and adds a map message body. The primitive types can be read or written explicitly<br />

using methods for each type. They may also be read or written generically as<br />

objects.<br />

To use Map Messages, create the queue table with the SYS.AQ$_JMS_MAP_<br />

MESSAGE or AQ$_JMS_MESSAGE payload types. Map messages support the<br />

following conversion table. A value written as the row type can be read as the<br />

column type.<br />

Table 12–5 Map 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 />

Text Message<br />

A TextMessage is used to send a message containing a<br />

java.lang.StringBuffer. It inherits from Message and adds a text message<br />

body. The text information can be read or written using methods getText() and<br />

setText(...). To use Text Messages, create the queue table with the SYS.AQ$_<br />

JMS_TEXT_MESSAGE or AQ$_JMS_MESSAGE payload types.<br />

12-28 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

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

Saved successfully!

Ooh no, something went wrong!