![]() |
![]() |
|
|
TPPOST(3cbl)
Name
TPPOST() - post an event
Synopsis
01 TPEVTDEF-REC.
COPY TPEVTDEF.
01 TPTYPE-REC.
COPY TPTYPE.
01 DATA-REC.
COPY User data.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPPOST" USING TPEVTDEF-REC TPTYPE-REC DATA-REC TPSTATUS-REC.
Description
The caller uses TPPOST() to post an event and any accompanying data. The event is named by EVENT-NAME in TPEVTDEF-REC and DATA-REC contains the data to be posted. The posted event and its data are dispatched by the BEA Tuxedo EventBroker to all subscribers whose subscriptions successfully evaluate against EVENT-NAME and whose optional filter rules successfully evaluate against DATA-REC.
EVENT-NAME must be 31 characters or less, but cannot be SPACES. EVENT-NAME's first character cannot be a dot (".") as this character is reserved as the starting character for all events defined by the BEA Tuxedo system itself.
DATA-REC is the typed record to be posted and LEN in TPTYPE-REC specifies the amount of data in DATA-REC that should be posted with the event. Note that if DATA-REC is a record of a type that does not require a length to be specified, then LEN is ignored (and may be 0). If DATA-REC is a record of a type that does require a length to be specified, then LEN must not be 0 (if it is 0, no data will be posted). If REC-TYPE in TPTYPE-REC is SPACES, DATA-REC and LEN are ignored and the event is posted with no data.
When TPPOST() is used within a transaction, the transaction boundary can be extended to include those servers and/or stable-storage message queues notified by the EventBroker. When a transactional posting is made, some of the recipients of the event posting are notified on behalf of the poster's transaction (for example, servers and queues), while some are not (for example, clients).
If the poster is within a transaction and TPTRAN is set, the posted event goes to the EventBroker in transaction mode such that it dispatches the event as part of the poster's transaction. The broker dispatches transactional event notifications only to those service routine and stable-storage queue subscriptions that had TPEVTRAN set in TPEVTDEF-REC when the subscription was made. Client notifications, and those service routine and stable-storage queue subscriptions that had TPEVNOTRAN set in TPEVTDEF-REC when the subscription was made, are also dispatched by the EventBroker but not as part of the posting process' transaction.
The following is a list of valid settings in TPEVTDEF-REC:
Return Values
Upon successful completion, TPPOST() sets TP-STATUS to [TPOK]. In addition, EVENT-COUNT contains the number of event notifications dispatched by the EventBroker on behalf of EVENT-NAME (that is, postings for those subscriptions whose event expression evaluated successfully against EVENT-NAME and whose filter rule evaluated successfully against DATA-REC). Upon return where TP-STATUS is set to [TPESVCFAIL], EVENT-COUNT contains the number of non-transactional event notifications dispatched by the EventBroker on behalf of EVENT-NAME.
Errors
Under the following conditions, TPPOST() fails and sets TP-STATUS to one of the following values. (Unless otherwise noted, failure does not affect the caller's transaction, if one exists.)
See Also
TPSUBSCRIBE(3cbl), TPUNSUBSCRIBE(3cbl), EVENTS(5), TMSYSEVT(5), TMUSREVT(5)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|