V. 0.1
Revision History | ||
---|---|---|
Revision 0.1 | 5 Sep 2008 | dn |
separated from qore documentation |
The "tuxedo" module provides a Qore-language client API to BEA Tuxedo services.
Note that the code in this module is not available with the PO_NO_NETWORK
parse option.
To use this module, include the following line in the qore program to load the module:
%requires tuxedo
The TuxedoAdapter class is used to communicate with Tuxedo servers. Detailed description of Tuxedo interface can be found on Tuxedo 9.1 reference and related pages. TuxedoAdapter class provides multithread safe wrapper over messaging part of Tuxedo API. Constants from Tuxedo API (like TPAPPAUTH
) are all exposed in Tuxedo namespace.
Table�1.�TuxedoAdapter Class Method Overview
Method |
Except? |
Description |
---|---|---|
Y |
Creates the Tuxedo adapter based on parameters passed as a hash. | |
N |
Destroys the TuxedoAdapter object. | |
Y |
Copying objects of this class is not supported, an exception will be thrown. | |
Y |
Calls a Tuxedo service, returns the reply. | |
Y |
Calls an Tuxedo service and returns immediatelly The reply can be retrieved later. | |
Y |
Waits for a reply for an asynchronous call. | |
Y |
Cancels reply from an asynchonous call. | |
Y |
Puts data into a Tuxedo queue. | |
Y |
Retrieves data from a Tuxedo queue. | |
Y |
Opens new communication with a Tuxedo service in conversational mode. | |
Y |
Forcibly closes a communication in conversational mode. | |
Y |
Sends data to a Tuxedo service in conversational mode. | |
Y |
Retrieves data from a Tuxedo service in conversational mode. | |
Y |
Connects with the Tuxedo (not TX) resource manager. | |
Y |
Disconnects from the Tuxedo (not TX) resource manager. | |
Y |
Connects with the X/Open (TX) compatible resource manager. | |
Y |
Disconnects from the X/Open (TX) compatible resource manager. | |
Y |
Starts a Tuxedo transaction. | |
Y |
Commits a Tuxedo transaction. | |
Y |
Rolls back a Tuxedo transaction. | |
Y |
Temporarily suspends a Tuxedo transaction. | |
Y |
Resumes suspended Tuxedo transaction. | |
N |
Returns information whether a Tuxedo transaction is currently active. | |
Y |
Sets a commit protocol used by the Tuxedo transaction. | |
Y |
Sets a commit protocol used by the Tuxedo transaction. | |
Y |
Starts a X/Open compatible transaction. | |
Y |
Commits a X/Open compatible transaction. | |
Y |
Rolls back a X/Open compatible transaction. | |
Y |
Sets a commit protocol used by the X/Open compatible transaction. | |
Y |
Sets a commit protocol used by the X/Open compatible transaction. | |
Y |
Finishing one X/Open compatible transaction will automatically start the next one. | |
Y |
Each X/Open compatible transaction needs to be started explicitly. | |
Y |
Sets timeout for X/Open compatible transaction commit. | |
Y |
Sets the string encoding for the object; any strings serialized and deserialized with this object will be tagged with this character encoding. | |
N |
Converts numeric Tuxedo error code into a descriptive text. | |
N |
Writes a message into Tuxedo log file. | |
N |
Returns details (an error code) for the last failed Tuxedo call. | |
Y |
Returns numeric priority used by Tuxedo. | |
Y |
Sets numeric priority used by Tuxedo. | |
Y |
Generates a Tuxedo event. |
Creates the TuxedoAdapter instance based on the passed settings.
TuxedoAdapter::constructor(settings
)
Table�2.�Arguments for TuxedoAdapter::constructor()
Argument |
Type |
Description |
---|---|---|
Tuxedo connection settings |
Hash |
The passed settings (Hash) could and should to set up all relevant parameters to connect a Tuxedo server. The environment variables, used by Tuxedo C API don't need to be set explicitly. They will be examined if and only if their equivalent is not present among the settings. See tpinit() documentation for details. All recognized settings are listed in the table TuxedoAdapter::constructor settings bellow.
The settings names are case insensitive. Unrecognized settings result in the exception |
Table�3.�Return Values for TuxedoAdapter::constructor()
Return Type |
Description |
---|---|
Object |
The newly create TuxedoAdapter object |
Table�4.�Exceptions thrown by TuxedoAdapter::constructor()
err |
desc |
---|---|
|
Invalid or unrecognized value of settings |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Table�5.�Settings for TuxedoAdapter::constructor()
Value | Type | Description | Default |
---|---|---|---|
| String | Full path to the directory where Tuxedo is installed. Environment variable TUXDIR is used if this value is not present among the settings | required explicitly |
| String | Full path to the configuration file used by this TuxedoAdapter instance. Environment variable TUXCONFIG is used if this value is not present among the settings | required explicitly |
| String | User name to connect the Tuxedo server. See tpinit() documentation for details. | empty string |
| String | Password required to connect the Tuxedo server. See tpinit() documentation for details. | empty string |
| String | Client name to connect the Tuxedo server. See tpinit() documentation for details. | empty string |
| String | Group name to connect the Tuxedo server. See tpinit() documentation for details. | empty string |
| Binary | Binary data that are passed to the Tuxedo server during connection. See tpinit() documentation for details. | no data passed |
| Integer | Flags passed to the
tpinit().
The flag |
|
| String | Encoding used for all sent and retrieved strings. | 'UTF8' |
| Integer | Flags used as a default when the TuxedoAdapter::call() does not specify them explicitly. If this settings is not present the TuxedoAdapter::call() requires the 'flags' parameter. See tpcall() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::asyncCall() does not specify them explicitly. If this settings is not present the TuxedoAdapter::asyncCall() requires the 'flags' parameter. See tpacall() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::waitForAsyncReply() does not specify them explicitly. If this settings is not present the TuxedoAdapter::waitForAsyncReply() requires the 'flags' parameter. See tpgetrply() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::postEvent() does not specify them explicitly. If this settings is not present the TuxedoAdapter::postEvent() requires the 'flags' parameter. See tppost() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::joinConversation() does not specify them explicitly. If this settings is not present the TuxedoAdapter::joinConversation() requires the 'flags' parameter. See tpconnect() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::sendConversationData() does not specify them explicitly. If this settings is not present the TuxedoAdapter::sendConversationData() requires the 'flags' parameter. See tpsend() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::receiveConversationData() does not specify them explicitly. If this settings is not present the TuxedoAdapter::receiveConversationData() requires the 'flags' parameter. See tprecv() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::enqueue() does not specify them explicitly. If this settings is not present the TuxedoAdapter::enqueue() requires the 'flags' parameter. See tpenqueue() documentation for details. | n/a |
| Integer | Flags used as a default when the TuxedoAdapter::dequeue() does not specify them explicitly. If this settings is not present the TuxedoAdapter::dequeue() requires the 'flags' parameter. See tpdequeue() documentation for details. | n/a |
| String (either 'FML' or 'FML32') | Selects into which FML type Hash data will be serialized if no direct hint is given. If this settings is not present then any function serializing Hash data requires explicit hint about the result FML type. | 'FML32' |
| String | If used it should be full file path to a text file formatted according to
FML description file specification.
This file should describe all FML data used by this instance of TuxedoAdapter. The file is read
only during construction of the adapter. This settings is mutually exclusive with
| n/a |
| Hash | Description of all FML data used by this instance of TuxedoAdapter.
The key is FML item name, the value is integer (e.g. | n/a |
| Integer | Base offset of the FML items specified by the DefaultFmlDescription. Used only when DefaultFmlDescription is also specified. For details see FML description file specification. | 0 |
| String | If used it should be full file path to a text file formatted according to
FML32 description file specification.
This file should describe all FML32 data used by this instance of TuxedoAdapter. The file is read
only during construction of the adapter. This settings is mutually exclusive with
| n/a |
| Hash | Description of all FML32 data used by this instance of TuxedoAdapter.
The key is FML32 item name, the value is integer (e.g. | n/a |
| Integer | Base offset of the FML32 items specified by the DefaultFmlDescription. Used only when DefaultFml32Description is also specified. For details see FML32 description file specification. | 0 |
| Integer (1..100) | Default Priority used for communication with Tuxedo servers. TuxedoAdapter::setPriority() can be used later to change the priority again. See tpspprio() documentation for details. | set in configuration file |
| String 'AfterDataAreLogged' or 'AfterTwoPhaseCompletes' | Specifies which mechanism is used when Tuxedo transaction (NOT TX transaction) commits. The settings could be changed later by TuxedoAdapter::finishCommitAfterDataLogged() or TuxedoAdapter::finishCommitAfterTwoPhaseCompletes(). See tpscmt() documentation for details. | set in configuration file |
| String 'AfterDataAreLogged' or 'AfterTwoPhaseCompletes' | Specifies which mechanism is used when X/Open (TX) transaction commits. The settings could be changed later by TuxedoAdapter::finishTxCommitAfterDataLogged() or TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes(). See tx_set_commit_return() documentation for details. | 'AfterTwoPhaseCompletes' |
| Boolean | Specifies whether a new X/Open (TX) transaction starts automatically after commit or rollback (when value is True) or whether it needs to be started explicitly by TuxedoAdapter::beginTxTransaction() (when value is False). See tx_set_transaction_control() documentation for details. | False |
| String | Equivalent of WSENVFILE environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSNADDR environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSFADDR environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSFRANGE environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSDEVICE environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSTYPE environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of WSRPLYMAX environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of TMMINENCRYPTBITS environment variable described in tpinit() documentation. | empty string |
| String | Equivalent of TMMAXENCRYPTBITS environment variable described in tpinit() documentation. | empty string |
Destroys the TuxedoAdapter object. All pending asynchronous calls are cancelled, all opened conversations are forcibly stopped, the connection to Tuxedo is terminated.
TuxedoAdapter::destructor()
Table�6.�Arguments for TuxedoAdapter::destructor()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�7.�Return Values for TuxedoAdapter::destructor()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Copying objects of this class is not supported, an exception will be thrown.
TuxedoAdapter::copy()
Table�8.�Arguments for TuxedoAdapter::copy()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�9.�Return Values for TuxedoAdapter::copy()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�10.�Exceptions thrown by TuxedoAdapter::copy()
err |
desc |
---|---|
|
objects of this class may not be copied |
Invokes a Tuxedo service, waits for the reply and converts it into returned data structure. See tpcall() documentation for details.
TuxedoAdapter:call(service name, data [, flags]
)
Table�11.�Arguments for TuxedoAdapter::call()
Argument |
Type |
Description |
---|---|---|
|
String |
As defined in configuration file (TUXCONFIG). |
|
NOTHING,String, Binary or Hash |
Data serialized into the Tuxedo format and passed to the service. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tpcall(). Hash value may contrain following items: bool value 'use_fml32' (whether to process Hash data as FML or FML32), integer value 'flags' (the same as for tpcall()) and string value 'DefaultReturnedDataType' (allowed values 'CARRAY', 'STRING', 'FML' or 'FML32') giving a hint of output data type. If the TuxedoAdapter constructor did not specified 'DefaultFlagsForCall' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�12.�Return Values for TuxedoAdapter::call()
Return Type |
Description |
---|---|
String, Binary or Hash |
Received reply converted into a Qore datatype. FML and FML32 are encoded into the Hash. |
Table�13.�Exceptions thrown by TuxedoAdapter::call()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Invokes a Tuxedo service asynchronously, without waiting for the reply. See tpacall() documentation for details. To retrieve the reply use TuxedoAdapter::waitForAsyncReply() or cancel the pending reply with TuxedoAdapter::cancelAsyncCall(). The same service may be called either synchronously with TuxedoAdapter::call() or asynchronously.
TuxedoAdapter:asyncCall(service name, data [, flags]
)
Table�14.�Arguments for TuxedoAdapter::asyncCall()
Argument |
Type |
Description |
---|---|---|
|
String |
As defined in configuration file (TUXCONFIG). |
|
NOTHING, String, Binary or Hash |
Data serialized into the Tuxedo format and passed to the service. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tpacall(). Hash value may contrain following items: bool value 'use_fml32' (whether to process Hash data as FML or FML32), integer value 'flags' (the same as for tpacall()) and If the TuxedoAdapter constructor did not specified 'DefaultFlagsForAsyncCall' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�15.�Return Values for TuxedoAdapter::asyncCall()
Return Type |
Description |
---|---|
Integer |
Handle used to later retrieve the pending reply with TuxedoAdapter::waitForAsyncReply(). To cancel the call TuxedoAdapter::cancelAsyncCall(). All pending asynchronous calls are automatically cancelled when the TuxedoAdapter instance is destroyed. |
Table�16.�Exceptions thrown by TuxedoAdapter::asyncCall()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Waits for reply started by TuxedoAdapter::asyncCall() and not cancelled by TuxedoAdapter::cancelAsyncCall(). See tpgetrply() documentation for details.
Table�17.�Arguments for TuxedoAdapter::waitForAsyncReply()
Argument |
Type |
Description |
---|---|---|
|
Integer |
The value returned by TuxedoAdapter::asyncCall() and not yet cancelled or used in another waitForAsyncReply(). |
|
Integer or Hash |
Integer with values as described in tpacall() documentation. The Hash may contain: string value 'DefaultReturnedDataType' (valid values are 'CARRAY', 'STRING', 'FML', 'FML32') which provides hint about output data type (Tuxedo may ignore this hint) and integer 'flags' (the same as for tpgetrply()). If the TuxedoAdapter constructor did not specified 'DefaultFlagsForwaitForAsyncReply' settings then the 'flags' needs to be present (either as the integer or part of the hash). |
Table�18.�Return Values for TuxedoAdapter::waitForAsyncReply()
Return Type |
Description |
---|---|
String, Binary or Hash |
Received reply converted into a Qore type. |
Table�19.�Exceptions thrown by TuxedoAdapter::waitForAsyncReply()
err |
desc |
---|---|
|
Missing or invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Cancels asynchronous call to a Tuxedo service started by the TuxedoAdapter::asyncCall() See tpcancel() documentation for details. When TuxedoAdapter object is destroyed all pending asynchronous calls are cancelled automatically.
TuxedoAdapter::cancelAsyncCall(handle
)
Table�20.�Arguments for TuxedoAdapter::cancelAsyncCall()
Argument |
Type |
Description |
---|---|---|
|
Integer |
The value returned by TuxedoAdapter::asyncCall(), neither cancelled nor used by a TuxedoAdapter::waitForAsyncReply(). |
Table�21.�Return Values for TuxedoAdapter::cancelAsyncCall()
Return Type |
Description |
---|---|
n/a |
This method does not return any value. |
Table�22.�Exceptions thrown by TuxedoAdapter::cancelAsyncCall()
err |
desc |
---|---|
|
Missing or invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Puts data into a Tuxedo queue. For details see tpenqueue() documentation.
TuxedoAdapter::enqueue(queue space, queue name, data [, flags]
)
Table�23.�Arguments for TuxedoAdapter::enqueue()
Argument |
Type |
Description |
---|---|---|
|
String |
Queue identifier #1. |
|
String |
Queue identifier #2. |
|
NOTHING, String, Binary or Hash |
Data serialized into the Tuxedo format and put to the queue. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
Integer with values as described in tpenqueue() documentation. The Hash may contain: bool value 'use_fml32' (hint whether Hash data are converted into FML or FML32), integer value 'flags' (the same as for tpenqueue()), integer queue control parameters 'queue_control_flags, 'queue_control_deq_time', 'queue_control_priority', 'queue_control_exp_time', 'queue_control_delivery_qos', queue_control_reply_qos', 'queue_control_urcode' and binary queue parameters queue_control_msgid', 'queue_control_corrid'. See tpenqueue() documentation for details on queue control parameters. If the TuxedoAdapter constructor did not specified 'DefaultFlagsForEnqueue' settings then the 'flags' needs to be present (either as the integer or part of the hash). |
Table�24.�Return Values for TuxedoAdapter::enqueue()
Return Type |
Description |
---|---|
Hash |
Result of the operation is returned: binary value 'queue_control_msgid' contains generated ID for the data put into the queue, integer value 'queue_control_diagnostic' contains diagnostic of the tpenqueue() call. See tpenqueue() documentation for details. |
Table�25.�Exceptions thrown by TuxedoAdapter::enqueue()
err |
desc |
---|---|
|
Missing or invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Retrieves data from a Tuxedo queue. For details see tpdequeue() documentation.
TuxedoAdapter::dequeue(queue space, queue name, [, flags]
)
Table�26.�Arguments for TuxedoAdapter::dequeue()
Argument |
Type |
Description |
---|---|---|
|
String |
Queue identifier #1. |
|
String |
Queue identifier #2. |
|
Integer or Hash |
Integer with values as described in tpdequeue() documentation. The Hash may contain: integer value 'flags' (the same as for tpdequeue()), integer queue control parameter 'queue_control_flags' and binary queue control parameters 'queue_control_msgid' and 'queue_control_corrid'. If the TuxedoAdapter constructor did not specified 'DefaultFlagsForDequeue' settings then the 'flags' needs to be present (either as the integer or part of the hash). |
Table�27.�Return Values for TuxedoAdapter::dequeue()
Return Type |
Description |
---|---|
Hash |
Result of the call: data fetched from the queue (the value named 'data') and integer queue control parameters 'queue_control_flags' and 'queue_control_priority'. See tpdequeue() documentation for details. |
Table�28.�Exceptions thrown by TuxedoAdapter::dequeue()
err |
desc |
---|---|
|
Missing or invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |
Connects a Tuxedo service in conversational mode, if provided a data is sent. See tpconnect() documentation for details.
TuxedoAdapter::joinConversation(service name, data [, flags]
)
Table�29.�Arguments for TuxedoAdapter::joinConversation()
Argument |
Type |
Description |
---|---|---|
|
String |
As defined in configuration file (TUXCONFIG). |
|
NOTHING,String, Binary or Hash |
Data serialized into the Tuxedo format and passed to the service. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tpconnect(). Hash value may contrain following items: bool value 'use_fml32' (whether to process Hash data as FML or FML32) and integer value 'flags' (the same as for tpconnect()). If the TuxedoAdapter constructor did not specified 'DefaultFlagsForJoinConversation' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�30.�Return Values for TuxedoAdapter::call()
Return Type |
Description |
---|---|
Integer |
Descriptor of the established conversation. The descriptor is used by TuxedoAdapter::sendConversationData(), TuxedoAdapter::receiveConversationData() and TuxedoAdapter::breakConversation(). When the TuxedoAdapter instance gets destroyed all remaining opened conversations are broken automatically. |
Table�31.�Exceptions thrown by TuxedoAdapter::joinConversation()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Forcibly breaks an established conversational mode. See tpdiscon() documentation for details. This is NOT the recomended way to close such a connection.
TuxedoAdapter::breakConversation(service descriptor
)
Table�32.�Arguments for TuxedoAdapter::joinConversation()
Argument |
Type |
Description |
---|---|---|
|
Integer |
A valid conversation descriptor returned by TuxedoAdapter::joinConversation(). |
Table�33.�Return Values for TuxedoAdapter::breakConversation()
Return Type |
Description |
---|---|
n/a |
This method doesn't return any value. |
Table�34.�Exceptions thrown by TuxedoAdapter::joinConversation()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Sends data in conversational mode. See tpsend() documentation for details.
TuxedoAdapter:sendConversationData(conversation descriptor, data [, flags]
)
Table�35.�Arguments for TuxedoAdapter::sendConversationData()
Argument |
Type |
Description |
---|---|---|
|
Integer |
A valid descriptor returned by TuxedoAdapter::joinConversation(). |
|
NOTHING,String, Binary or Hash |
Data serialized into the Tuxedo format and passed to the service. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tpsend(). Hash value may contrain following items: bool value 'use_fml32' (whether to process Hash data as FML or FML32) and integer value 'flags' (the same as for tpsend()). If the TuxedoAdapter constructor did not specified 'DefaultFlagsForSendConversationData' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�36.�Return Values for TuxedoAdapter::sendConversationData()
Return Type |
Description |
---|---|
Integer |
Event, indicating state of the conversation. See tpsend() documentation for allowed values and their interpretation. |
Table�37.�Exceptions thrown by TuxedoAdapter::sendConversationData()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Receive data in conversational mode. See tprecv() documentation for details.
TuxedoAdapter:receiveConversationData(conversation descriptor [, flags]
)
Table�38.�Arguments for TuxedoAdapter::receiveConversationData()
Argument |
Type |
Description |
---|---|---|
|
Integer |
A valid descriptor returned by TuxedoAdapter::joinConversation(). |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tprecv(). Hash value may contrain following items: integer value 'flags' (the same as for tprecv()) and string value 'DefaultReturnedDataType' (allowed values 'CARRAY', 'STRING', 'FML' or 'FML32') giving a hint of output data type. If the TuxedoAdapter constructor did not specified 'DefaultFlagsForReceiveConversationData' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�39.�Return Values for TuxedoAdapter::receiveConversationData()
Return Type |
Description |
---|---|
Hash |
The retrned Hash contains item 'data' with received reply converted into a Qore datatype (FML and FML32 are encoded into a Hash) and item 'event' indicating state of the conversation. See tprecv() documentation for details about the events. |
Table�40.�Exceptions thrown by TuxedoAdapter::receiveConversationData()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpopen(). Use TuxedoAdapter::closeResourceManager() to close the manager.
TuxedoAdapter::openResourceManager()
Table�41.�Arguments for TuxedoAdapter::openResourceManager()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�42.�Return Values for TuxedoAdapter::openResourceManager()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�43.�Exceptions thrown by TuxedoAdapter::openResourceManager()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpclose(). The manager is opened by calling TuxedoAdapter::openResourceManager().
TuxedoAdapter::closeResourceManager()
Table�44.�Arguments for TuxedoAdapter::closeResourceManager()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�45.�Return Values for TuxedoAdapter::closeResourceManager()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�46.�Exceptions thrown by TuxedoAdapter::closeResourceManager()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_open(). Use TuxedoAdapter::closeTxResourceManager() to close the manager.
TuxedoAdapter::openTxResourceManager()
Table�47.�Arguments for TuxedoAdapter::openTxResourceManager()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�48.�Return Values for TuxedoAdapter::openTxResourceManager()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�49.�Exceptions thrown by TuxedoAdapter::openTxResourceManager()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_close(). Use TuxedoAdapter::openTxResourceManager() to open the manager.
TuxedoAdapter::closeTxResourceManager()
Table�50.�Arguments for TuxedoAdapter::closeTxResourceManager()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�51.�Return Values for TuxedoAdapter::closeTxResourceManager()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�52.�Exceptions thrown by TuxedoAdapter::closeTxResourceManager()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpbegin().
TuxedoAdapter::beginTransaction([timeout sec]
)
Table�53.�Arguments for TuxedoAdapter::beginTransaction()
Argument |
Type |
Description |
---|---|---|
[timeout sec] |
Integer or Date/Time |
Timeout in seconds. Default is zero which means no timeout (waiting forever). |
Table�54.�Return Values for TuxedoAdapter::beginTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�55.�Exceptions thrown by TuxedoAdapter::beginTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpcommit().
TuxedoAdapter::commitTransaction()
Table�56.�Arguments for TuxedoAdapter::commitTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�57.�Return Values for TuxedoAdapter::commitTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�58.�Exceptions thrown by TuxedoAdapter::commitTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpabort().
TuxedoAdapter::abortTransaction()
Table�59.�Arguments for TuxedoAdapter::abortTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�60.�Return Values for TuxedoAdapter::abortTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�61.�Exceptions thrown by TuxedoAdapter::abortTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpgetlev().
TuxedoAdapter::beginTransactionRunning()
Table�62.�Arguments for TuxedoAdapter::isTransactionRunning()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�63.�Return Values for TuxedoAdapter::beginTransaction()
Return Type |
Description |
---|---|
Boolean |
True if a Tuxedo transaction is currently running. |
Table�64.�Exceptions thrown by TuxedoAdapter::isTransactionRunning()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpsuspend(). Use TuxedoAdapter::resumeTransaction() to resume it.
TuxedoAdapter::suspendTransaction()
Table�65.�Arguments for TuxedoAdapter::suspendTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�66.�Return Values for TuxedoAdapter::suspendTransaction()
Return Type |
Description |
---|---|
Integer |
Transaction ID to be passed into TuxedoAdapter::resumeTransaction(). |
Table�67.�Exceptions thrown by TuxedoAdapter::suspendTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpresume(). The transaction needs to be suspended prior by calling TuxedoAdapter::suspendTransaction().
TuxedoAdapter::resumeTransaction(transaction ID
)
Table�68.�Arguments for TuxedoAdapter::resumeTransaction()
Argument |
Type |
Description |
---|---|---|
Transaction ID |
Integer |
The ID returned by the TuxedoAdapter::suspendTransaction(). |
Table�69.�Exceptions thrown by TuxedoAdapter::resumeTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpscmt(TP_CMT_LOGGED). To switch to an alternative mechanism use TuxedoAdapter::finishCommitAfterTwoPhaseCompletes().
TuxedoAdapter::finishCommitAfterDataLogged()
Table�70.�Arguments for TuxedoAdapter::finishCommitAfterDataLogged()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�71.�Return Values for TuxedoAdapter::finishCommitAfterDataLogged()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�72.�Exceptions thrown by TuxedoAdapter::finishCommitAfterDataLogged()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpscmt(TP_CMT_COMPLETE). To switch to an alternative mechanism use TuxedoAdapter::finishCommitAfterDataLogged().
TuxedoAdapter::finishCommitAfterTwoPhaseCompletes()
Table�73.�Arguments for TuxedoAdapter::finishCommitAfterTwoPhaseCompletes()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�74.�Return Values for TuxedoAdapter::finishCommitAfterTwoPhaseCompletes()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�75.�Exceptions thrown by TuxedoAdapter::finishCommitAfterTwoPhaseCompletes()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_begin().
TuxedoAdapter::beginTxTransaction()
Table�76.�Arguments for TuxedoAdapter::beginTxTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�77.�Return Values for TuxedoAdapter::beginTxTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�78.�Exceptions thrown by TuxedoAdapter::beginTxTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_commit().
TuxedoAdapter::commitTxTransaction()
Table�79.�Arguments for TuxedoAdapter::commitTxTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�80.�Return Values for TuxedoAdapter::commitTxTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�81.�Exceptions thrown by TuxedoAdapter::commitTxTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_abort().
TuxedoAdapter::abortTxTransaction()
Table�82.�Arguments for TuxedoAdapter::abortTxTransaction()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�83.�Return Values for TuxedoAdapter::abortTxTransaction()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�84.�Exceptions thrown by TuxedoAdapter::abortTxTransaction()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_set_commit_return(TX_COMMIT_DECISION_LOGGED). To switch to an alternative mechanism use TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes().
TuxedoAdapter::finishTxCommitAfterDataLogged()
Table�85.�Arguments for TuxedoAdapter::finishTxCommitAfterDataLogged()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�86.�Return Values for TuxedoAdapter::finishTxCommitAfterDataLogged()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�87.�Exceptions thrown by TuxedoAdapter::finishTxCommitAfterDataLogged()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_set_commit_return(TX_COMMIT_COMPLETED). To switch to an alternative mechanism use TuxedoAdapter::finishTxCommitAfterDataLogged().
TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes()
Table�88.�Arguments for TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�89.�Return Values for TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�90.�Exceptions thrown by TuxedoAdapter::finishTxCommitAfterTwoPhaseCompletes()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_set_transaction_control(TX_CHAINED). Use TuxedoAdapter::setUnchainedTxTransactions() to switch to an alternative mechanism.
TuxedoAdapter::setChainedTxTransactions()
Table�91.�Arguments for TuxedoAdapter::setChainedTxTransactions()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�92.�Return Values for TuxedoAdapter::setChainedTxTransactions()
Return Type |
Description |
---|---|
n/a |
This method returns no value. |
Table�93.�Exceptions thrown by TuxedoAdapter::setChainedTxTransactions()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_set_transaction_control(TX_UNCHAINED). Use TuxedoAdapter::setChainedTxTransactions() to switch to an alternative mechanism.
TuxedoAdapter::setChainedTxTransactions()
Table�94.�Arguments for TuxedoAdapter::setUnchainedTxTransactions()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�95.�Return Values for TuxedoAdapter::setUnchainedTxTransactions()
Return Type |
Description |
---|---|
n/a |
This method returns no value. |
Table�96.�Exceptions thrown by TuxedoAdapter::setUnchainedTxTransactions()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tx_set_transaction_timeout().
TuxedoAdapter::setTxTransactionTimeout(timeout sec
)
Table�97.�Arguments for TuxedoAdapter::setTxTransactionTimeout()
Argument |
Type |
Description |
---|---|---|
timeout |
Integer or Date/Time |
Timeout in seconds. |
Table�98.�Return Values for TuxedoAdapter:::setTxTransactionTimeout()
Return Type |
Description |
---|---|
n/a |
This method returns no value. |
Table�99.�Exceptions thrown by TuxedoAdapter::setTxTransactionTimeout()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Sets the string encoding for the object; any strings deserialized with this object will be tagged with this character encoding.
TuxedoAdapter::setStringEncoding(encoding
)
Table�100.�Arguments for TuxedoAdapter::setStringEncoding()
Argument |
Type |
Description |
---|---|---|
|
String |
The string encoding to use for this object. |
Table�101.�Return Values for TuxedoAdapter::setStringEncoding()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�102.�Exceptions thrown by TuxedoAdapter::setStringEncoding()
err |
desc |
---|---|
|
Invalid parameter. |
Converts a Tuxedo error code (usually retrieved from 'error' item in exception Hash parameter) into human readable form.
TuxedoAdapter::error2string(error code
)
Table�103.�Arguments for TuxedoAdapter::setStringEncoding()
Argument |
Type |
Description |
---|---|---|
|
Integer |
Tuxedo error code. |
Table�104.�Return Values for TuxedoAdapter::error2string()
Return Type |
Description |
---|---|
String |
Human readable description of the error code. |
Writes given string into Tuxedo log. The function is a wrapper for Tuxedo call userlog().
TuxedoAdapter::writeToLog(logged string
)
Table�105.�Arguments for TuxedoAdapter::writeToLog()
Argument |
Type |
Description |
---|---|---|
|
String |
Text to be written into Tuxedo log. |
Converst a Tuxedo error code (usually retrieved from 'error' item in exception Hash parameter) into human readable form. The function is a wrapper for Tuxedo call tperrordetail().
TuxedoAdapter::lastErrorDetails()
Table�106.�Arguments for TuxedoAdapter::lastErrorDetails()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�107.�Return Values for TuxedoAdapter::lastErrorDetails()
Return Type |
Description |
---|---|
Integer |
Additional info about the last error generated by Tuxedo. See tperrordetail() documentation for more information. |
Wrapper for Tuxedo call tpgprio().
TuxedoAdapter::getPriority()
Table�108.�Arguments for TuxedoAdapter::getPriority()
Argument |
Type |
Description |
---|---|---|
n/a |
n/a |
This method takes no arguments. |
Table�109.�Return Values for TuxedoAdapter::getPriority()
Return Type |
Description |
---|---|
Integer |
Current Tuxedo priority. |
Table�110.�Exceptions thrown by TuxedoAdapter::getPriority()
err |
desc |
---|---|
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Wrapper for Tuxedo call tpsprio().
TuxedoAdapter::setPriority(new priority
)
Table�111.�Arguments for TuxedoAdapter::setPriority()
Argument |
Type |
Description |
---|---|---|
new priority |
Integer |
New Tuxedo priority (1..100). |
Table�112.�Return Values for TuxedoAdapter::setPriority()
Return Type |
Description |
---|---|
n/a |
This method returns no value |
Table�113.�Exceptions thrown by TuxedoAdapter::setTxTransactionTimeout()
err |
desc |
---|---|
|
Invalid parameter. |
|
A Tuxedo call failed. Hash parameter has a member 'error' with Tuxedo error code. |
Posts a Tuxedo event. See tppost() documentation for details.
TuxedoAdapter:postEvent(event name, data [, flags]
)
Table�114.�Arguments for TuxedoAdapter::postEvent()
Argument |
Type |
Description |
---|---|---|
|
String |
Event name, up to 31 characters. |
|
NOTHING,String, Binary or Hash |
Data serialized into the Tuxedo format and passed to the service. Hash is converted either into FML or FML32, based on the hint in 'flags' or on the settings 'DefaultFmlType' passed into the constructor. |
|
Integer or Hash |
If the value is Integer then it is equivalent with flags used by the tppost(). Hash value may contrain following items: bool value 'use_fml32' (whether to process Hash data as FML or FML32) and integer value 'flags' (the same as for tppost()). If the TuxedoAdapter constructor did not specified 'DefaultFlagsForPostEvent' settings then the 'flags' needs to be present (either as the Integer or part of the Hash). |
Table�115.�Return Values for TuxedoAdapter::postEvent()
Return Type |
Description |
---|---|
n/a |
This method does not return any value. |
Table�116.�Exceptions thrown by TuxedoAdapter::cancelAsyncCall()
err |
desc |
---|---|
|
Missing or invalid parameter. |
|
A Tuxedo call failed. Hash exception parameter has member 'error' with Tuxedo error code. |