Update a connection definition

As has been previously stated it is strong recommended you ensure a connection is not being used when a connection definition is updated. The flags are used to determine which parts of the information in the connection definition are to be updated. So, even if a value is provided in the structure, if the correct flag is not set that value will not be used:

MQeConnectionDefinitionParms parms = CONNDEF_INIT_VAL;

We will create a new description:

rc = OSAMQESTRING_NEW(&error, "replacement description", SB_STR, 
								&parms.hDescription);

If we set the opFlags field as follows the description will not be updated, instead the administration function will attempt to update the value for the name of the via queue manager:

parms.opFlags = CONNDEF_VIAQM_OP;

We need to set the opFlags field as follows in order to obtain the desired behavior:

Parms.opFlags = CONNDEF_DESC_OP;

The function to update the connection definition is then called as follows:

rc = mqeAdministration_Connection_update(hAdministrator , &error, 
															hQueueMgrName, &parms);


© IBM Corporation 2002, 2003. All Rights Reserved