Writes data received remotely via the middleware to target Panther variables
- Clears target Panther variables and does not attempt to write any data to them.
JetNet, Oracle Tuxedo
unload_datacommand writes to Panther variables data received from a re mote agent via middleware processing. The data is written into the variables according to the mapping established in a service_call or receive command invocation. This command is used in the default Panther unload handler. Use this command if you write your own unload handler.
An unload event is triggered whenever data is received from an external source whose contents can be written to a set of target Panther variables. For clients, external sources of data include service_return data from services requested and unsolicited messages. For servers, external sources of data are data sent from a client as part of a service request, such as arguments. The unload operation begins by first clearing all target Panther variables, even if there is actually no data to unload. The
CLEAR_ONLYoption ensures that the target Panther variables are cleared of old data even in the event of an error, and prevents new data from being written.
For example, the following unload handler
user_unload_handlercalls an unqualified
unload_datacommand:proc user_unload_handler (callid, msg_source, method)
if (method == TP_ASYNCHRONOUS)
msg emsg "Data has arrived!"
}// Do the unload
The following client JPL installs this unload handler. The service reverse takes a string as input and reverses the characters for output:// Client code:
@app()->hdl_unload = "user_unload_handler
service_call "reverse" ("hello world", receive_string)
msg setbkstat "String unloaded", receive_string
unload_datais called other than from an unload handler or subordinate procedures, a
TP_INVALID_CONTEXTexception of severity
receive, service_call, service_return