Database Reference
In-Depth Information
Association can be based on the rootnode element's name. It will be recognized after pars-
ing of the incoming message. As long as every message has a unique root (and that's true
for all canonical messages), the message ID will be recognized by a simple lookup on
ESR's message definition table, where every message (ID) is connected to the parsing
routine, registered in the ESR Service/Task table as parser. The developer is responsible
for the proper declaration of the construction and parsing tasks in the Service/Task entity
table and linking them to the canonical message (or any, in that matter). Another, and
probably more correct, way of message recognition would be the parsing of the msg_ID
element in the message header. Naturally, XPath is static for this element. You can see one
of the possible realizations in the following code snippet:
v_rootElementName:=XDB.DBMS_XMLDOM.getLocalName(XDB.DBMS_XMLDOM.getDocumentElement(v_eventDOM));msgtext
:= 'Root node detected :'||v_rootElementName;
XXCU_COMMON_LOG_RT.msglog(msgtype, msgtext, msgcode,
usermsg, msgsrc, v_parsejob_id);v_msgid :=
XXCU_INTF_MESSAGE.get_msgidbyroot(ltrim(rtrim(v_rootElementName)));
v_parser := XXCU_INTF_MESSAGE.get_msgparser(v_msgid);
When a parser is recognized, it can be dynamically invoked using the NDS functionality,
as shown in the following code:
//invoking parser
execute immediate 'BEGIN '||v_parser||'(:1, :2, :3, :4 );
END;' USING IN ip_lob, IN v_msgid, OUT v_status, OUT
v_status_text;
Actually this type of dynamism would not be needed if we establish an individual queue
handler for every TPs inbound queue. In this case, we will do inline message parsing to-
gether with dequeueing and all business API as a last step.
Some notes regarding universal endpoints handling are as follows:
• A few words about the DBMS_AQ package would be in order. We mentioned that
the functionality is fairly simple, and it is actually, for the Oracle DB Standard/
Enterprise editions, at least. A complete solution will work perfectly on XE as
well, but AQ functionality is a bit tricky (Java is required), so we advise you to
look for the very elegant solution on the AMIS Technology Blog (actually, you
can find it in many places). Thus, you will have several AQ handling functions in
your endpoint dispatcher.
Search WWH ::




Custom Search