PURPOSE

APPQ_MIB - TUXEDO System /Q Management Information Base

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 manual 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 manual 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(3c) 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 reliable disk-based 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 manual page is found in the file udataobj/tpadm relative to the root directory of the TUXEDO System software installed on the system. The directory ${TUXDIR}/udataobj should be included by the application in the path list (semi-colon separated on NetWare/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 TUXEDO System 6 sites and later, both native and /WS.

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

-
SET operations are not allowed.
 
-
Local information access for sites earlier than Release 6.0 is not available.

T_APPQ Class Definition

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.

T_APPQ Class Definition: 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 (i.e., 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(3c), then all T_APPQ objects within the specified queue space will be retrieved.

T_APPQ Class Definition: Attribute Table

APPQ_MIB(5): T_APPQ Class Definition Attribute Table
Attribute (Note 1) 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 )( * ) (Note 2) string ru-r--r-- string[1..30] N/A
TA_STATE (Note 3) string rw-r--r-- GET:{VAL} N/A
SET:{NEW|INV} N/A
TA_APPQORDER (Note 4) string rw-r--r-- {PRIO|TIME |LIFO|FIFO} FIFO
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_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

( k ) - GET key field (Note 5)

( r ) - Required field for object creation

( * ) - Required SET key field

Note 1.
All attributes of class T_APPQ are local attributes.
Note 2.
TA_LMID must be specified as a key field except when the application is unconfigured (i.e., the TUXCONFIG environment variable is not set).
Note 3.
All operations on T_APPQ objects \(em both GET and SET \(em silently open the associated queue space (i.e., 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.
Note 4.
TA_APPQORDER can not be modified after the application queue is created.
Note 5.
Sufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.

T_APPQ Class Definition: 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. States not listed will not be returned.
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 can not 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 (i.e., 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 or TIME, followed by a comma, optionally followed by another occurrence of PRIO or TIME, followed by one of the values LIFO or FIFO. If neither FIFO nor LIFO is specified, FIFO is assumed. If nothing is specified when a queue is created, the default is FIFO. For example, these are some legal settings:

   PRIO
   PRIO,TIME,LIFO
   TIME,PRIO,FIFO
   TIME,FIFO
TA_CMD:shell-command-string[0..78]
The command to be automatically executed when the high water mark, 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 optionally followed by one of the following keyletters. 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 messages in the queue.
 
B
-- The high and low water marks pertain to the number of blocks used by messages in the queue.
 
m
-- The high and low water marks pertain to the number of messages in the queue.
 
%
-- The high and low water marks are expressed in terms of a percentage of queue capacity.

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_CURBLOCKS: 0 <= num
The number of disk pages currently consumed by the queue.
TA_CURMSG: 0 <= num
The number of messages currently in the queue.
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: {MSGID|TOP|NONE}
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.

T_APPQMSG Class Definition

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(3). A message can be destroyed either by a call to tpdequeue(3) 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.

T_APPQMSG Class Definition: 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 (i.e., 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(3c), then all T_APPQMSG objects in all queues of the specified queue space will be retrieved.

T_APPQMSG Class Definition: Attribute Table

APPQ_MIB(5): T_APPQMSG Class Definition Attribute Table
Attribute (Note 1) 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 )( * ) (Note 2) string r--r--r-- string[1..30] N/A
TA_STATE (Note 3) string rw-r--r-- GET:{VAL} N/A
SET:{INV} 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_CORRID( k ) long r--r--r-- string[0..32] 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_CURRETRIES long r--r--r-- 0 <= num N/A
TA_MSGSIZE long r--r--r-- 0 <= num N/A

( k ) - GET key field (Note 4)

( * ) - Required SET key field

Note 1.
All attributes of class T_APPQMSG are local attributes.
Note 2.
TA_LMID must be specified as a key field except when the application is unconfigured (i.e., the TUXCONFIG environment variable is not set).
Note 3.
All operations on T_APPQMSG objects \(em both GET and SET \(em silently open the associated queue space (i.e., 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.
Note 4.
Sufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.

T_APPQMSG Class Definition: 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. States not listed will not be returned.
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 can not 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_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 and are valid only for PRIO-based queues.
TA_MSGSTARTTIME:
 
TA_MSGENDTIME:
The start and end time within which to search for occurrences of T_APPQMSG objects. The range is inclusive. See TA_TIME for the format. These attributes may only be used as key fields with GET operations and are valid only for TIME-based queues.
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.
TA_PRIORITY: 1 <= num <= 100
The priority of the message. This attribute is valid only for PRIO-based queues. The value -1 is returned by a GET operation if the queue is not PRIO-based.
TA_TIME:
The time when the message will be processed. This attribute is valid only for TIME-based queues. The empty string is returned by a GET operation if the queue is not TIME-based. The format is one of the following:
+seconds
Specifies that the message will be processed seconds in the future. The value zero 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.
TA_MSGSIZE: 0 <= num
The size of the message, in bytes.

T_APPQSPACE Class Definition

T_APPQSPACE Class Definition: Overview

The T_APPQSPACE class represents application queue spaces. An application queue space is an area in a 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.

T_APPQSPACE Class Definition: 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(3c) in the context of an unconfigured application (i.e., 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.

T_APPQSPACE Class Definition: Attribute Table

APPQ_MIB(5): T_APPQSPACE Class Definition Attribute Table
Attribute (Note 1) Type Permissions Values Default
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 )( * ) (Note 2) string ru-r--r-- string[1..30] N/A
TA_STATE( k ) (Note 3) string rwxrwxr-- GET:{INA|INI |OPE|ACT} N/A
SET:{NEW|OPE |CLE|INV} N/A
TA_BLOCKING long rw-r--r-- 0 <= num 16
TA_ERRORQNAME string rw-r--r-- string[0..15] ""
TA_FORCEINIT string rw-r--r-- {Y|N} N
TA_IPCKEY( r ) long rw-r--r-- 32769 <= num <= 262143 N/A
TA_MAXMSG( r ) long rw-r--r-- 0 <= num N/A
TA_MAXPAGES( r ) long rw-r--r-- 0 <= num N/A
TA_MAXPROC( r ) long rw-r--r-- 0 <= num N/A
TA_MAXQUEUES( r ) (Note 4) long rw-r--r-- 0 <= num N/A
TA_MAXTRANS( r ) long rw-r--r-- 0 <= num N/A
TA_CUREXTENT long r--r--r-- 0 <= num = 100 N/A
TA_CURMSG long r--r--r-- { 0 <= num | -1 } N/A
TA_CURPROC long r--r--r-- 0 <= num N/A
TA_CURQUEUES long r--r--r-- { 0 <= num | -1 } N/A
TA_CURTRANS long R--R--R-- 0 <= num N/A
TA_HWMSG long R--R--R-- 0 <= num N/A
TA_HWPROC long R--R--R-- 0 <= num N/A
TA_HWQUEUES long R--R--R-- 0 <= num N/A
TA_HWTRANS long R--R--R-- 0 <= num N/A
TA_PERCENTINIT long r--r--r-- 0 <= num <= 100 N/A

( k ) - GET key field

( r ) - Required field for object creation

( * ) - Required SET key field

Note 1.
All attributes of class T_APPQSPACE are local attributes.
Note 2.
TA_LMID must be specified as a key field except when the application is unconfigured (i.e., the TUXCONFIG environment variable is not set).
Note 3.
All operations on T_APPQ, T_APPQMSG, and T_APPQTRANS objects \(em both GET and SET \(em silently open the associated queue space (i.e., 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.
Note 4.
TA_MAXQUEUES can not be modified after the queue space is created.

T_APPQSPACE Class Definition: 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. States not listed will not be returned.
INActive
The queue space exists; i.e., 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 can not 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. Successful return leaves the object in the INActive state.
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.
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_CUREXTENT: 0 <= num <= 100
The current number of extents used by the queue space. The largest number allowed is 100. Each time the TA_MAXPAGES attribute is increased, a new extent is allocated.
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 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 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 (e.g., regular file or raw slice), initialization can occur even if not requested.
TA_HWMSG: 0 <= num
The highest number of messages 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 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 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 \(em 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_MAXMSG: 0 <= num
The maximum number of messages that the queue space can contain.
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.
TA_MAXTRANS: 0 <= num
The maximum number of simultaneously active transactions allowed by the queue space.
TA_PERCENTINIT: 0 <= num <= 100
The percentage (as an integer between 0 and 100 inclusive) of disk space that has been initialized for the queue space.

T_APPQTRANS Class Definition

T_APPQTRANS Class Definition: Overview

The T_APPQTRANS class represents runtime attributes of transactions associated with application queues.

T_APPQTRANS Class Definition: 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(3c), 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.

T_APPQTRANS Class Definition: Attribute Table

APPQ_MIB(5): T_APPQTRANS Class Definition Attribute Table
Attribute (Note 1) 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_STATE (Note 3) string R-XR-XR-- GET:{ACT|ABY |ABD|COM|REA |DEC|HAB|HCO} N/A
SET:{HAB|HCO} N/A

( k ) - GET key field (Note 2)

( * ) - Required SET key field

Note 1.
All attributes of class T_APPQTRANS are local attributes.
Note 2.
Sufficient key fields must be supplied in a GET operation to explicitly target a single application queue space.
Note 3.
All operations on T_APPQTRANS objects \(em both GET and SET -- silently open the associated queue space (i.e., 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.

T_APPQTRANS Class Definition: Attribute Semantics

TA_XID: string[1..78]
Transaction identifier as returned by tx_info(3c) 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 runtime information about the selected transactions. The following list describes the meaning of the TA_STATE attribute returned in response to a GET request. States not listed will not be returned. 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(3c) and the first phase of two-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 two-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 can not 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 TUXEDO System MIBs, as well as the header file and field table mentioned on this manual page, are available on all supported native and workstation platforms.

INTEROPERABILITY

This MIB is provided only on TUXEDO System 6 sites and later, both native and /WS.

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

-
SET operations are not allowed.
 
-
Local information access for sites earlier than Release 6.0 is not available. If the class being accessed also has global information, then the global information only is returned. Otherwise, an error is returned.
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 manual 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>

Create an Application Queue Space

Creating an application queue space typically involves two operations: the first to create the 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 (i.e., server migration is not used).


/* 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/NetWare        <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	";"	/* separator for PATH */
#else
#define pathsep	":"	/* separator for PATH */
#endif
	appqspacename = strchr(qmconfig, pathsep);
	appqspacename[0] = '\0'; /* 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 (i.e., 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

Fintro(3fml),
Fadd32(3fml),
Fchg32(3fml),
Ffind32(3fml),
tpalloc(3c),
tprealloc(3c),
tpcall(3c),
tpacall(3c),
tpgetrply(3c),
tpadmcall(3c),
tpenqueue(3c),
tpdequeue(3c),
MIB(5),
TM_MIB(5)
BEA TUXEDO Administrator's Guide
BEA TUXEDO Programmer's Guide