Search Results enforce_concurrency_control




Overview

PSB_CONCURRENCY_CONTROL_PVT is a private PL/SQL package owned by the APPS schema in Oracle E-Business Suite. It belongs to the Public Sector / Human Resources (PSB) product family and is responsible for enforcing and releasing concurrency control on business entities. The package implements a locking framework that prevents simultaneous, conflicting operations against the same logical entity, such as an employee, position, or other PSB-managed record. Because it is classified as a private (PVT) package, it is not intended for direct customer invocation; instead, it is consumed by other packages within the application that require serialized access to shared data.

The source header ($Header: PSBVCCLS.pls 120.2 2005/07/13) indicates the package was originally created in 1997 and stabilized through a minor revision in 2005. This same code line is delivered in both Oracle EBS 12.1.1 and 12.2.2, so behavior is consistent across those releases.

Key Procedures and Functions

  • ENFORCE_CONCURRENCY_CONTROL — The primary entry point for acquiring a lock. It receives an API version, an optional validation level defaulting to FND_API.G_VALID_LEVEL_NONE, a concurrency class, a concurrency entity name, and a concurrency entity id. It returns a standard FND_API return status. Its purpose is to verify and register that a given entity is not already locked before the caller proceeds with a transactional operation.
  • RELEASE_CONCURRENCY_CONTROL — The counterpart to the enforce routine. Using the same identifying parameters (class, entity name, entity id) plus API version and validation level, it releases a previously held lock so the entity becomes available to other sessions.
  • GET_DEBUG — A private function returning VARCHAR2. It exposes the current debug setting used by the package, allowing internal callers to determine whether diagnostic output should be produced. Referenced by eight other packages, it supports troubleshooting of concurrency conflicts without exposing a public API surface.

Tables Accessed

The documented external dependency for this package is DBMS_LOCK, accessed through an APPS synonym. Rather than persisting lock state to a conventional application table, the package leverages Oracle's built-in DBMS_LOCK package to request, convert, and release user-defined locks. This design keeps lock management lightweight and avoids DML contention. The combination of concurrency class and entity identifier is used to construct a deterministic lock handle, ensuring that the same entity maps to the same lock across sessions and instances.

Usage Notes

Because PSB_CONCURRENCY_CONTROL_PVT is a private package, it is invoked indirectly. Typical call paths include PSB public APIs, concurrent program logic, and OAF or Forms-based transactions that must serialize updates to a shared PSB entity. The standard pattern is to call ENFORCE_CONCURRENCY_CONTROL at the start of a transaction and RELEASE_CONCURRENCY_CONTROL in the exception or completion handler to guarantee the lock is cleared even on failure.

Callers should always inspect the returned p_return_status and propagate it through FND_API conventions. The GET_DEBUG function is intended only for internal diagnostic branching and should not be treated as a supported public interface. Custom integrations requiring similar behavior should call the published PSB APIs rather than referencing this private package directly, since private package signatures may change without notice.