Causing an SDE Event

The jomCauseSDEEvent call, shown in the following example, is used in a Synchronized Database Environment (SDE) to achieve inter-system event notifications by allowing an event to be caused on the local system as well as on the reciprocal SDS system.

int jomCauseSDEEvent(const DskHandle   *pHandle,
                     const DskObjectId *pTarget,
                     UInt32            eventType,
                     UInt16            immediate,
                     DskParam          *pInfo,
                     DskObjectId       *pCausedBy
                     UInt32            lineNo)

The jomCauseSDEEvent call combines the jomCauseEvent and jomCauseSDSEvent calls. For details, see "Causing an Event" and "Causing an SDS Server Event", elsewhere in this chapter.

When used on a SDS primary system, subscribers of the event are notified on the primary server as well as the attached secondary database servers. On an SDS secondary system, subscribers are notified on the secondary system as well as on the primary system. On a primary system, subscribers are notified only on the secondary systems if the target object is persistent, the value of the immediate parameter is false, and the process is currently in transaction state.

On a secondary database server, the event is caused only on the primary database server if the target object is persistent. The value of the immediate parameter is immaterial. However, subscribers of the event are always notified immediately on the primary, even when the value of the immediate parameter is false, to defer the event on the secondary database server.

The following table lists the contexts in which the event is caused.

Database Role Transient Target Object Persistent Target Object, Immediate Persistent Target Object, Deferred, in Transaction State Persistent Target Object, Deferred, not in Transaction State
Undefined Process only Local system Local system Local system
Primary Process only Primary system Primary system and secondary systems Primary system only
Secondary Process only Primary system and secondary system Secondary system and immediately on the primary system Secondary system and immediately on the primary system

The parameters for this call are described in the following subsections.