Programming Guide



notify

Sends an unsolicited message to a client

Synopsis

notify TYPE msgType ( message ) [ NOTIMEOUT]

Arguments

TYPE msgType
Specifies the message's data type, where msgType is one of these values:

message
The message data, which must conform to msgType.

NOTIMEOUT
Disregard blocking timeouts; however, transaction timeouts remain in effect.

Environment

JetNet, Oracle Tuxedo

Scope

Server

Description

The notify command sends a message to the client whose service request the server is currently processing. The client to be notified cannot be another server.

For example, this server procedure might be used to notify ATM clients about bankservices while it processes their requests. It uses source to identify itself as the source of the message:

proc bankinfo ()
// service BANK_INFO
// send a message with bank news to the client
notify TYPE JAMFLEX \
({source="notify_news", msg="Low rate mortgages with \
	  no points - no closing fees. \
Stop in your local branch for details!"})
service_return ()

Messages delivered via notify are unsolicited. In order for unsolicited messages to be interpreted correctly by agents receiving them, a message handler must be installed. Because the handler is unaware of a message's origin, it is important that a standard method of identifying the source of unsolicited messages be established for the entire application. For more information on writing a message handler for your application, refer to "Recognizing the Message Source" in JetNet/Oracle Tuxedo Guide.

Exceptions

notify can generate the following exceptions:

Exception Severity Cause
TP_INVALID_ARGUMENT_LIST
TP_COMMAND

More than one argument is passed to message.

TP_TIMEOUT
TP_COMMAND

notify times out before completion.

See Also

broadcast, client_init, receive