ue_connect

Description

Connects the event user exit defining what actions are to be performed prior to TRS connecting to DB2 UDB.

Syntax

TRS_RETCODE TRS_PUBLIC
ue_connect (status, serviceName, serviceNameLength, applicationName, applicationNameLength, userId, pUserIdLength, password, pPasswordLength, pOutUserId, pOutPwd)

TRS_STATUS

status;

const char*

serviceName;

const int

serviceNameLength;

const char*

applicationName;

const int

applicationNameLength

const char*

userId;

int*

pUserIdLength;

const char*

password;

int*

pPasswordLength;

char**

pOutUserId;

char**

pOutPwd;

Table D-1: TRS_RETCODE values

Value

Description

eTRS_FAIL

Indicates failure within ue_connect( )

eTRS_SUCCEED

Indicates success within ue_connect( )

eTRS_NOTIMPLEMENTED

Indicates stubbed out implementation of ue_connect( )

eTRS_DATAMODIFIED

Indicates that a pointer variable has been modified and implies eTRS_SUCCEED

Parameters

status

The state of the Service Library invoking ue_connect( ). Table D-2 describes the legal value for status:

Table D-2: Legal status values

Value

Description

eGood_

Always used

eObjNotFound_

Reserved for future use

eObjNotValue_

Reserved for future use

eFatal_

Reserved for future use

serviceName

Name of the service to which the connection was made.

serviceNameLength

Length of the serviceName.

applicationName

Name of the application from which the connection was made.

applicationNameLength

Length of the applicationName.

userId

ID of the connecting user.

pUserIdLength

Pointer to length of userId.

password

Password associated with userId.

pPasswordLength

Pointer to length of password.

pOutUserId

A pointer to a character string that must be allocated by this routine and may contain a modified userId.

pOutPwd

A pointer to a character string that must be allocated by this routine and may contain a modified password.

Usage

See syntax.


Comments

WARNING! By granting control to this user exit, DirectConnect has temporarily forfeited the management of Open Server threads. The result is that DirectConnect cannot ensure against ue_connect monopolizing execution nor the ability of ue_connect to create a deadlock. Please take precautions to prevent this.

Example

See a sample implementation at this location:

/<install_dir>/DC-15_0/servers/sample/trs/ue/ue_connect.cpp