BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   TOP END Domain Gateway   |   Topic List   |   Previous   |   Next   |   Contents

   Using the BEA Tuxedo TOP END Domain Gateway

How BEA TOP END Clients Enqueue Messages to /Q

BEA TOP END clients enqueue messages to BEA Tuxedo /Q queues by calling tp_rtq_put(3T). The queue_info parameter is used by the BEA TOP END system to route the request to the TEDG or another RTQ server. The queue_info parameter specifies the RTQ group, RTQ queue name, and RTQ target.

The BEA Tuxedo administrator must create the /Q queue space and create the queue names available within that QSPACE using qmadmin(1). To make the BEA Tuxedo /Q queue space available to the BEA TOP END system, a QSPACE entry for the queue space must be configured in the DM_LOCAL_SERVICES section of the DMCONFIG file and the TE_RTQGROUP, TE_RTQNAME, and TE_TARGET parameters must be specified. The TEDG advertises these parameters when a connection to the BEA TOP END system is established. The status of individual queue space availability in the BEA Tuxedo domain is not tracked while the connection is active.

When a request is received by the TEDG, the queue_info parameter (which defines the RTQ group, queue name, and target) is used to determine the proper queue space. If a target is not specified, none is included in the lookup. The tp_rtq_put service parameter is used to determine the /Q queue name. The TEDG searches the DM_LOCAL_SERVICES section looking for a QNAME entry that matches the product, function, target, and function qualifier from the message. The TEDG enqueues the message using the derived queue space and queue name parameters by calling a function equivalent to tpenqueue(3c). Default values are used as parameters to the tpenqueue options. For example, priority cannot be mapped from an RTQ request, so the default is used. After the message is enqueued, the BEA Tuxedo administrator may use qmadmin to modify attributes of the /Q queue and the messages in it.

The TEDG maps the status returned by the TMQUEUE(5) server and returns it to the BEA TOP END client. On successful enqueue requests, the TEDG assigns a unique RTQ request_id that is returned to the client. The request_id is provided only for tracking the status of requests; it cannot be used in any further administration of the request.

The recipient of the message enqueued to the /Q queue accesses the message in the standard way, depending on whether tpdequeue(3c) is called or TMQFORWARD(5) is used to turn the message into a service request. The buffer type received is determined by the message type sent and the DMCONFIG parameters. Fields on the TPQCTL structure are set to appropriate values, but features such as priority, correlation ID, reply queue, failure queue, and user-return code are not supported by the TEDG; they are either not set or they are set to default values. The appkey and cltid fields are set with the BEA Tuxedo user ID (the DOMAINID of the remote domain) of the client that sent the message.

How the TEDG Works with BEA TOP END Clients

The BEA TOP END client programmer uses the tp_rtq_put(3T) call to enqueue a message to a BEA Tuxedo /Q queue using the TEDG.

As a BEA TOP END client programmer, you need to know the following information:

To make a tp_rtq_put request, you must specify the product, function, MSR target (optional), and function qualifier (optional) associated with the desired BEA Tuxedo queue name in the service parameter.

How the TEDG Maps Client RTQ Requests

A client request may be transactional or non-transactional. The following table shows how BEA TOP END client RTQ flags and parameters are mapped. By mapping these flags and parameters, the TEDG performs a task that is normally done in the BEA TOP END system. The TP_RTQ_HELD and TP_RTQ_NON_TRANSACT_SCHED flags, the transaction key feature, and the tag_length, tag_text, input_format, and attach_info parameters should not be used on requests to the TEDG; they are not supported.

BEA TOP END Client RTQ Flag and Parameter Mapping

RTQ Flag or Parameter

Action

TP_RTQ_NON_TRANSACT_QUEUE

The TEDG preserves the fact that the RTQ request is excluded from the client transaction by the CSI library.

schedule_time

(absolute, with respect to the server time zone in HH:MM format)

The value of the schedule_time parameter forms the hour and minute portion of the TPQCTL deq_time variable. If schedule_time has passed, a request is scheduled at schedule_time plus 1 day.

The TPQTIME_ABS flag is set on.

Note: The absolute time is mapped with respect to the TEDG time zone rather than the time on the /Q TMQUEUE(5) server. The TEDG time zone is used because tpenqueue(3c) does not offer an equivalent option for specifying time with respect to the time zone of the server.

schedule_time

(relative in R:HH:MM format)

Mapped to the TPQCTL deq_time, this parameter converts the schedule_time from R:HH:MM format to the number of seconds to delay dequeuing. The TPQTIME_REL flag is set on.

schedule_time

(with respect to the client time zone in L:HH:MM format)

Mapped to the TPQCTL deq_time. The TPQTIME_ABS flag is set on.

TP_RTQ_FML_BUF

The TEDG passes user data, as an FML buffer, in a tpenqueue(3c) call.

Error Values

In addition to regular BEA TOP END error status messages, a number of other status messages may be returned to a BEA TOP END client as a result of problems in the TEDG, the BEA Tuxedo system, or the BEA Tuxedo TMQUEUE server. Keep in mind that a single error status message may be used to report any one of many possible causes of the error being reported.

Because the TEDG does not advertise the RTQ queue based upon the actual availability of BEA Tuxedo queue space, a message may be routed to a BEA Tuxedo node where queue space actually is unavailable, resulting in an error status of TP_RTQ_UNAVAIL, while other routing decisions may result in successful requests. If an RTQ queue is to be available on multiple nodes, the design of the BEA Tuxedo application, the BEA TOP END application, and the TEDG must take into account the possibility that this type of failure may occur. A well-designed application, that ensures that there are multiple, restartable copies of the servers, reduces the possibility of such errors occurring.

Error Values Returned to a BEA TOP END RTQ Client

BEA TOP END Error Status

Cause

TP_RTQ_UNAVAIL, TP_RTQ_EXT_MSR_FAILURE

The TEDG QSPACE entry lookup failed; the target was not found.

TP_RTQ_UNAVAIL, TP_RTQ_EXT_NOT_AVALIABLE

The TEDG QSPACE entry lookup failed; the RTQ group and queue names were not found. (Entries for services to which RDOM clients do not have access were ignored.)

TP_RTQ_UNAVAIL, TP_RTQ_EXT_NOT_AVAILABLE

TPENOENT was returned by the BEA Tuxedo system.

TP_RTQ_PARAMERR

The TEDG QNAME entry lookup failed.

TP_RTQ_PARAMERR

The input buffer type does not match the type specified in the INBUFTYPE parameter for the SERVICE entry.

TP_RTQ_PARAMERR

Unsupported RTQ flags TP_RTQ_HELD and TP_RTQ_NON_TRANSACT_SCHED were used.

TP_RTQ_PARAMERR

The BEA TOP END RTQ client specified a transaction key greater than zero; this is unsupported.

TP_RTQ_PARAMERR

The BEA Tuxedo TMQUEUE server returned TPEDIAGNOSTIC, QMEBADQUEUE because the queue name was not defined for the queue space. The queue name and queue space were determined by mapping the RTQ client request.

TP_RTQ_EOF

The BEA Tuxedo TMQUEUE server returned TPEDIAGNOSTIC, QMENOSPACE because there was no space on the queue for the message.

TP_RTQ_ERROR

All other errors

See Also