DBA Data[Home] [Help]

APPS.AD_CONC_SESSION_LOCKS dependencies on AD_WORKING_RES_LOCKS

Line 164: update AD_WORKING_RES_LOCKS set

160: where
161: session_id=sess_id;
162: --
163: --
164: update AD_WORKING_RES_LOCKS set
165: SESSION_STATUS='ACTIVE'
166: where
167: SESSION_ID=sess_id;
168: --

Line 324: update AD_WORKING_RES_LOCKS set

320: LAST_UPDATE_DATE=SYSDATE
321: where
322: SESSION_ID=sess_id;
323: --
324: update AD_WORKING_RES_LOCKS set
325: SESSION_STATUS='INACTIVE'
326: where
327: SESSION_ID=sess_id;
328: --

Line 387: from ad_working_res_locks wr, /* Requested */

383: end if;
384:
385: select distinct wl.session_id
386: bulk collect into x_conflict_session_ids
387: from ad_working_res_locks wr, /* Requested */
388: ad_working_res_locks wl /* Locked */
389: where wr.session_id = x_session_id and
390: wl.session_id <> x_session_id and /* Look at other sessions */
391: wl.resource_code = wr.resource_code and

Line 388: ad_working_res_locks wl /* Locked */

384:
385: select distinct wl.session_id
386: bulk collect into x_conflict_session_ids
387: from ad_working_res_locks wr, /* Requested */
388: ad_working_res_locks wl /* Locked */
389: where wr.session_id = x_session_id and
390: wl.session_id <> x_session_id and /* Look at other sessions */
391: wl.resource_code = wr.resource_code and
392: ( wl.appl_top_id = -5 or

Line 475: from ad_working_res_locks wr, /* Requested */

471: end if;
472:
473: select distinct wl.session_id
474: bulk collect into x_conflict_session_ids
475: from ad_working_res_locks wr, /* Requested */
476: ad_working_res_locks wl /* Locked */
477: where wr.session_id = x_session_id and
478: wl.session_id <> x_session_id and /* Look at other sessions */
479: wl.resource_code = wr.resource_code and

Line 476: ad_working_res_locks wl /* Locked */

472:
473: select distinct wl.session_id
474: bulk collect into x_conflict_session_ids
475: from ad_working_res_locks wr, /* Requested */
476: ad_working_res_locks wl /* Locked */
477: where wr.session_id = x_session_id and
478: wl.session_id <> x_session_id and /* Look at other sessions */
479: wl.resource_code = wr.resource_code and
480: ( wl.appl_top_id = -5 or

Line 785: -- ad_working_res_locks.

781: -- It shouldn't happen.
782: -- BASE_ERROR + 6 --> Exception,reading ad_planned_res_lock
783: -- BASE_ERROR + 7 --> Exception, reading ad_sessions.
784: -- BASE_ERROR + 8 --> Exception, inserting row in
785: -- ad_working_res_locks.
786: -- BASE_ERROR + 9 --> Exception updating ad_sessions.
787: -- BASE_ERROR + 10 --> Error, do_compatibility check failed
788: -- BASE_ERROR + 11 --> Stage_code = 'ACQUIRE_HELD' and
789: -- compatibility check -> incompatibility

Line 791: -- ad_working_res_locks

787: -- BASE_ERROR + 10 --> Error, do_compatibility check failed
788: -- BASE_ERROR + 11 --> Stage_code = 'ACQUIRE_HELD' and
789: -- compatibility check -> incompatibility
790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,
791: -- ad_working_res_locks
792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions
793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks

Line 795: -- ad_working_res_locks

791: -- ad_working_res_locks
792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions
793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks

Line 799: -- ad_working_res_locks

795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks
800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,
801: -- ad_working_res_locks
802: -- BASE_ERROR + 20 --> Unhandled exception
803: -- BASE_ERROR + 21 --> Error, Current Mode = X and Requested

Line 801: -- ad_working_res_locks

797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks
800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,
801: -- ad_working_res_locks
802: -- BASE_ERROR + 20 --> Unhandled exception
803: -- BASE_ERROR + 21 --> Error, Current Mode = X and Requested
804: -- mode = S in Promotion
805: -- BASE_ERROR + 22 --> Error, Locks need to be promoted is

Line 948: /* Request locks -> insert lock rows in ad_working_res_locks */

944:
945: held_lock := 1; /* Lock is held */
946:
947: if (try_again_flag = 0) then
948: /* Request locks -> insert lock rows in ad_working_res_locks */
949: begin
950: if (x_stage_code <> 'ACQUIRE_HELD') then
951: insert into ad_working_res_locks
952: (

Line 951: insert into ad_working_res_locks

947: if (try_again_flag = 0) then
948: /* Request locks -> insert lock rows in ad_working_res_locks */
949: begin
950: if (x_stage_code <> 'ACQUIRE_HELD') then
951: insert into ad_working_res_locks
952: (
953: session_id,
954: resource_code,
955: context,

Line 989: from ad_working_res_locks w

985: * (If the failure occurred in this procedure in
986: * the prior run)
987: */
988: select 'Already inserted'
989: from ad_working_res_locks w
990: where w.session_id = x_session_id and
991: w.resource_code = p.resource_code and
992: w.context = p.context and
993: w.appl_top_id = p.appl_top_id and

Line 1005: * ad_working_res_locks */

1001: when others then
1002: rollback;
1003: error_message := substr(sqlerrm, 1, 100);
1004: error_code := BASE_ERROR + 8; /* Error, inserting row in
1005: * ad_working_res_locks */
1006: goto acquire_error;
1007: end;
1008:
1009: /* Reset wait loop time */

Line 1072: update ad_working_res_locks set session_status = 'INACTIVE'

1068: /* de-activate session-row in DB */
1069: begin
1070: update ad_sessions set status = 'INACTIVE'
1071: where session_id = x_session_id;
1072: update ad_working_res_locks set session_status = 'INACTIVE'
1073: where session_id = x_session_id;
1074: commit work;
1075: error_code := BASE_ERROR + 11; /* Exit point */
1076: goto acquire_error;

Line 1082: * ad_working_res_locks */

1078: when others then
1079: rollback;
1080: error_message := substr(sqlerrm, 1, 100);
1081: error_code := BASE_ERROR + 12; /* Error, updating rows in
1082: * ad_working_res_locks */
1083: goto acquire_error;
1084: end;
1085:
1086: /* stage_code <> ACQUIRE_HELD */

Line 1109: update ad_working_res_locks set session_status = 'INACTIVE'

1105: begin
1106: update ad_sessions set control_code = null,
1107: status = 'INACTIVE'
1108: where session_id = x_session_id;
1109: update ad_working_res_locks set session_status = 'INACTIVE'
1110: where session_id = x_session_id;
1111: commit work;
1112: error_code := BASE_ERROR + 14;
1113: goto acquire_error;

Line 1119: * ad_sessions, ad_working_res_locks */

1115: when others then
1116: rollback;
1117: error_message := substr(sqlerrm, 1, 100);
1118: error_code := BASE_ERROR + 15; /* Error, updating
1119: * ad_sessions, ad_working_res_locks */
1120: goto acquire_error;
1121: end;
1122:
1123: /* control_code is not set to 'Q' */

Line 1142: update ad_working_res_locks set session_status = 'INACTIVE'

1138: /* De-activate session-row in DB */
1139: begin
1140: update ad_sessions set status = 'INACTIVE'
1141: where session_id = x_session_id;
1142: update ad_working_res_locks set session_status = 'INACTIVE'
1143: where session_id = x_session_id;
1144: commit work;
1145: error_code := BASE_ERROR + 2;
1146: goto acquire_error;

Line 1152: * ad_sessions, ad_working_res_locks */

1148: when others then
1149: rollback;
1150: error_message := substr(sqlerrm, 1, 100);
1151: error_code := BASE_ERROR + 17; /* Error, updating
1152: * ad_sessions, ad_working_res_locks */
1153: goto acquire_error;
1154: end;
1155: end if;
1156:

Line 1196: select count(*) into x_mode_count from ad_working_res_locks

1192: end loop;
1193:
1194: if (stage_code <> 'ACQUIRE_HELD') then
1195: begin
1196: select count(*) into x_mode_count from ad_working_res_locks
1197: where session_id = x_session_id and
1198: lock_mode = 'X';
1199:
1200: if (x_mode_count > 0) then

Line 1208: from ad_working_res_locks wr, -- Requested

1204: where
1205: nvl(any_change_while_inactive_flag,'N') <> 'Y' and
1206: session_id in (
1207: select distinct wl.session_id
1208: from ad_working_res_locks wr, -- Requested
1209: ad_working_res_locks wl -- Locked
1210: where wr.session_id = x_session_id and
1211: wl.session_id <> x_session_id and
1212: wl.resource_code = wr.resource_code and

Line 1209: ad_working_res_locks wl -- Locked

1205: nvl(any_change_while_inactive_flag,'N') <> 'Y' and
1206: session_id in (
1207: select distinct wl.session_id
1208: from ad_working_res_locks wr, -- Requested
1209: ad_working_res_locks wl -- Locked
1210: where wr.session_id = x_session_id and
1211: wl.session_id <> x_session_id and
1212: wl.resource_code = wr.resource_code and
1213: ( wl.appl_top_id = -5 or

Line 1234: select count(*) into x_lock_count from ad_working_res_locks

1230: wl.extra_context3 = wr.extra_context3 ) and
1231: wl.session_status = 'INACTIVE');
1232: end if;
1233:
1234: select count(*) into x_lock_count from ad_working_res_locks
1235: where (
1236: resource_code || ':' || context || ':' || appl_top_id || ':' ||
1237: language || ':' || extra_context1 || ':' ||
1238: extra_context2 || ':' || extra_context3 || ':' ||

Line 1276: from ad_working_res_locks where (

1272: language,
1273: extra_context1,
1274: extra_context2,
1275: extra_context3
1276: from ad_working_res_locks where (
1277: resource_code || ':' || context || ':' ||
1278: appl_top_id || ':' || language || ':' ||
1279: extra_context1 || ':' || extra_context2 || ':' ||
1280: extra_context3

Line 1301: update ad_working_res_locks set date_acquired = sysdate

1297: goto acquire_error;
1298: end if;
1299:
1300: /* Acquire resource locks here */
1301: update ad_working_res_locks set date_acquired = sysdate
1302: where session_id = x_session_id and in_process_flag = 'Y';
1303:
1304: /* Delete duplicate rows */
1305: delete from ad_working_res_locks where rowid in

Line 1305: delete from ad_working_res_locks where rowid in

1301: update ad_working_res_locks set date_acquired = sysdate
1302: where session_id = x_session_id and in_process_flag = 'Y';
1303:
1304: /* Delete duplicate rows */
1305: delete from ad_working_res_locks where rowid in
1306: (select w.rowid from ad_working_res_locks w,
1307: ad_working_res_locks p
1308: where w.session_id = x_session_id and
1309: w.session_id = p.session_id and

Line 1306: (select w.rowid from ad_working_res_locks w,

1302: where session_id = x_session_id and in_process_flag = 'Y';
1303:
1304: /* Delete duplicate rows */
1305: delete from ad_working_res_locks where rowid in
1306: (select w.rowid from ad_working_res_locks w,
1307: ad_working_res_locks p
1308: where w.session_id = x_session_id and
1309: w.session_id = p.session_id and
1310: w.resource_code = p.resource_code and

Line 1307: ad_working_res_locks p

1303:
1304: /* Delete duplicate rows */
1305: delete from ad_working_res_locks where rowid in
1306: (select w.rowid from ad_working_res_locks w,
1307: ad_working_res_locks p
1308: where w.session_id = x_session_id and
1309: w.session_id = p.session_id and
1310: w.resource_code = p.resource_code and
1311: w.context = p.context and

Line 1320: update ad_working_res_locks set in_process_flag = 'N'

1316: w.extra_context3 = p.extra_context3 and
1317: w.rowid <> p.rowid and
1318: w.in_process_flag = 'N');
1319:
1320: update ad_working_res_locks set in_process_flag = 'N'
1321: where session_id = x_session_id and in_process_flag = 'Y';
1322:
1323: update ad_planned_res_locks set done_flag = 'N' where
1324: session_id = x_session_id and stage_code = x_stage_code;

Line 1501: delete from ad_working_res_locks where (

1497: /* Release or Demote locks */
1498: begin
1499: if (x_stage_code is not null) then
1500:
1501: delete from ad_working_res_locks where (
1502: resource_code || ':' || context || ':' || appl_top_id || ':' ||
1503: language || ':' || extra_context1 || ':' ||
1504: extra_context2 || ':' || extra_context3
1505: in

Line 1535: update ad_working_res_locks set lock_mode = 'S' where (

1531: where session_id = x_session_id and
1532: stage_code = x_stage_code and
1533: action_flag = 'D';
1534:
1535: update ad_working_res_locks set lock_mode = 'S' where (
1536: resource_code || ':' || context || ':' || appl_top_id || ':' ||
1537: language || ':' || extra_context1 || ':' ||
1538: extra_context2 || ':' || extra_context3
1539: in

Line 1560: delete from ad_working_res_locks where session_id = x_session_id;

1556:
1557: update ad_planned_res_locks set done_flag = 'Y' where
1558: session_id = x_session_id and stage_code = x_stage_code;
1559: else
1560: delete from ad_working_res_locks where session_id = x_session_id;
1561: end if;
1562: commit;
1563: exception
1564: when others then