Connects the event user exit defining what actions are to be performed prior to TRS connecting to DB2 UDB.
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; |
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 |
The state of the Service Library invoking ue_connect( ). Table D-2 describes the legal value for status:
Value |
Description |
---|---|
eGood_ |
Always used |
eObjNotFound_ |
Reserved for future use |
eObjNotValue_ |
Reserved for future use |
eFatal_ |
Reserved for future use |
Name of the service to which the connection was made.
Length of the serviceName.
Name of the application from which the connection was made.
Length of the applicationName.
ID of the connecting user.
Pointer to length of userId.
Password associated with userId.
Pointer to length of password.
A pointer to a character string that must be allocated by this routine and may contain a modified userId.
A pointer to a character string that must be allocated by this routine and may contain a modified password.
See syntax.
ue_connect() must return eTRS_DATAMODIFIED if either pOutUserId or pOutPwd has been allocated.
pUserIdLength must be updated to reflect the length of pOutUserId when pOutUserId has been allocated.
pPasswordLength must be updated to reflect the length of pOutPwd when pOutPwd has been allocated.
malloc() should be used to allocate space for pOutUserId and pOutPwd
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.
See a sample implementation at this location:
/<install_dir>/DC-15_0/servers/sample/trs/ue/ue_connect.cpp