Pushes an event onto the transaction event stack#include <tmusubs.h>int sm_tm_push_model_event(int event);
- Any transaction event.
sm_tm_push_model_eventpushes an event onto the transaction event stack. If
eventis 0, the stack is unchanged and a warning is logged. If the stack is full before the event is pushed, the event that is pushed off the stack is returned.
The transaction manager generates requests in response to commands. It calls this function to push each request onto the stack as an event, to commence event processing for the request. This function can also be used by transaction models or by transaction event functions associated with a table view. The events generated by the transaction manager and those generated by the standard transaction models are defined in
tmusubs.h. For a description of these events, refer to Chapter 9, "Transaction Model Events," in this manual and Chapter 35, "Generating Transaction Manager Events," in Application Development Guide.
/* The following example taken from the standard
transaction model for JDB shows the processing for the
TM_UPDATE request. */case TM_UPDATE:
/* Do nothing, except for updates */
occ_type = sm_bi_compare();
if (occ_type != BI_UPDATED)
save_cursor_type = 0;
reuse_cursor = 0;sm_tm_push_model_event(TM_UPDATE_EXEC);