Database Reference
In-Depth Information
Refactoring the DB-centric Fusion Application
Some of the presented actions can be achieved by standard OEBS components—XML
Gateway, Oracle Application Service Adapters, and BES. We will rely on them as well, but
again, our main goal here is to demonstrate how to avoid building the Adapter framework
and how to utilize service taxonomy, which we presented in the previous chapter. Then you
will be able to roll it up on any DB, simplify the DB Adapter framework, and have better
understanding of the internal BES structure of OEBS.
Events registration
The table mutation problem as a first task can be solved quite quickly and drastically, al-
though not everyone will be happy about the radical approach: we just remove all triggers
from every Entity business table and implant only one Universal trigger, presented as fol-
lows:
CREATE OR REPLACE TRIGGER XXCU.XXCU_EHS_REGEVENT_TRG
BEFORE DELETE OR INSERT OR UPDATE ON
XXCU.XXCU_EHS_TESTADDRESS
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
DECLARE
new_trgBasicEvent XXCU_EHS_EVENT.BasicEvent_rec;
msgtype varchar2(20) := 'ERR';
msgid varchar2(20);
msgtext varchar2(2000);
msgsrc varchar2(200):=
'XXCU_EHS_REGEVENT_TRG.register_event';
BEGIN
new_trgBasicEvent.v_srcref_type := 0;
new_trgBasicEvent.v_object_name := 'ADDRESS';
new_trgBasicEvent.v_objectkey_name := 'ADDDRESS_ID';
new_trgBasicEvent.v_objref_data := :NEW.ADDDRESS_ID;
new_trgBasicEvent.v_objref_group := 'EHS';
new_trgBasicEvent.v_objref_processed := 'N';
new_trgBasicEvent.v_objref_detected := 'N';
new_trgBasicEvent.v_job_id := 9999;
new_trgBasicEvent.v_status := 1;
new_trgBasicEvent.v_retry_attempts := 0;
Search WWH ::




Custom Search