268: /* GL_BC_PACKET_ARRIVAL_ORDER */
269: /* GL_BC_OPTIONS */
270: /* GL_BC_OPTION_DETAILS */
271: /* GL_BC_PERIOD_MAP */
272: /* GL_BC_DUAL */
273: /* GL_BC_DUAL2 */
274: /* GL_CONCURRENCY_CONTROL */
275: /* GL_PERIOD_STATUSES */
276: /* GL_LOOKUPS */
269: /* GL_BC_OPTIONS */
270: /* GL_BC_OPTION_DETAILS */
271: /* GL_BC_PERIOD_MAP */
272: /* GL_BC_DUAL */
273: /* GL_BC_DUAL2 */
274: /* GL_CONCURRENCY_CONTROL */
275: /* GL_PERIOD_STATUSES */
276: /* GL_LOOKUPS */
277: /* GL_USSGL_TRANSACTION_CODES */
3086: end if; -- g_fcmode <> 'U'
3087:
3088:
3089: -- Prior to inserting Summary Transactions for the packet, we lock the
3090: -- dummy table gl_bc_dual2 in row share mode to ensure data consistency
3091: -- between the Funds Checker Summarization and the Add/Delete Summary
3092: -- Accounts process. This ensures that that only one process will
3093: -- summarize the transactions in the queue
3094:
3091: -- between the Funds Checker Summarization and the Add/Delete Summary
3092: -- Accounts process. This ensures that that only one process will
3093: -- summarize the transactions in the queue
3094:
3095: -- When a lock on gl_bc_dual2 is not available then
3096: --
3097: -- if Funds Checker is invoked from a Concurrent Process, it waits
3098: --
3099: -- if Funds Checker is invoked from an Online Process, it exits with
3102:
3103: if g_conc_flag then
3104: -- =========================== FND LOG ===========================
3105: psa_utils.debug_other_string(g_state_level,l_full_path,
3106: ' Lock gl_bc_dual2 in row share mode' );
3107: -- ========================= FND LOG =============================
3108: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE;
3109: else
3110: -- =========================== FND LOG ===========================
3104: -- =========================== FND LOG ===========================
3105: psa_utils.debug_other_string(g_state_level,l_full_path,
3106: ' Lock gl_bc_dual2 in row share mode' );
3107: -- ========================= FND LOG =============================
3108: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE;
3109: else
3110: -- =========================== FND LOG ===========================
3111: psa_utils.debug_other_string(g_state_level,l_full_path,
3112: ' Lock gl_bc_dual2 in row share mode nowait' );
3108: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE;
3109: else
3110: -- =========================== FND LOG ===========================
3111: psa_utils.debug_other_string(g_state_level,l_full_path,
3112: ' Lock gl_bc_dual2 in row share mode nowait' );
3113: -- ========================= FND LOG =============================
3114: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3115: end if;
3116:
3110: -- =========================== FND LOG ===========================
3111: psa_utils.debug_other_string(g_state_level,l_full_path,
3112: ' Lock gl_bc_dual2 in row share mode nowait' );
3113: -- ========================= FND LOG =============================
3114: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3115: end if;
3116:
3117:
3118: -- Insert Summary Transactions for the Packet. Summarization Grouping is
3344: -- Commit to release Lock on gl_concurrency_control
3345: commit;
3346:
3347:
3348: -- Since the previous Commit has also released the lock on gl_bc_dual2, we
3349: -- need to reestablish the lock to maintain data consistency between the
3350: -- Funds Checker Summarization and the Add/Delete Summary Accounts
3351: -- process
3352:
3351: -- process
3352:
3353: -- =========================== FND LOG ===========================
3354: psa_utils.debug_other_string(g_state_level,l_full_path,
3355: ' lock table gl_bc_dual2 in row share mode nowait');
3356: -- ========================= FND LOG =============================
3357:
3358: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3359:
3354: psa_utils.debug_other_string(g_state_level,l_full_path,
3355: ' lock table gl_bc_dual2 in row share mode nowait');
3356: -- ========================= FND LOG =============================
3357:
3358: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3359:
3360: -- =========================== FND LOG ===========================
3361: psa_utils.debug_other_string(g_state_level,l_full_path,
3362: ' RETURN -> TRUE ');
3455: -- =========================== FND LOG ===========================
3456: -- psa_utils.debug_other_string(g_state_level,l_full_path, ' l_max_packet_id -> '|| l_max_packet_id );
3457: -- ========================= FND LOG =============================
3458:
3459: -- Lock dummy table gl_bc_dual in Row Share Mode to ensure Read Consistency
3460: -- between gl_bc_packets and gl_balances in the next two balance update
3461: -- SQLs. This scheme requires posting to lock gl_bc_dual in exclusive mode
3462: -- before it commits, and to wait in a sleep cycle of 15 seconds until all
3463: -- the Funds Check processes release the locks. This prevents the Funds
3457: -- ========================= FND LOG =============================
3458:
3459: -- Lock dummy table gl_bc_dual in Row Share Mode to ensure Read Consistency
3460: -- between gl_bc_packets and gl_balances in the next two balance update
3461: -- SQLs. This scheme requires posting to lock gl_bc_dual in exclusive mode
3462: -- before it commits, and to wait in a sleep cycle of 15 seconds until all
3463: -- the Funds Check processes release the locks. This prevents the Funds
3464: -- Checker from counting the Balances twice, in case Posting Commits in
3465: -- between the two SQLs, and some of the pending balances got transferred
3465: -- between the two SQLs, and some of the pending balances got transferred
3466: -- to gl_balances, where the funds checker would mistakenly treat them as
3467: -- Posted Balances in the second SQL
3468:
3469: -- When a lock on gl_bc_dual is not available then
3470: --
3471: -- if Funds Checker is invoked from a Concurrent Process, it waits
3472: --
3473: -- if Funds Checker is invoked from an Online Process, it exits with
3475:
3476: if g_conc_flag then
3477: -- =========================== FND LOG ===========================
3478: psa_utils.debug_other_string(g_state_level,l_full_path,
3479: ' Lock table gl_bc_dual in row share mode' );
3480: -- ========================= FND LOG =============================
3481: LOCK TABLE gl_bc_dual IN ROW SHARE MODE;
3482: else
3483: -- =========================== FND LOG ===========================
3477: -- =========================== FND LOG ===========================
3478: psa_utils.debug_other_string(g_state_level,l_full_path,
3479: ' Lock table gl_bc_dual in row share mode' );
3480: -- ========================= FND LOG =============================
3481: LOCK TABLE gl_bc_dual IN ROW SHARE MODE;
3482: else
3483: -- =========================== FND LOG ===========================
3484: psa_utils.debug_other_string(g_state_level,l_full_path,
3485: ' Lock table gl_bc_dual in row share mode NOWAIT' );
3481: LOCK TABLE gl_bc_dual IN ROW SHARE MODE;
3482: else
3483: -- =========================== FND LOG ===========================
3484: psa_utils.debug_other_string(g_state_level,l_full_path,
3485: ' Lock table gl_bc_dual in row share mode NOWAIT' );
3486: -- ========================= FND LOG =============================
3487: LOCK TABLE gl_bc_dual IN ROW SHARE MODE NOWAIT;
3488: end if;
3489:
3483: -- =========================== FND LOG ===========================
3484: psa_utils.debug_other_string(g_state_level,l_full_path,
3485: ' Lock table gl_bc_dual in row share mode NOWAIT' );
3486: -- ========================= FND LOG =============================
3487: LOCK TABLE gl_bc_dual IN ROW SHARE MODE NOWAIT;
3488: end if;
3489:
3490:
3491: -- Update Approved and Pending Balances in gl_bc_packets
3886: psa_utils.debug_other_string(g_state_level,l_full_path,
3887: ' Update posted balance in gl_bc_packets ' || SQL%ROWCOUNT );
3888: -- ========================= FND LOG =============================
3889:
3890: -- Commit to release Lock on gl_bc_dual
3891: commit;
3892:
3893:
3894: -- Reestablish the Row Share Lock on gl_bc_dual2 to maintain data
3890: -- Commit to release Lock on gl_bc_dual
3891: commit;
3892:
3893:
3894: -- Reestablish the Row Share Lock on gl_bc_dual2 to maintain data
3895: -- consistency between the Funds Checker Summarization and the Add/Delete
3896: -- Summary Accounts program
3897:
3898: -- =========================== FND LOG ===========================
3896: -- Summary Accounts program
3897:
3898: -- =========================== FND LOG ===========================
3899: psa_utils.debug_other_string(g_state_level,l_full_path,
3900: ' Lock table gl_bc_dual2 in row share mode nowait' );
3901: -- ========================= FND LOG =============================
3902: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3903:
3904: -- =========================== FND LOG ===========================
3898: -- =========================== FND LOG ===========================
3899: psa_utils.debug_other_string(g_state_level,l_full_path,
3900: ' Lock table gl_bc_dual2 in row share mode nowait' );
3901: -- ========================= FND LOG =============================
3902: LOCK TABLE gl_bc_dual2 IN ROW SHARE MODE NOWAIT;
3903:
3904: -- =========================== FND LOG ===========================
3905: psa_utils.debug_other_string(g_state_level,l_full_path,' RETURN -> TRUE ' );
3906: -- ========================= FND LOG =============================