Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Parameterized trigger - concurrency concerns

kaliantagMar 3 2015 — edited Mar 4 2015

Hi,


The current (test) trigger is :


CREATE OR REPLACE TRIGGER CHASSIS_DT_EVNT_AIUR_TRG_OLD AFTER DELETE OR INSERT OR UPDATE
OF ETA
ON CHASSITRANSPORTS
REFERENCING NEW
AS New OLD AS Old
FOR EACH ROW
DECLARE
BEGIN
  
INSERT INTO TS_CHASSIS_DATE_EVENTS (CHASSISNUMBER,DATETYPE,TRANSPORTLEGSORTORDER,OLDDATE,CREATEDBY,CREATEDDATE,UPDATEDBY,UPDATEDDATE) VALUES (:old.chassino,'ETA',:old.sortorder,:old.eta,'xyz',sysdate,'xyz',sysdate);

  EXCEPTION
  
WHEN OTHERS THEN
  
NULL;
END TS_CHASSIS_DT_EVNT_AIUR_TRG;

Now the 'CREATEDBY', 'UPDATEDBY' will be the web application users who have logged in and made the changes which caused the trigger execution, hence, these values need to be passed from the application.

The web application :

  1. Is deployed in Websphere Application Server where the datasources are configured
  2. As expected, is using db connection pooling

I read about Oracle Context but I'm not sure it can help in case of a web application.

My question is which approach mentioned in the doc. should I take to avoid the 'concurrency' issues i.e the updates by the app. users in multiple sessions at the application level as well the db level should not interfere with each other.

Thanks and regards.

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 1 2015
Added on Mar 3 2015
14 comments
2,145 views