Configuring WebSphere MQ Active Directory objects" /> Configure WebSphere MQ Active Directory objects

 

Configuring WebSphere MQ Active Directory objects

After an WebSphere MQ object is accessed, its configuration can be modified using the Get and Put functions of the IADs interface. The ADSI objects communicate with underlying queue managers by MQAI COM objects in response to Get and Put requests. For more information about the MQAI see the appropriate help documentation.

Within the IADs interfaces Get and Put functions, it is necessary to refer to properties by names. A list of property names supported by a given class is available through the IADsClass interface on the schema object for that class. To obtain the schema object for a class, call the get_Schema function on its IADs interface.

Note:
The property names used within the WebSphere MQ ADSI implementation are similar to those used within the MQAI COM. For example, to determine the name of a queue manager, call the Get function on its IAD interface passing in a property name of "MQCA_Q_MGR_NAME". Under MQAI you would use the defined MQCA_Q_MGR_NAME.

Here is an example showing the use of the IADs interface to extract the name and description of a queue manager object and printing this information to the screen:

//
// Define and initialize variables.
//
 
VARIANT vDesc;
VARIANT vName;
IADs *pObject = NULL;
 
//
// Initialize Variants
//
VariantInit(&vDesc);
VariantInit(&vName);
//
// Attach to the IADs interface for the queue manager queue.manager.1
// residing on machine heron.
//
 
ADsGetObject( _TEXT("WebSphere MQ://MQHost/heron/MQQueueManager/
                     queue.manager.1")
            , IID_IADs
            , (void **)&pObject);
 
//
// Using the IADs interface extract the name and description of
// the queue manager printing this information to the screen.
//
 
pObject->Get(_TEXT("MQCA_Q_MGR_NAME"),&vName);
pObject->Get(_TEXT("MQCA_Q_MGR_DESC"),&vDesc);
 
printf("  %S,%S",vName.bstrVal, vDesc.bstrVal);
 
pObject->Release();