Search Results obtainadapterlock_fa
Overview
XDP_ADAPTER_CORE_DB is the core database package within the Oracle E-Business Suite e-Commerce Gateway / EDI (XDP) product family. It provides the shared PL/SQL infrastructure that governs the lifecycle, registration, and runtime control of adapters — the components that transport messages between EBS and external trading partners over inbound and outbound queues. The package is declared AUTHID CURRENT_USER and defines constants and exceptions used throughout the XDP adapter stack, including channel name defaults (XNP_IN_MSG_Q and XNP_OUT_MSG_Q), acknowledgement and lock timeouts, and a family of adapter status values consumed by adapter management logic.
In the context of Oracle EBS 12.1.1 and 12.2.2, the package serves as the persistence and concurrency layer for adapter administration. It coordinates state transitions for adapters, manages locks and administrative requests, tracks idle adapters for disconnect-when-idle behaviour, and exposes data used by the adapter controller to determine which adapters are running or eligible for shutdown. The internal cursors G_Get_Running_Adapters, G_Get_Controller_Instances, and G_Get_DWI_Adapters encapsulate the queries that drive that logic.
Key Procedures and Functions
The package exposes 45 documented procedures and functions. The principal groups are:
- Adapter definition and setup: LOADNEWADAPTER, CREATENEWADAPTERCHANNEL, FETCHADAPTERINFO, and FETCHADAPTERSTARTUPINFO create and report adapter metadata and channel configuration.
- Runtime status and updates: UPDATEADAPTER, UPDATE_ADAPTER_ACTIVE_TIME, UPDATE_ADAPTER_STATUS, and GETCURRENTADAPTERSTATUS maintain and query live adapter state.
- Administrative requests: SUBMITADAPTERADMINREQ, UPDATEADAPTERADMINREQ, REMOVEADAPTERADMINREQ, FETCHADAPTERADMINREQINFO, and DOESSYSTEMREQALREADYEXIST manage queued operator actions against adapters.
- Locking and concurrency: OBTAINADAPTERLOCK, OBTAINADAPTERLOCK_FA, OBTAINADAPTERLOCK_VERIFY, and RELEASEADAPTERLOCK serialise access to individual adapters, using the very short lock timeout noted in the source declaration.
- Queue and channel helpers: ISCHANNELCOD, PEEKINTOFEWAITQUEUE, and GETACKTIMEOUT support queue inspection and acknowledgement timing above the inbound and outbound channel constants.
Tables Accessed
The package operates primarily on the XDP adapter and gateway configuration tables, resolved through APPS synonyms:
- Adapter registration and typing: XDP_ADAPTER_REG and XDP_ADAPTER_TYPES_B hold adapter status, class, startup mode, and connect-on-demand flags.
- Administrative requests: XDP_ADAPTER_ADMIN_REQS and its sequence/history counterparts store submitted and pending adapter commands.
- Audit and diagnostics: XDP_ADAPTER_AUDIT and XDP_ERROR_LOG record adapter actions and errors.
- Gateway and configuration infrastructure: XDP_FES, XDP_FE_GENERIC_CONFIG, XDP_FE_SW_GEN_LOOKUP, and XDP_ADAPTER_JOB_QUEUE provide service instance, configuration, and job scheduling data.
- Oracle infrastructure: DBMS_JOB and DBMS_LOCK are used for scheduling and lock primitives, and AQ$XNP_OUT_MSG_QTAB is referenced for the outbound Advanced Queue.
Usage Notes
XDP_ADAPTER_CORE_DB is referenced by thirteen other packages, making it a shared dependency rather than an end-user API. It is invoked indirectly by adapter controller and administration components, by concurrent programs that manage gateway service instances, and by related XDP packages handling messaging and queue processing. Custom code should treat the documented procedures as the supported integration points for adapter administration but must not assume parameter lists beyond those published in ETRM. Because the package uses AUTHID CURRENT_USER, callers require direct grants on the referenced APPS objects. Implementations should account for the fixed, deliberately small lock and acknowledgement timeouts when designing retry or error handling around adapter operations.