The jomCauseSDSEvent call, shown in the following example, is used in a Synchronized Database Service (SDS) to achieve inter-system event notifications.
int jomCauseSDSEvent(const DskHandle *pHandle, const DskObjectId *pTarget, UInt32 eventType, UInt16 immediate, DskParam *pInfo, DskObjectId *pCausedBy UInt32 lineNo)
The role-dependent usage scenarios are as follows.
From a primary system, to cause persistent events audited by the primary database for replay by secondary database servers.
From a secondary system, to cause events that are notified to event subscribers on the primary system.
The behavior of the jomCauseSDSEvent function is database role-dependent. The three database role categories are listed in the following table.
Role | Action |
---|---|
Primary | When called from a thread executing in the primary system, the USER event is audited by the primary for subsequent replay by SDS secondary databases. The event is not notified to event subscribers in the primary system. When using jomCauseSDSEvent in a primary system, USER notification events are only posted if the target is a persistent object and the request is not specified as being immediate. In other words, the request has no effect if the target is a transient object or the request is specified to be immediate. |
Secondary | When called from a thread executing in the secondary system, if the secondary system is connected to its primary server, a corresponding USER event on the same receiver object is triggered in the primary system. The user event is not notified on the secondary system. When using jomCauseSDSEvent in a secondary system, USER notification events are only posted if the target is a persistent object. In other words, the request has no effect if the target is a transient object. |
None | When invoked within a non-SDS-capable system, the behavior is the same as the |
This call can be made from an executing thread that does not correspond to a process of the current node. For threads that do not correspond to a process of the current node, the request is executed by the background process thread.
The parameters for this call are described in the following subsections.