BEA Logo BEA Tuxedo Release 7.1

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

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo File Formats and Data Descriptions Reference

APPQ_MIB(5)

Name

APPQ_MIB - Management Information Base for /Q

Synopsis

#include <fml32.h>
#include <tpadm.h>

Description

The /Q MIB defines classes through which application queues can be managed.

APPQ_MIB(5) should be used in combination with the generic MIB reference page MIB(5) to format administrative requests and interpret administrative replies. Requests formatted as described in MIB(5) using classes and attributes described on this reference page may be used to request an administrative service using any one of a number of existing ATMI interfaces in an active application. Application queues in an inactive application may also be administered using the tpadmcall() function interface.

APPQ_MIB(5) consists of the following classes.

APPQ_MIB Classes

Class Name

Attributes

T_APPQ

Application queues within a queue space

T_APPQMSG

Messages within an application queue

T_APPQSPACE

Application queue spaces

T_APPQTRANS

Transactions associated with application queues

Note that this MIB refers to application-defined persistent (reliable disk-based) and non-persistent (in memory) queues (that is, /Q queues), and not server queues (the T_QUEUE class of the TM_MIB(5) component).

Each class description section has four subsections:

Overview

High level description of the attributes associated with the class.

Attribute Table

A table that lists the name, type, permissions, values and default for each attribute in the class. The format of the attribute table is described below.

Attribute Semantics

Tells how each attribute should be interpreted.

Limitations

Limitations in the access to and interpretation of this class.

Attribute Table Format

Each class that is a part of this MIB is documented in four parts. One part is the attribute table. The attribute table is a reference guide to the attributes within a class and how they may used by administrators, operators, and general users to interface with an application.

There are five components to each attribute description in the attribute tables: name, type, permissions, values and default. Each of these components is discussed in MIB(5).

TA_FLAGS Values

MIB(5) defines the generic TA_FLAGS attribute which is a long containing both generic and component MIB-specific flag values. The following flag values are defined for the APPQ_MIB(5) component. These flag values should be or'd with any generic MIB flags.

QMIB_FORCECLOSE

When setting the TA_STATE attribute of a T_APPQSPACE object to CLEaning, this flag indicates that the state change should succeed even if the state of the queue space is ACTive.

QMIB_FORCEDELETE

When setting the TA_STATE attribute of a T_APPQSPACE object to INValid, this flag indicates that the state change should succeed even if the queue space is ACTive or if messages are present in any of its queues. Similarly, when setting the TA_STATE attribute of a T_APPQ object to INValid, this flag allows the queue to be deleted even if messages are present or processes are attached to the queue space.

QMIB_FORCEPURGE

When setting the TA_STATE attribute of a T_APPQ object to INValid, this flag indicates that the state change should succeed even if messages are present on the queue. If, however, a message stored in the selected T_APPQ object is currently involved in a transaction, the state change will fail and an error will be written to the userlog.

FML32 Field Table

The field table for the attributes described on this reference page is found in the file udataobj/tpadm relative to the root directory of the BEA Tuxedo software installed on the system. The directory ${TUXDIR}/udataobj should be included by the application in the path list (semi-colon separated on NT and colon separated otherwise) specified by the FLDTBLDIR environment variable and the field table name tpadm should be included in the comma-separated list specified by the FIELDTBLS environment variable.

Limitations

This MIB is provided only on BEA Tuxedo system 6.0 sites and later, both native and Workstation.

If a site running a BEA Tuxedo release earlier than Release 6.0 is active in the application, then administrative access through this MIB is limited as follows.

T_APPQ Class Definition

Overview

The T_APPQ class represents application queues. One or more application queues may exist in a single application queue space.

Limitations

It is not possible to retrieve all instances of this class by leaving all key fields unset. Instead, sufficient key fields must be supplied to explicitly target a single application queue space. These required key fields are TA_APPQSPACENAME, TA_QMCONFIG, and TA_LMID, except when the application is unconfigured (that is, when the TUXCONFIG environment variable is not set), in which case TA_LMID must be omitted. For example, if the TA_APPQSPACENAME, TA_QMCONFIG, and TA_LMID attributes are set in a request using tpcall(), then all T_APPQ objects within the specified queue space will be retrieved.

Attribute Table

APPQ_MIB(5): T_APPQ Class Definition Attribute Table

Attributea

Type

Permissions

Values

Default

TA_APPQNAME(k)(r)(*)

string

ru-r--r--

string[1..15]

N/A

TA_APPQSPACENAME(k)(r)(*)

string

ru-r--r--

string[1..15]

N/A

TA_QMCONFIG(k)(r)(*)

string

ru-r--r--

string[1..78]

N/A

TA_LMID(k)(r)(*)b

string

ru-r--r--

string[1..30]

N/A


TA_STATE (Note 3)c

string

rw-r--r--

GET: "VAL"

SET: "{NEW | INV}"

N/A

N/A


TA_APPQORDERd

string

rw-r--r--

{PRIO | TIME | LIFO | FIFO | EXPIR}

FIFO

TA_DEFEXPIRATIONTIME

string

rw-r--r--

{+seconds | NONE}

N/A

TA_DEFDELIVERYPOLICY

string

rw-r--r--

{PERSIST | NONPERSIST}

PERSIST

TA_CMD

string

rw-r--r--

shell-command -string[0..78]

""

TA_CMDHW

string

rw-r--r--

0 <= num [bBm%]

100%

TA_CMDLW

string

rw-r--r--

0 <= num [bBm%]

0%

TA_CMDNONPERSIST

string

rw-r--r--

shell-command-string[0-78]

""


TA_CMDNONPERSISTHW

string

rw-r--r--

0 <= num[bB%]

100%

TA_CMDNONPERSISTLW

string

rw-r--r--

0 <= num[bB%]

0%

TA_MAXRETRIES

long

rw-r--r--

0 <= num

0

TA_OUTOFORDER

string

rw-r--r--

{NONE | TOP | MSGID}

NONE

TA_RETRYDELAY

long

rw-r--r--

0 <= num

0


TA_CURBLOCKS

long

r--r--r--

0 <= num

N/A

TA_CURMSG

long

r--r--r--

0 <= num

N/A

TA_CURNONPERSISTBYTES

long

r--r--r--

0 <= num

N/A

TA_CURNONPERSISTMSG

long

r--r--r--

0 <= num

N/A

( k ) - GET key fielde
( r ) - Required field for object creation
( * ) - Required SET key field

aAll attributes of class T_APPQ are local attributes.

bTA_LMID must be specified as a key field except when the application is unconfigured (that is, the TUXCONFIG environment variable is not set).

cAll operations on T_APPQ objects-both GET and SET-silently open the associated queue space (that is, implicitly set the state of the queue space to OPEn if it is not already OPEn or ACTive). This may be a time-consuming operation if the queue space is large.

dTA_APPQORDER cannot be modified after the application queue is created.

eSufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.

Attribute Semantics

TA_APPQNAME: string[1..15]

Name of the application queue.

TA_APPQSPACENAME: string[1..15]

Name of the application queue space containing the application queue.

TA_QMCONFIG: string[1..78]

Absolute pathname of the file or device where the application queue space is located.

TA_LMID: string[1..30] (no comma)

Identifier of the logical machine where the application queue space is located.

TA_STATE:

GET: {VALid}

A GET operation retrieves information about the selected application queues. The following list describes the meaning of the TA_STATE attribute returned in response to a GET request.

VALid

The specified queue exists. This state is INActive equivalent for purposes of permissions checking.

SET: {NEW | INValid}

A SET operation changes characteristics of the selected application queue or creates a new queue. The following list describes the meaning of the TA_STATE attribute returned by a SET request. States not listed cannot be set.

NEW

Create a new queue in the specified queue space. The queue is left in state VALid following successful creation.

INValid

Delete the specified queue. The queue must be in state VALid to be deleted. If the queue space has processes attached to it (that is, it is in the ACTive state), the queue will not be deleted unless the TA_FLAGS attribute includes the QMIB_FORCEDELETE flag. In addition, if the queue has messages in it, it will not be deleted unless QMIB_FORCEPURGE is specified. Successful return leaves the object in the INValid state.

unset

Modify an application queue. Successful return leaves the state unchanged.

TA_APPQORDER:

The order in which messages in the queue are to be processed. Legal values are PRIO, TIME, or EXPIR. A combination of sort criteria may be specified with the most significant criterion specified first, followed by other criteria, and optionally followed by either LIFO or FIFO, which are mutually exclusive. If EXPIR is specified, messages with no expiration time are dequeued after all messages with an expiration time. If neither FIFO nor LIFO is specified, FIFO is assumed. If no order is specified when a queue is created, the default order is FIFO. For example, the following are settings are legal:

PRIO
PRIO,TIME,LIFO
TIME,PRIO,FIFO
TIME,FIFO
EXPIR
EXPIR,PRIO,FIFO
TIME,EXPIR,PRIO,FIFO

TA_CMD: shell-command-string[0..78]

The command to be automatically executed when the high water mark for persistent (disk-based) messages, TA_CMDHW, is reached. The command will be re-executed when the high water mark is reached again after the low water mark, TA_CMDLW, has been reached.

TA_CMDHW: 0 <= num[bBm%]

TA_CMDLW: 0 <= num[bBm%]

The high and low water marks that control the automatic execution of the command specified in the TA_CMD attribute. Each is an integer greater than or equal to zero. Both TA_CMDHW and TA_CMDLW must be followed by one of the following keyletters and the keyletters must be consistent for TA_CMDHW and TA_CMDLW.

b

The high and low water marks pertain to the number of bytes used by persistent (disk based) messages in the queue.

B

The high and low water marks pertain to the number of blocks used by persistent messages in the queue.

m

The high and low water marks pertain to the number of messages (both persistent and non-persistent) in the queue.

%

The high and low water marks are expressed in terms of a percentage of queue capacity. This pertains only to persistent messages.

For example, if TA_CMDLW is 50m and TA_CMDHW is 100m, then the command specified in TA_CMD will be executed when 100 messages are on the queue, and it will not be executed again until the queue has been drained below 50 messages and has filled again to 100 messages.

TA_CMDNONPERSIST: shell-command-string[0..78]

This attribute specifies the command to be executed automatically when the high-water mark for non-persistent (memory-based delivery) messages, TA_CMDNONPERSISTHW, is reached. The command is re-executed when the high-water mark is reached again after the low-water mark for non-persistent (memory-based delivery) messages, TA_CMDNONPERSISTLW, has been reached.

TA_CMDNONPERSISTHW: 0 <= num[bB%]

TA_CMDNONPERSISTLW: 0 <= num[bB%]

These attributes specify the high- and low-water marks that control the automatic execution of the command specified in the TA_CMDNONPERSIST attribute. Each is an integer greater than or equal to zero followed by one of the following keyletters. The keyletters must be consistent for TA_CMDNONPERSISTHW and TA_CMDNONPERSISTLW.

b

The high- and low-water marks are expressed as the number of bytes used by non-persistent (in memory) messages in the queue.

B

The high- and low-water marks are expressed as the number of blocks used by non-persistent (in memory) messages in the queue.

%

The high- and low-water marks are expressed as a percentage of the shared memory capacity reserved for non-persistent messages in the queue space used by the queue.

The messages threshold type specified via the TA_CMDHW and TA_CMDLW attributes (when followed by an m) applies to all messages in a queue, including both persistent and non-persistent messages, and therefore is not available as a threshold type for TA_CMDNONPERSISTHW and TA_CMDNONPERSISTLW.

TA_CURBLOCKS: 0 <= num

The number of disk pages currently consumed by the queue.

TA_CURMSG: 0 <= num

The number of persistent messages currently in the queue. To determine the total number of messages in the queue, add TA_CURMEMMSG to this value.

TA_DEFAULTEXPIRATIONTIME:

This attribute specifies an expiration time for messages enqueued with no explicit expiration time. The expiration time may be either a relative expiration time or NONE. The relative expiration time is determined by associating a fixed amount of time with a message after the message arrives at the queue manager process. When a message's expiration time is reached and the message has not been dequeued or administratively deleted, all resources associated with the message are reclaimed by the system and statistics are updated. If a message expires during a transaction, the expiration does not cause the transaction to fail. Messages that expire while being enqueued or dequeued within a transaction are removed from the queue when the transaction ends. There is no notification that the message has expired. If no default expiration time is specified for a queue, then messages without an explicit expiration time do not expire. When the queue's expiration time is modified, the expiration times of messages that were in the queue before the modification are not changed.

The format is +seconds where seconds is the number of seconds allowed to lapse between the time that the queue manager successfully completes the operation and the time that the message is to expire. If seconds is set to zero (0) the message expires immediately.

The value of this attribute may also be set to the string NONE. The NONE string indicates that messages enqueued to the queue with no explicit expiration time do not expire. You may change the expiration time for messages already in a queue with the TA_EXPIRETIME attribute of the T_APPQMSG class in the APPQ_MIB.

TA_DEFDELIVERYPOLICY:

This attribute specifies the default delivery policy for the queue when no delivery mode is specified for a message enqueued to the queue. When the value is PERSIST, messages enqueued to the queue without an explicitly specified delivery mode are delivered using the persistent (disk-based) delivery method. When the value is NONPERSIST, messages enqueued to the queue without an explicitly specified delivery mode are delivered using the non-persistent (in memory) delivery method.When a queue's default delivery policy is modified, the delivery quality of service of messages that are in the queue before the modification are not changed. If the queue being modified is the reply queue named for any messages currently in the queue space, the reply quality of service is not changed for those messages as a result of changing the default delivery policy of the queue.

For non-persistent delivery, if the memory area is exhausted or fragmented such that a message cannot be enqueued, the enqueuing operation fails, even if there is sufficient persistent storage for the message. Similarly, if the persistent storage area is exhausted or fragmented such that a message cannot be enqueued, the enqueuing operation fails, even if there is sufficient non-persistent storage for the message. If the TA_MEMNONPERSIST attribute of the T_APPQSPACE class is zero (0) for a queue space, no space is reserved for non-persistent messages. In such a case, any attempt to enqueue a non-persistent message fails. This type of failure results, for example, when no delivery quality of service has been specified for a message and the TA_DEFDELIVERYPOLICY attribute for the target queue has been set to NONPERSIST.

TA_MAXRETRIES: 0 <= num

The maximum number of retries for a failed queue message. When the number of retries is exhausted, the message is placed on the error queue of the associated application queue space. If there is no error queue, the message is dropped. The default is zero.

TA_OUTOFORDER: {NONE | TOP | MSGID}

The way in which out-of-order message processing is to be handled. The default is NONE.

TA_RETRYDELAY: 0 <= num

The delay, in seconds, between retries for a failed queue message. The default is zero.

TA_CURNONPERSISTBYTES: 0 <= num

This attribute specifies the number of shared memory bytes currently consumed by the non-persistent messages on the queue.

TA_CURNONPERSISTMSG: 0 <= num

This attribute specifies the number of non-persistent messages currently in the queue. To determine the total number of messages in the queue, add TA_CURMSG to this value.

T_APPQMSG Class Definition

Overview

The T_APPQMSG class represents messages stored in application queues. A message is not created by an administrator; instead, it comes into existence as a result of a call to tpenqueue(). A message can be destroyed either by a call to tpdequeue() or by an administrator. In addition, certain attributes of a message can be modified by an administrator. For example, an administrator can move a message from one queue to another queue within the same queue space or change its priority.

Limitations

It is not possible to retrieve all instances of this class by leaving all key fields unset. Instead, sufficient key fields must be supplied to explicitly target a single application queue space. These required key fields are TA_APPQSPACENAME, TA_QMCONFIG, and TA_LMID, except when the application is unconfigured (that is, the TUXCONFIG environment variable is not set), in which case TA_LMID must be omitted. For example, if the TA_APPQSPACENAME, TA_QMCONFIG, and TA_LMID attributes are set in a request using tpcall(), then all T_APPQMSG objects in all queues of the specified queue space will be retrieved.

Attribute Table

APPQ_MIB(5): T_APPQMSG Class Definition Attribute Table

Attributea

Type

Permissions

Values

Default

TA_APPQMSGID(k)(*)

string

r--r--r--

string[1..32]

N/A

TA_APPQNAME(k)(*)

string

r--r--r--

string[1..15]

N/A

TA_APPQSPACENAME(k) (*)

string

r--r--r--

string[1..15]

N/A

TA_QMCONFIG(k)(*)

string

r--r--r--

string[1..78]

N/A

TA_LMID(k)(*)b

string

r--r--r--

string[1..30]

N/A


TA_STATEc

string

rw-r--r--

GET: "VAL"

SET: "INV"

N/A

N/A


TA_NEWAPPQNAME

string

-w--w----

string[1..15]

N/A

TA_PRIORITY

long

rw-rw-r--

{ 1 <= num <= 100 | -1 }

N/A

TA_TIME

string

rw-rw-r--

{YY[MM[DD[hh[mm[ss]]]]] | +seconds}

N/A

TA_EXPIRETIME

string

rw-rw-r--

{YY[MM[DD[hh[mm[ss]]]]] | +seconds}

N/A


TA_CORRID(k)

string

r--r--r--

string[0..32]

N/A

TA_PERSISTENCE (k)

string

r--r--r--

{PERSIST|NONPERSIST}

N/A

TA_REPLYPERSISTENCE

string

r--r--r--

{PERSIST | NONPERSIST | DEFAULT}

N/A

TA_LOWPRIORITY(k)

long

k--k--k--

1 <= num <= 100

1

TA_HIGHPRIORITY(k)

long

k--k--k--

1 <= num <= 100

100

TA_MSGENDTIME(k)

string

k--k--k--

{ YY[MM[DD[hh[mm[ss]]]]] | +seconds}

MAXLONG

TA_MSGSTARTTIME(k)

string

k--k--k--

{ YY[MM[DD[hh[mm[ss]]]]] | +seconds}

0

TA_MSGEXPIREENDTIME(k)

string

k--k--k--

{ YY[MM[DD[hh[mm[ss]]]]] | +seconds|NONE}

MAXLONG

TA_MSGEXPIRESTARTTIME(k)

string

k--k--k--

{ YY[MM[DD[hh[mm[ss]]]]] | +seconds}

0


TA_CURRETRIES

long

r--r--r--

0 <= num

N/A

TA_MSGSIZE

long

r--r--r--

0 <= num

N/A

( k ) - GET key fieldd
( * ) - Required SET key field

aAll attributes of class T_APPQMSG are local attributes.

bTA_LMID must be specified as a key field except when the application is unconfigured (that is, the TUXCONFIG environment variable is not set).

cAll operations on T_APPQMSG objects-both GET and SET-silently open the associated queue space (that is, implicitly set the state of the queue space to OPEn if it is not already OPEn or ACTive). This may be a time-consuming operation if the queue space is large.

dSufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.

Attribute Semantics

TA_APPQMSGID: string[1..32]

A unique identifier for the queue message, which can be used to select the message for GET or SET operations. No significance should be placed on this value beyond using it for equality comparisons.

TA_APPQNAME: string[1..15]

Name of the application queue in which the message is stored.

TA_APPQSPACENAME: string[1..15]

Name of the application queue space containing the message.

TA_QMCONFIG: string[1..78]

Absolute pathname of the file or device where the application queue space is located.

TA_LMID: string[1..30] (no comma)

Identifier of the logical machine where the application queue space is located.

TA_STATE:

GET: {VALid}

A GET operation retrieves information about the selected messages. The following list describes the meaning of the TA_STATE attribute returned in response to a GET request.

VALid

The message exists. This state is INActive equivalent for purposes of permissions checking.

SET: {INValid}

A SET operation changes characteristics of the selected message. The following list describes the meaning of the TA_STATE attribute returned by a SET request. States not listed cannot be set.

INValid

The message is deleted from its queue space. The message must be in state VALid before attempting this operation. Successful return leaves the object in the INValid state.

unset

Modify a message. Successful return leaves the state unchanged.

TA_CURRETRIES: 0 <= num

The number of retries that have been attempted so far on this message.

TA_CORRID: string[0..32]

The correlation identifier for this message provided by the application in the tpenqueue(3c) request. The empty string indicates that a correlation identifier is not present.

TA_EXPIRETIME:

This attribute specifies the time at which a message expires (that is, the time at which the message should be removed from the queue if it has not already been dequeued or administratively deleted). When a message expires, all resources used by it are reclaimed by the system and statistics are updated. If a message expires during a transaction, the expiration does not cause the transaction to fail. Messages that expire while being enqueued or dequeued within a transaction are removed from the queue when the transaction ends. There is no notification that the message has expired.

Expiration times cannot be added to messages enqueued by versions of the BEA Tuxedo system that do not support message expiration, even when the queue manager responsible for changing this value supports message expiration. Attempts to add an expiration time fail.

The empty string is returned by a GET operation if the expiration time is not set. The TA_EXPIRETIME format is one of the following.

+seconds

Specifies that the message will be removed after the specified number of seconds. If the value of seconds is set to zero (0), the message is removed immediately from the queue. Relative expiration time is calculated on the basis of the time at which the MIB request arrives and has been processed by the corresponding queue manager.

YY[MM[DD[hh]mm[ss]]]]

Specifies the year, month, day, hour, minute, and second when the message will be removed if it has not been dequeued or administratively deleted already. Omitted units default to their minimum possible values. For example, 9506 is equivalent to 950601000000. The years 00 through 37 are treated as 2000 through 2037, 70 through 99 are treated as 1970 through 1999, and 38 through 69 are invalid. An absolute expiration time is determined by the clock on the machine where the queue manager process resides.

NONE

Specifies that the message will never expire.

TA_LOWPRIORITY: 1 <= num <= 100
TA_HIGHPRIORITY: 1 <= num <= 100

The lowest and highest priority within which to search for occurrences of T_APPQMSG objects. These attributes may only be used as key fields with GET operations.

TA_MSGEXPIRESTARTTIME:
TA_MSGEXPIREENDTIME:

The expiration start and end times within which to search for occurrences of T_APPQMSG objects. The range is inclusive. A start or end time must be specified as an absolute time value; see TA_EXPIRETIME for the format. These attributes may only be used as key fields with GET operations.

TA_MSGSIZE: 0 <= num

The size of the message, in bytes.

TA_MSGSTARTTIME:
TA_MSGENDTIME:

The start and end time within which to search for occurrences of T_APPQMSG objects. The range is inclusive. A start or end time must be specified as an absolute time value; see TA_TIME for the format. These attributes may only be used as key fields with GET operations.

TA_NEWAPPQNAME: string[1..15]

Name of the queue into which to move the selected message. This queue must be an existing queue in the same queue space. The message must be in state VALid for this operation to succeed. This attribute is not returned by a GET operation. The delivery quality of service of messages that are moved will not be changed as a result of the default delivery policy of the new queue. When messages with an expiration time are moved, the expiration time is considered an absolute expiration time in the new queue, even if it was previously specified as a relative expiration time.

TA_PERSISTENCE:

The quality of service with which the message is being delivered. This read-only state is set to NONPERSIST for non-persistent messages and PERSIST for persistent messages.

TA_PRIORITY: 1 <= num <= 100

The priority of the message.

TA_REPLYPERSISTENCE:

The quality of service with which replies to the message should be delivered. This read-only state is set to NONPERSIST for non-persistent, PERSIST for persistent, and DEFAULT when the reply is to use the default persistence established for the queue where the reply is to be enqueued.

Note that the default delivery policy is determined when the reply to a message is enqueued. That is, if the default delivery policy of the reply queue is modified between the time that the original message is enqueued and the reply to the message is enqueued, the policy used is the one in effect when the reply is finally enqueued.

TA_TIME:

The time when the message will be made available. The format is one of the following:

+seconds

Specifies that the message will be processed seconds in the future. The value zero (0) specifies that the message should be processed immediately.

YY[MM[DD[hh[mm[ss]]]]]

Specifies the year, month, day, hour, minute, and second when the message should be processed. Omitted units default to their minimum possible values. For example, 9506 is equivalent to 950601000000. The years 00 through 37 are treated as 2000 through 20037, 70 through 99 are treated as 1970 through 1999, and 38 through 69 are invalid.

T_APPQSPACE Class Definition

Overview

The T_APPQSPACE class represents application queue spaces. An application queue space is an area in a BEA Tuxedo system device; see the T_DEVICE class in TM_MIB(5) for more information about devices and their attributes. Each queue space typically contains one or more application queues, and each queue may have messages stored in it.

A queue space is uniquely identified by several attributes: its name (TA_APPQSPACENAME attribute), the device that contains it (TA_QMCONFIG attribute), and the logical machine where the device is located (TA_LMID attribute).

A queue space is typically associated with exactly one server group in a configured application. The queue space name as well as the device name are components of the TA_OPENINFO attribute of the T_GROUP object.

Limitations

It is not possible to retrieve all instances of this class by leaving all key fields unset. Instead, all three key fields must be supplied to explicitly target a single application queue space. The single exception occurs when accessing a local queue space via tpadmcall() in the context of an unconfigured application (that is, the TUXCONFIG environment variable is not set). In this case the TA_LMID key field must be omitted.

The above limitation regarding accessibility of queue spaces also applies to T_APPQ, T_APPQMSG, and T_APPQTRANS objects because operations on all objects in the /Q MIB implicitly involve queue spaces.

Attribute Table

APPQ_MIB(5): T_APPQSPACE Class Definition Attribute Table

Attributea

Type

Permissions

Values

Default

TA_APPQSPACENAME(k)(r)(*)

TA_QMCONFIG(k)(r)(*)

TA_LMID(k)(r)(*)b

string

string

string

ru-r--r--

ru-r--r--

ru-r--r--

string[1..15]

string[1..78]

string[1..30]

N/A

N/A

N/A

TA_STATE(k)c

string

rwxrwxr--

GET: "{INA | INI | OPE | ACT}"

SET: "{NEW | OPE | CLE | INV}"

N/A

N/A

TA_BLOCKING

TA_ERRORQNAME

TA_FORCEINIT-->

TA_IPCKEY(r)

TA_MAXMSG(r)

TA_MAXPAGES(r)

TA_MAXPROC(r)

TA_MAXQUEUES(r)d

TA_MAXTRANS(r)

TA_MAXACTIONS

TA_MAXHANDLES

TA_MAXOWNERS

TA_MAXTMPQUEUES

TA_MAXCURSORS

TA_MEMNONPERSIST

TA_MEMFILTERS

TA_MEMOVERFLOW

long

string

string

long

long

long

long

long

long

long

long

long

long

long

string

long

long

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

rw-r--r--

0 <= num

string[0..15]

{Y | N}

32769 <= num <= 262143

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num[bB]

0 <= num

0 <= num

16

""

N

N/A

N/A

N/A

N/A

N/A

N/A

0

0

0

0

0

0

0

0

TA_MEMSYSTEMRESERVED

TA_MEMTOTALALLOCATED

long

long

r--r--r--

r--r--r--

0 <= num

0 <= num

N/A

N/A

TA_CUREXTENT

TA_CURMSG

TA_CURPROC

TA_CURQUEUES

TA_CURTRANS

TA_CURACTIONS

TA_CURHANDLES

TA_CUROWNERS

TA_CURTMPQUEUES

TA_CURCURSORS

TA_CURMEMNONPERSIST

TA_CURMEMFILTERS

TA_CURMEMOVERFLOW

TA_HWMSG

TA_HWPROC

TA_HWQUEUES

TA_HWTRANS

TA_HWACTIONS

TA_HWHANDLES

TA_HWOWNERS

TA_HWTMPQUEUES

TA_HWCURSORS

TA_HWMEMNONPERSIST

TA_HWMEMFILTERS

TA_HWMEMOVERFLOW

TA_PERCENTINIT

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

long

r--r--r--

r--r--r--

r--r--r--

r--r--r--

R--R--R--

r--r--r--

r--r--r--

r--r--r--

r--r--r--

r--r--r--

r--r--r--

r--r--r--

r--r--r--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

R--R--R--

r--r--r--

0 <= num <= 100

{ 0 <= num | -1 }

0 <= num

{ 0 <= num | -1 }

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num <= 100

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

0 <= num

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

( k ) - GET key field
( r ) - Required field for object creation
( * ) - Required SET key field

a.All attributes of class T_APPQSPACE are local attributes.

b.TA_LMID must be specified as a key field except when the application is unconfigured (that is, the TUXCONFIG environment variable is not set).

c.All operations on T_APPQ, T_APPQMSG, and T_APPQTRANS objects (both GET and SET) silently open the associated queue space (that is, implicitly set the state of the queue space to OPEn if it is not already OPEn or ACTive). This may be a time-consuming operation if the queue space is large.

d.TA_MAXQUEUES cannot be modified after the queue space is created.

Attribute Semantics

TA_APPQSPACENAME: string[1..15]

Name of the application queue space.

TA_QMCONFIG: string[1..78]

Absolute pathname of the file or device where the application queue space is located.

TA_LMID: string[1..30] (no comma)

Identifier of the logical machine where the application queue space is located.

TA_STATE:

GET: {INActive | INItializing | OPEn | ACTive}

A GET operation retrieves information about the selected application queue space. The following list describes the meaning of the TA_STATE attribute returned in response to a GET request.

INActive

The queue space exists; that is, disk space for it has been reserved in a device and the space has been initialized (if requested or if necessary).

INItializing

Disk space for the queue space is currently being initialized. This state is ACTive equivalent for purposes of permissions checking.

OPEn

Shared memory and other IPC resources for the queue space have been allocated and initialized, but no processes are currently attached to the shared memory. This state is INActive equivalent for purposes of permissions checking.

ACTive

Shared memory and other IPC resources for the queue space have been allocated and initialized, and at least one process is currently attached to the shared memory. These processes can be the queue servers (TMS_QM, TMQUEUE, and perhaps TMQFORWARD) associated with the queue space, or they can be administrative processes such as qmadmin(1), or they can be processes associated with another application.

SET: {NEW | OPEn | CLEaning | INValid}

A SET operation changes the selected application queue space or creates a new one. The following list describes the meaning of the TA_STATE attribute returned by a SET request. States not listed cannot be set.

NEW

Create a new queue space. The state of the queue space becomes either INItializing or INActive following a successful SET to this state.

OPEn

Allocate and initialize shared memory and other IPC resources for the queue space. This is allowed only if the queue space is in the INActive state.

CLEaning

Remove the shared memory and other IPC resources for the queue space. This is allowed only when the queue space is in the OPEn or ACTive state. The QMIB_FORCECLOSE flag must be specified if the state is ACTive. When successful, all non-persistent messages are permanently lost.

INValid

Delete the queue space. Unless the QMIB_FORCEDELETE flag is passed, an error is reported if the state is ACTive or if messages exist on any queues in the queue space. Successful return leaves the object in the INValid state. When successful, all non-persistent messages are permanenetly lost.

unset

Modify an application queue space. Successful return leaves the state unchanged.

TA_BLOCKING: 0 <= num

The blocking factor used for disk space management of the queue space. The default when a new queue space is created is 16.

TA_CURACTIONS: 0 <= num

This attribute specifies the current number of actions in use in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURCURSORS: 0 <= num

This attribute specifies the current number of cursors in use in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CUREXTENT: 0 <= num <= 100

The current number of extents used by the queue space. The largest number allowed is 100. Each time the value of the TA_MAXPAGES attribute is increased, a new extent is allocated. When this attribute is modified, all non-persistent messages in the queue space are permanently lost.

TA_CURHANDLES: 0 <= num

This attribute specifies the current number of handles in use in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURMEMFILTERS: 0 <= num

This attribute specifies the current number of bytes in use for filters in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURMEMNONPERSIST: 0 <= num

The current amount of memory in bytes consumed by non-persistent messages in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURMEMOVERFLOW: 0 <= num

This attribute specifies the current number of bytes in use of the overflow memory in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURMSG: 0 <= num

The current number of messages in the queue space. This number can be determined only if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of these conditions are met, the value -1 is returned.

TA_CUROWNERS: 0 <= num

This attribute specifies the current number of owners in use in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURPROC: 0 <= num

The current number of processes accessing the queue space.

TA_CURQUEUES: 0 <= num

The current number of queues existing in the queue space. This number can be determined only if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of these conditions are met, the value -1 is returned.

TA_CURTMPQUEUES: 0 <= num

This attribute specifies the current number of temporary queues in use in the queue space. This number can be determined if the queue space is OPEn or ACTive, or if the queue space is newly created. If none of the conditions apply, the value -1 is returned.

TA_CURTRANS: 0 <= num

The current number of outstanding transactions involving the queue space.

TA_ERRORQNAME: string[0..15]

Name of the error queue associated with the queue space. If there is no error queue, an empty string is returned by a GET request.

TA_FORCEINIT: {Y | N}

Whether or not to initialize disk pages on new extents for the queue space. The default is not to initialize. Depending on the device type (for example, regular file or raw slice), initialization can be done even if it is not requested.

TA_HWACTIONS: 0 <= num

This attribute specifies the highest number of concurrent actions reached in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWCURSORS: 0 <= num

This attribute specifies the highest number of concurrent cursors created in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWHANDLES: 0 <= num

This attribute specifies the highest number of concurrent handles opened in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWMEMFILTERS: 0 <= num

This attribute specifies the highest number of bytes used for filters in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWMEMNONPERSIST: 0 <= num

The largest amount of memory in bytes consumed by non-persistent messages since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWMEMOVERFLOW: 0 <= num

This attribute specifies the highest number of bytes used in the overflow memory in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWMSG: 0 <= num

The highest number of messages in the queue space at a given time since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWOWNERS: 0 <= num

This attribute specifies the highest number of concurrent owners reached in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWPROC: 0 <= num

The highest number of processes simultaneously attached to the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWQUEUES: 0 <= num

The highest number of queues existing in the queue space at a given time since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWTMPQUEUES: 0 <= num

This attribute specifies the highest number of concurrent temporary queues opened in the queue space since the queue space was last opened. The number is reset to 0 when the queue space state is set to CLEaning.

TA_HWTRANS: 0 <= num

The highest number of outstanding transactions at a given time involving the queue space since the queue space was last opened. If the queue space is accessed by more than one application, this number reflects all applications, not just the application represented by the TUXCONFIG environment variable. The number is reset to 0 when the queue space state is set to CLEaning.

TA_IPCKEY: 32769 <= num <= 262143

The IPC key used to access queue space shared memory.

TA_MAXACTIONS: 0 <= num

This attribute specifies the number of additional actions that the Queuing Services component of the BEA Engine can handle concurrently. When a blocking operation is encountered and additional actions are available, the blocking operation is set aside until it can be satisfied. After setting aside the blocking operation, another operation request can be handled. When the blocking operation completes, the action associated with the operation is made available for a subsequent operation. The system reserves actions equivalent to the number of processes that can attach to a queue space, so that each queue manager process may have at least one blocking action. Beyond the system-reserved number of blocking actions, the administrator may configure the system to be able to accommodate additional blocking actions beyond the reserve. An operation fails if a blocking operation is requested and cannot be immediately satisfied and there are no actions available.

TA_MAXCURSORS: 0 <= num

This attribute specifies the number of cursors that users of that the Queuing Services component of the BEA Engine may use concurrently. Cursors are used to navigate a queue. When a cursor is destroyed, the cursor resources are made available for subsequent cursor creation operations. When the cursors are used by an application, the administrator must configure the system to accommodate the maximum number of cursors that will be allocated concurrently. An operation fails if a user attempts to create a cursor and there are no cursor resources available. BEA Tuxedo applications need not adjust this value. Adjusting this value has no effect on BEA Tuxedo applications other than unnecessarily consuming shared memory resources.

TA_MAXHANDLES: 0 <= num

This attribute specifies the number of handles that users of that the Queuing Services component of the BEA Engine may use concurrently. Objects manipulated by the queuing services API require handles to access the objects. When an object is opened by a call to the Queuing Services API, a new handle is created and returned to the user. When an object handle is closed, the handle is made available for subsequent open object operations. When the Queuing Services API is used by an application, the administrator must configure the system to accommodate the maximum number of handles that will be opened concurrently. An operation fails if a user attempts to open a queuing services object and there are no handles available. Adjusting this value has no effect on BEA Tuxedo applications other than unnecessarily consuming shared memory resources.

TA_MAXMSG: 0 <= num

The maximum number of messages that the queue space can contain at a given time.

TA_MAXOWNERS: 0 <= num

This attribute specifies the number of additional BEA Engine authenticated users that may concurrently use Queuing Services resources. There is one owner record per user, regardless of the number of open handles for the user. When there are no open handles for a user, the owner record is made available for subsequent users. The system reserves owners equivalent to the number of actions so that each action may be initiated by a different owner. Beyond the system-reserved number of owners that may be concurrently using queuing services resources, the administrator may configure the system to accommodate additional owners beyond the reserve. An operation fails if a user attempts to open a handle when they currently do not have any open handles, and there are no owners available. Adjusting this value has no effect on BEA Tuxedo applications other than unnecessarily consuming shared memory resources.

TA_MAXPAGES: 0 <= num

The maximum number of disk pages for all queues in the queue space. Each time the TA_MAXPAGES attribute is increased, a new extent is allocated (see TA_CUREXTENT). It is not possible to decrease the number of pages by setting this attribute to a lower number; an error is reported in this case.

TA_MAXPROC: 0 <= num

The maximum number of processes that can attach to the queue space.

TA_MAXQUEUES: 0 <= num

The maximum number of queues that the queue space can contain at a given time.

TA_MAXTMPQUEUES: 0 <= num

This attribute specifies the number of temporary queues that may be opened concurrently in the Queuing Services component of the BEA Engine. Temporary queues reduce the need for administrators to configure each queue used by an application. They are used by dynamic self-configuring applications. Messages enqueued to temporary queues are not persistent. When all handles to a temporary queue are closed, the temporary queue resources are made available for subsequent temporary queue creation. When the temporary queues are used by an application, the administrator must configure the system to accommodate the maximum number of temporary queues that will be active concurrently. An open operation fails if a user attempts to open a temporary queue and there are no temporary queue resources available. Adjusting this value has no effect on BEA Tuxedo applications other than unnecessarily consuming shared memory resources.

TA_MAXTRANS: 0 <= num

The maximum number of simultaneously active transactions allowed by the queue space.

TA_MEMFILTERS: 0 <= num

This attribute specifies the size of the memory area to reserve in shared memory to hold the compiled representation of user defined filters. The memory size is specified in bytes. Filters are used by the Queuing Services component of the BEA Engine for message selection in dequeuing and cursor operations. Filters may be specified using various grammars but are compiled into an engine normal form and stored in shared memory. Filters are referenced by a handle returned when they are compiled. When a filter is destroyed, the memory used by the filter is made available for subsequent compiled filters. When the filters are defined by an application, the administrator must configure the system to accommodate the maximum number of filters that will be concurrently compiled. An operation fails if a user attempts to create a new filter and there is not enough memory allocated for the compiled version of the filter. Adjusting this value has no effect on BEA Tuxedo applications other than unnecessarily consuming shared memory resources.

TA_MEMNONPERSIST: 0 <= num [bB]

This attribute specifies the size of the area reserved in shared memory to hold non-persistent messages for all queues in the queue space. The memory size may be specified in bytes (b) or blocks (B). (The size of a block, in this context, is equivalent to the size of a disk block.) The [bB] suffix is optional and, if not specified, the default is blocks (B).

If the value is specified in bytes (b) for this attribute, the system divides the specified value by the number of bytes per page (page size is equivalent to the disk page size), rounds down the result to the nearest integer, and allocates that number of pages of memory. For example, assuming a page size of 1024 bytes (1KB), a requested value of 2000b results in a memory allocation of 1 page (1024 bytes), and a requested value of 2048b results in a memory allocation of 2 pages (2048 bytes). Requesting a value less than the number of bytes per page results in an allocation of 0 pages (0 bytes).

If the value is specified in blocks (B) for this attribute and assuming that one block of memory is equivalent to one page of memory, the system allocates the same value of pages. For example, a requested value of 50B results in a memory allocation of 50 pages.

All non-persistent messages in the specified queue space are permanently lost when TA_MEMNONPERSIST is successfully changed.

If TA_MEMNONPERSIST for a queue space is zero (0) for a queue space, no space is reserved for non-persistent messages. In this case, any attempt to enqueue a non-persistent message fails. This type of failure results, for example, when no delivery quality of service has been specified for a message and the TA_DEFDELIVERYPOLICY attribute of the T_APPQ class for the target queue has been set to NONPERSIST. For non-persistent delivery, if the memory area is exhausted or fragmented such that a message cannot be enqueued, the enqueuing operation fails, even if there is sufficient persistent storage for the message. Similarly, if the persistent storage area is exhausted or fragmented such that a message cannot be enqueued, the enqueuing operation fails, even if there is sufficient non-persistent storage for the message.

TA_MEMOVERFLOW: 0 <= num

This attribute specifies the size of the memory area to reserve in shared memory to accommodate peek load situations where some or all of the allocated shared memory resources are exhausted. The memory size is specified in bytes. Additional objects are allocated from this additional memory on a first-come-first-served basis. When an object created in the additional memory is closed or destroyed, the memory is released for subsequent overflow situations. This additional memory space may yield more objects than the configured number, but there is no guarantee that additional memory is available for any particular object at any given point in time. Currently, only actions, handles, cursors, owners, temporary queues, timers, and filters use the overflow memory.

TA_MEMSYSTEMRESERVED: 0 <= num

This attribute specifies the total amount of memory (in bytes) reserved from shared memory for queuing services system use.

TA_MEMTOTALALLOCATED: 0 <= num

This attribute specifies the total amount of memory (in bytes) allocated from shared for all queuing services objects.

TA_PERCENTINIT: 0 <= num <= 100

The percentage of disk space that has been initialized for the queue space.

T_APPQTRANS Class Definition

Overview

The T_APPQTRANS class represents run-time attributes of transactions associated with application queues.

Limitations

It is not possible to retrieve all instances of this class by leaving all key fields unset. Instead, sufficient key fields must be specified to explicitly target a single application queue space. For example, if all key fields except TA_XID are set in an request using tpcall(), then all T_APPQTRANS objects associated with the specified queue space will be retrieved.

It is important to keep in mind that transactions represented by objects of this class are not necessarily associated with the application in which they are retrieved. Care must be taken when heuristically committing or aborting a transaction because the transaction may actually belong to or have an effect on another application. The value of the TA_XID attribute is not guaranteed to be unique across applications.

Attribute Table

APPQ_MIB(5): T_APPQTRANS Class Definition Attribute Table

Attributea

Type

Permissions

Values

Default

TA_XID( k )( * )

string

R--R--R--

string[1..78]

N/A

TA_APPQSPACENAME(k)(*)

string

r--r--r--

string[1..15]

N/A

TA_QMCONFIG( k )( * )

string

r--r--r--

string[1..78]

N/A

TA_LMID( k )( * )

string

r--r--r--

string[1..30]

N/A

TA_STATEb

string

R-XR-XR--

GET: "{ACT | ABY | ABD | COM | REA | DEC | HAB | HCO}"

SET: "{HAB | HCO}"

N/A

N/A

( k ) - GET key fieldc
( * ) - Required SET key field

a. All attributes of class T_APPQTRANS are local attributes.

b. All operations on T_APPQTRANS objects-both GET and SET-silently open the associated queue space (that is, implicitly set the state of the queue space to OPEn if it is not already OPEn or ACTive). This may be a time-consuming operation if the queue space is large.

c. Sufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.

Attribute Semantics

TA_XID: string[1..78]

Transaction identifier as returned by tx_info() and mapped to a string representation. The data in this field should not be interpreted directly by the user except for equality comparison.

TA_APPQSPACENAME: string[1..15]

Name of the application queue space associated with the transaction.

TA_QMCONFIG: string[1..78]

Absolute pathname of the file or device where the application queue space is located.

TA_LMID: string[1..30] (no comma)

Identifier of the logical machine where the application queue space is located.

TA_STATE:

GET: {ACTive | ABortonlY | ABorteD | COMcalled | REAdy | DECided |
HAbord | HCommit}

A GET operation retrieves run-time information about the selected transactions. The following list describes the meaning of the TA_STATE attribute returned in response to a GET request. All states are ACTive equivalent for purposes of permissions checking.

ACTive

The transaction is active.

ABortonlY

The transaction has been identified for rollback.

ABorteD

The transaction has been identified for rollback and rollback has been initiated.

COMcalled

The initiator of the transaction has called tpcommit() and the first phase of 2-phase commit has begun.

REAdy

All of the participating groups on the retrieval site have successfully completed the first phase of two-phase commit and are ready to be committed.

DECided

The second phase of the 2-phase commit has begun.

SUSpended

The initiator of the transaction has suspended processing on the transaction.

SET: {HABort | HCOmmit}

A SET operation updates the state of the selected transactions. The following list describes the meaning of the TA_STATE attribute returned by a SET request. States not listed cannot be set.

HABort

Heuristically abort the transaction. Successful return leaves the object in the HABort state.

HCOmmit

Heuristically commit the transaction. Successful return leaves the object in the HCOmmit state.

Portability

The existing FML32 and ATMI functions necessary to support administrative interaction with BEA Tuxedo system MIBs, as well as the header file and field table mentioned on this reference page, are available on all supported native and workstation platforms.

Interoperability

This MIB is provided only on BEA Tuxedo 6.0 sites and later, both native and Workstation.

If a site running a BEA Tuxedo release earlier than Release 6.0 is active in the application, then administrative access through this MIB is limited as follows.

If sites of differing releases, both greater than or equal to Release 6.0, are interoperating, then information on the older site is available for access and update as defined on the MIB reference page for that release and may be a subset of the information available in the later release.

Examples

Following is a set of code fragments that illustrate how to perform various operations on application queue spaces, queues, messages, and transactions.

Each fragment should be preceded by code that allocates an FML32 typed buffer, such as the following:

rqbuf = tpalloc("FML32", NULL, 0);

After the buffer is populated, each fragment should be followed by code that sends the request and receives the reply, such as the following:

flags = TPNOTRAN | TPNOCHANGE | TPSIGRSTRT;
rval = tpcall(".TMIB", rqbuf, 0, rpbuf, rplen, flags);

See MIB(5) for additional information.

Field Tables

The field table tpadm must be available in the environment to allow access to attribute field identifiers. This can be done at the shell level as follows:

$ FIELDTBLS=tpadm 
$ FLDTBLDIR=${TUXDIR}/udataobj
$ export FIELDTBLS FLDTBLDIR

Header Files

The following header files are needed.

#include <atmi.h> 
#include <fml32.h>
#include <tpadm.h>

Libraries

${TUXDIR}/lib/libtmib.a, ${TUXDIR}/lib/libqm.a, ${TUXDIR}/lib/libtmib.so.<rel>, ${TUXDIR}/lib/libqm.so.<rel>, ${TUXDIR}/lib/libqm.lib

The libraries must be linked manually when using buildclient. The user must use: -L$(TUXDIR)/lib -ltmib -lqm

Create an Application Queue Space

Creating an application queue space typically involves two operations: the first to create the BEA Tuxedo system device in which the queue space will be allocated, and the second to create the queue space itself.

/* Allocate the buffer; see above */ 

/* Build the request to create a new device on SITE1 */
Fchg32(rqbuf, TA_OPERATION, 0, "SET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_DEVICE", 0);
Fchg32(rqbuf, TA_STATE, 0, "NEW", 0);
Fchg32(rqbuf, TA_CFGDEVICE, 0, "/dev/q/dsk001", 0);
Fchg32(rqbuf, TA_LMID, 0, "SITE1", 0);
size = 500;
Fchg32(rqbuf, TA_DEVSIZE, 0, (char *)size, 0);

/* Make the request; see above */

/* Reinitialize the same buffer for reuse */
Finit32(rqbuf, (FLDLEN) Fsizeof32(rqbuf));

/* Build the request to create the queue space */
Fchg32(rqbuf, TA_OPERATION, 0, "SET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_APPQSPACE", 0);
Fchg32(rqbuf, TA_STATE, 0, "NEW", 0);
Fchg32(rqbuf, TA_APPQSPACENAME, 0, "QSPACE1", 0);
Fchg32(rqbuf, TA_QMCONFIG, 0, "/dev/q/dsk001", 0);
Fchg32(rqbuf, TA_LMID, 0, "SITE1", 0);
Fchg32(rqbuf, TA_ERRORQNAME, 0, "errque", 0);
ipckey = 123456;
Fchg32(rqbuf, TA_IPCKEY, 0, (char *)ipckey, 0);
maxmsg = 100;
Fchg32(rqbuf, TA_MAXMSG, 0, (char *)maxmsg, 0);
maxpages = 200;
Fchg32(rqbuf, TA_MAXPAGES, 0, (char *)maxpages, 0);
maxproc = 50;
Fchg32(rqbuf, TA_MAXPROC, 0, (char *)maxproc, 0);
maxqueues = 10;
Fchg32(rqbuf, TA_MAXQUEUES, 0, (char *)maxqueues, 0);
maxtrans = 100;
Fchg32(rqbuf, TA_MAXTRANS, 0, (char *)maxtrans, 0);

/* Make the request; see above */

Add a Queue to an Application Queue Space

The following code creates a new queue in the queue space created in the previous example.

/* Build the request */ 
Fchg32(rqbuf, TA_OPERATION, 0, "SET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_APPQ", 0);
Fchg32(rqbuf, TA_STATE, 0, "NEW", 0);
Fchg32(rqbuf, TA_APPQNAME, 0, "errque", 0);
Fchg32(rqbuf, TA_APPQSPACENAME, 0, "QSPACE1", 0);
Fchg32(rqbuf, TA_QMCONFIG, 0, "/dev/q/dsk001", 0);
Fchg32(rqbuf, TA_LMID, 0, "SITE1", 0);
Fchg32(rqbuf, TA_APPQORDER, 0, "PRIO", 0);

/* Make the request; see above */

List Application Queue Spaces Known to the Application

To list the application queue spaces known to an application, a two-level search is used. First, the groups using the /Q transaction manager TMS_QM are retrieved from the application configuration, and then the queue space referenced by each group is retrieved. The following code fragment assumes that each GROUP entry involving a queue space has a single logical machine associated with it (that is, server migration is not used).

List Application Queue Spaces Known to the Application


/* Build the request to retrieve all TMS_QM groups */
Fchg32(rqbuf, TA_OPERATION, 0, "GET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_GROUP", 0);
Fchg32(rqbuf, TA_TMSNAME, 0, "TMS_QM", 0);
fldid1 = TA_OPENINFO;
fldid2 = TA_LMID;
Fchg32(rqbuf, TA_FILTER, 0, (char *)fldid1, 0);
Fchg32(rqbuf, TA_FILTER, 0, (char *)fldid2, 1);

/* Make the request, assuming we are joined to the application */
rval = tpcall(".TMIB", rqbuf, 0, rpbuf, rplen, flags);

/* For each TMS_QM group, build the request to retrieve its queue space */
rval = Fget32(*rpbuf, TA_OCCURS, 0, (char *)occurs, NULL);
for (i = 0; i occurs; i++) {


/* Reinitialize the buffer and set all common attributes */
Finit32(rqbuf, (FLDLEN) Fsizeof32(rqbuf));
Fchg32(rqbuf, TA_OPERATION, 0, "GET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_APPQSPACE", 0);

/* Get the OPENINFO to determine device and queue space name */
/* OPENINFO has the format <resource-mgr>:<qmconfig>:<appqspacename> */
/* or on NT <resource-mgr>:<qmconfig>;<appqspacename> */
rval = Fget32(rpbuf, TA_OPENINFO, i, openinfo, NULL);

/* The device is the 2nd field in OPENINFO */
qmconfig = strchr(openinfo, ':') + 1;
/* The queue space name is the 3rd field in OPENINFO */

#if defined(_TMDOWN) || defined(_TM_NETWARE)
#define pathsep ";" /* separtor for PATH */
#else
#define pathsep ":" /* separtor for PATH */
#endif
appqspacename = strchr(qmconfig, pathsep);
appqspacename[0] = '\e0'; /* null-terminate qmconfig */
appqspacename++; /* bump past the null */

/* Set the APPQSPACENAME and QMCONFIG keys */
Fchg32(rqbuf, TA_APPQSPACENAME, 0, appqspacename, 0);
Fchg32(rqbuf, TA_QMCONFIG, 0, qmconfig, 0);

/* Get the LMID (assume no migration for this group) */
rval = Fget32(rpbuf, TA_LMID, i, lmid, NULL);
Fchg32(rqbuf, TA_LMID, 0, lmid, 0);

/* Make the request */
rval = tpcall(".TMIB", rqbuf, 0, rpbuf2, rplen2, flags);
}


The above technique does not find any queue space that has been created but does not yet have a corresponding GROUP entry in the application configuration. Such queue spaces must be retrieved by knowing a priori the key fields (that is, TA_APPQSPACENAME, TA_QMCONFIG, and TA_LMID) for the queue space.

List Messages in an Application Queue

The following code retrieves all messages in the queue STRING in the queue space QSPACE1 in device /dev/q/dsk001 on logical machine SITE1.

/* Build the request */ Fchg32(rqbuf, TA_OPERATION, 0, "GET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_APPQMSG", 0);
Fchg32(rqbuf, TA_APPQNAME, 0, "STRING", 0);
Fchg32(rqbuf, TA_APPQSPACENAME, 0, "QSPACE1", 0);
Fchg32(rqbuf, TA_QMCONFIG, 0, "/dev/q/dsk001", 0);
Fchg32(rqbuf, TA_LMID, 0, "SITE1", 0);
/* Make the request; see above */

List Transactions Involving a Queue Space

The following fragment retrieves all transactions involving (any queue in) the queue space QSPACE1.

/* Build the request */ Fchg32(rqbuf, TA_OPERATION, 0, "GET", 0);
Fchg32(rqbuf, TA_CLASS, 0, "T_APPQTRANS", 0);
Fchg32(rqbuf, TA_APPQSPACENAME, 0, "QSPACE1", 0);
Fchg32(rqbuf, TA_QMCONFIG, 0, "/dev/q/dsk001", 0);
Fchg32(rqbuf, TA_LMID, 0, "SITE1", 0);
/* Make the request; see above */

Files

${TUXDIR}/include/tpadm.h
${TUXDIR}/udataobj/tpadm

See Also

tpacall(3c), tpadmcall(3c), tpalloc(3c), tpcall(3c), tpdequeue(3c), tpenqueue(3c), tpgetrply(3c), tprealloc(3c), Introduction to FML Functions, Fadd, Fadd32(3fml), Fchg, Fchg32(3fml), Ffind, Ffind32(3fml), MIB(5), TM_MIB(5)

Setting Up a BEA Tuxedo Application

Administering a BEA Tuxedo Application at Run Time

Programming a BEA Tuxedo Application Using C

Programming a BEA Tuxedo Application Using FML