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 <strong>Advanced</strong> <strong>Queuing</strong><br />

}<br />

Message Format Transformation<br />

}<br />

You can define transformation mappings between different message payload types.<br />

Transformation mappings are defined as SQL expressions that can include PL/SQL<br />

functions (including callouts) and Java stored procedures. Only one-to-one message<br />

transformations are supported. The transformation engine is tightly integrated with<br />

<strong>Advanced</strong> <strong>Queuing</strong> to facilitate transformation of messages as they move through<br />

the database messaging system. Figure 8–1 shows how transformations are<br />

integrated with <strong>Advanced</strong> <strong>Queuing</strong>.<br />

Figure 8–1 Transformations Integrated with <strong>Advanced</strong> <strong>Queuing</strong><br />

Enqueue(M)<br />

Trans1<br />

Queue1<br />

Transformation mappings can be used during enqueue, dequeue, and propagation<br />

operations. To use a transformation at enqueue, the mapping is specified in the<br />

enqueue options. To use a transformation at dequeue, the mapping is specified<br />

either in the dequeue options or when you add a subscriber. A mapping specified in<br />

the dequeue options overrides a mapping specified with ADD_SUBSCRIBER. To use<br />

a transformation at propagation, the mapping is specified when you add a<br />

subscriber.<br />

PL/SQL (DBMS_TRANSFORM Package): Scenario and Code<br />

In the BooksOnLine application, assume that the order type is represented<br />

differently in the order entry and the shipping applications.<br />

8-6 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong><br />

M'<br />

M'<br />

M'<br />

Trans2<br />

Trans3<br />

M''<br />

M'''<br />

Dequeue(M'')<br />

Propagate(M''')<br />

Trans1<br />

Trans2<br />

Trans3<br />

(m, m')<br />

(m', m'')<br />

(m', m'')<br />

Where M, M', M'' and M''' are messages of<br />

types m, m', m'' and m''', respectively.

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

Saved successfully!

Ooh no, something went wrong!