Search Results lock_source




Overview

XLA_CMP_LOCK_PKG is a private helper package within the Oracle E-Business Suite Subledger Accounting (XLA) module. Its name reflects its two responsibilities: it is part of the Transaction Account Builder (TAB) API compiler infrastructure, and it provides concurrency control ("lock") services for the metadata that the compiler reads and writes. The compiler validates and materializes application accounting definitions against the transaction account type and source model, and the lock package protects that model from concurrent modification while compilation is in progress.

The package body header, dated 26-JAN-04 by A. Quaglia, identifies the object as "Transaction Account Builder API Compiler." It is shipped in the APPS schema and is classified as OTHER under ETRM's API classification scheme, meaning it is not a public or supported extension API. The body carries a local trace facility built on FND_LOG with module identifier xla.plsql.xla_cmp_lock_pkg, and it derives session context — user ID, login ID, program application ID, program ID, and request ID — from xla_environment_pkg. The sample version string (120.2) confirms the file has been largely static since the 11i/12.0 era and carries forward unchanged into 12.1.1 and 12.2.2.

Key Procedures and Functions

ETRM documents two entry points for this package:

  • LOCK_TATS_AND_SOURCES — Acquires locks on Transaction Account Types (TATs) and their associated sources. This is the broader of the two routines: it secures both the account type definitions and the source definitions that participate in them, preventing another session from altering source assignments while the compiler evaluates or builds them. The name directly matches the user's search term lock_source, as this is the procedure that locks sources.
  • LOCK_TAD — Acquires a lock on a Transaction Account Definition (TAD). This provides a narrower scope than LOCK_TATS_AND_SOURCES, suitable when only the account definition itself must be protected.

The package declares a private exception le_resource_busy initialized with PRAGMA EXCEPTION_INIT to Oracle error -00054 ("resource busy and acquire with NOWAIT specified"). This confirms that the locking strategy uses non-blocking acquisition and that contention is surfaced to the caller as an exception rather than by waiting indefinitely.

Tables Accessed

The package touches three metadata tables through APPS synonyms:

  • XLA_SOURCES_B — the base table of Subledger Accounting source definitions. Rows are locked here so that source attributes cannot change mid-compilation.
  • XLA_TAB_ACCT_TYPES_B — the base table of Transaction Account Types. Locking this table protects the account type header and its definition columns.
  • XLA_TAB_ACCT_TYPE_SRCS — the intersection table mapping account types to the sources they consume. Locks here are the mechanism by which LOCK_TATS_AND_SOURCES guarantees a stable source list during compilation.

All access is intended to be locking rather than data-modifying: the package reads or selects the rows it needs and applies row-level locks so the compiler operates on a consistent snapshot.

Usage Notes

XLA_CMP_LOCK_PKG is an internal utility, not an extension point. It is referenced by one other package, which is responsible for the actual compilation flow and calls these procedures before performing definition work. Typical invocation occurs during Subledger Accounting setup operations — creating or updating transaction account types, sources, or account definitions — and during concurrent compilation of application accounting definitions, when the TAB compiler must serialize access to shared metadata. Because it is not a public API, custom code should not call it directly; doing so risks deadlock or unexpected exception -00054 being raised in a caller that has no handler for it. Developers tracing a "resource busy" error during XLA setup or compilation should treat this package as the origin of the NOWAIT lock attempt and investigate which concurrent session holds the corresponding XLA_SOURCES_B, XLA_TAB_ACCT_TYPES_B, or XLA_TAB_ACCT_TYPE_SRCS rows.