web analytics

Bea Tuxedo Application-to-Transaction Monitor Interface (ATMI) In C/C++

Options
@2016-04-06 16:09:20

C Language TX Return Codes and Other Definitions

The following return code and flag definitions are used by the TX routines. For an application to work with different transaction monitors without change or recompilation, each system must define its flags and return codes as follows:

#define TX_H_VERSION           0           /* current version of this
                                            * header file */
 
 /*
  * Transaction identifier
  */
  #define XIDDATASIZE          128         /* size in bytes */
  struct xid_t {
         long formatID;                    /* format identifier */
         long gtrid_length;                /* value not to exceed 64 */
         long bqual_length;                /* value not to exceed 64 */
         char data[XIDDATASIZE];
  };
  typedef struct xid_t XID;
  /*
  * A value of -1 in formatID means that the XID is null.
  */
 
 /*
  * Definitions for tx_ routines
  */
  /* commit return values */
  typedef long COMMIT_RETURN;
  #define TX_COMMIT_COMPLETED 0
  #define TX_COMMIT_DECISION_LOGGED 1
 
 /* transaction control values */
  typedef long TRANSACTION_CONTROL;
  #define TX_UNCHAINED 0
  #define TX_CHAINED 1
 
 /* type of transaction timeouts */
  typedef long TRANSACTION_TIMEOUT;
 
 /* transaction state values */
  typedef long TRANSACTION_STATE;
  #define TX_ACTIVE 0
  #define TX_TIMEOUT_ROLLBACK_ONLY 1
  #define TX_ROLLBACK_ONLY 2
 
 /* structure populated by tx_info */
  struct tx_info_t {
         XID xid;
         COMMIT_RETURN when_return;
         TRANSACTION_CONTROL transaction_control;
         TRANSACTION_TIMEOUT transaction_timeout;
         TRANSACTION_STATE   transaction_state;
  };
  typedef struct tx_info_t TXINFO;
 
 
 /*
  * tx_ return codes
  * (transaction manager reports to application)
  */
  #define TX_NOT_SUPPORTED            1 /* option not supported */
  #define TX_OK                       0 /* normal execution */
  #define TX_OUTSIDE                 -1 /* application is in an RM
                                         * local transaction */
  #define TX_ROLLBACK                -2 /* transaction was rolled
                                         * back */
  #define TX_MIXED                   -3 /* transaction was
                                         * partially committed and
                                         * partially rolled back */
  #define TX_HAZARD                  -4 /* transaction may have been
                                         * partially committed and
                                         * partially rolled back */
  #define TX_PROTOCOL_ERROR          -5 /* routine invoked in an
                                         * improper context */
  #define TX_ERROR                   -6 /* transient error */
  #define TX_FAIL                    -7 /* fatal error */
  #define TX_EINVAL                  -8 /* invalid arguments were given */
  #define TX_COMMITTED               -9 /* transaction has
                                         * heuristically committed */
 
  #define TX_NO_BEGIN                -100 /* transaction committed plus
                                           * new transaction could not
                                           * be started */
  #define TX_ROLLBACK_NO_BEGIN       (TX_ROLLBACK+TX_NO_BEGIN)
                                          /* transaction rollback plus
                                           * new transaction could not
                                           * be started */
  #define TX_MIXED_NO_BEGIN          (TX_MIXED+TX_NO_BEGIN)
                                          /* mixed plus new transaction
                                           * could not be started */
  #define TX_HAZARD_NO_BEGIN         (TX_HAZARD+TX_NO_BEGIN)
                                          /* hazard plus new transaction
                                           * could not be started */
  #define TX_COMMITTED_NO_BEGIN      (TX_COMMITTED+TX_NO_BEGIN)
                                          /* heuristically committed plus
                                           * new transaction could not
                                           * be started */
@2016-04-06 21:19:49

tperrno:1 : TPEABORT - transaction cannot commit
tperrno:2 : TPEBADDESC - bad communication descriptor
tperrno:3 : TPEBLOCK - blocking condition found
tperrno:4 : TPEINVAL - invalid arguments given
tperrno:5 : TPELIMIT - a system limit has been reached
tperrno:6 : TPENOENT - no entry found
tperrno:7 : TPEOS - operating system error
tperrno:8 : TPEPERM - bad permissions
tperrno:9 : TPEPROTO - protocol error
tperrno:10 : TPESVCERR - server error while handling request
tperrno:11 : TPESVCFAIL - application level service
tperrno:12 : TPESYSTEM - internal system error
tperrno:13 : TPETIME - timeout occured
tperrno:14 : TPETRAN - error starting transaction
tperrno:15 : TPGOTSIG - signal received and TPSIGRSTRT not specified
tperrno:16 : TPERMERR - resource manager error
tperrno:17 : TPEITYPE - type and/or subtype do not match service's
tperrno:18 : TPEOTYPE - type and/or subtype do not match buffer's or unknown
tperrno:19 : TPERELEASE - invalid release
tperrno:20 : TPEHAZARD - hazard exists that transaction heuristically completed
tperrno:21 : TPEHEURISTIC - transaction heuristically completed
tperrno:22 : TPEEVENT - event occurred
tperrno:23 : TPEMATCH - service name cannot be advertised due to matching conflict
tperrno:24 : TPEDIAGNOSTIC - function failed - check diagnostic value
tperrno:25 : TPEMIB - Management Information Base access error
#define TPMAXVAL 26 /* maximum error message */

The following list describes the general meaning of each error:
TPEABORT
A transaction could not commit because either the work performed by the
initiator or by one or more of its participants could not commit.
TPEBADDESC
A call descriptor is invalid or is not the descriptor with which a conversational
service was invoked.
TPEBLOCK
A blocking condition exists and TPNOBLOCK was specified.
TPEDIAGNOSTIC
The enqueuing of a message on the specified queue failed. The reason for
failure can be determined by the diagnostic returned via ctl.
TPEEVENT
An event occurred; the event type is returned in revent.
TPEGOTSIG
A signal was received and TPSIGRSTRT was not specified.
TPEHAZARD
Due to some failure, the work done on behalf of the transaction could have
been heuristically completed.
TPEHEURISTIC
Due to a heuristic decision, the work done on behalf of the transaction was
partially committed and partially aborted.
TPEINVAL
An invalid argument was detected.
TPEITYPE
The type and subtype of the input buffer is not one of the types and subtypes
that the service accepts.
TPELIMIT
The caller’s request was not sent because the maximum number of
outstanding requests or connections has been reached.
TPEMATCH
svcname is already advertised for the server but with a function other than
func.
TPEMIB
The administrative request failed. outbuf is updated and returned to the
caller with FML32 fields indicating the cause of the error, as described in
MIB(5) and TM_MIB(5).
TPENOENT
Cannot send to svc because it does not exist or is not the correct type of
service.
TPEOS
An operating system error has occurred.
TPEOTYPE
The type and subtype of the reply are not known to the caller.
TPEPERM
A client cannot join an application because it does not have permission to do
so or because it has not supplied the correct application password.
TPEPROTO
A library routine was called in an improper context.
TPERELEASE
When the TPACK is set and the target is a client from a prior release of the BEA
Tuxedo system that does not support the acknowledgment protocol.
TPERMERR
A resource manager failed to open or close correctly.
TPESVCERR
A service routine encountered an error either in tpreturn() or
tpforward() (for example, bad arguments were passed).
TPESVCFAIL
The service routine sending the caller’s reply called tpreturn() with
TPFAIL. This is an application-level failure.
TPESYSTEM
A BEA Tuxedo system error has occurred.
TPETIME
A timeout occurred.
TPETRAN
The caller cannot be placed in transaction mode.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com