C

Steps required to delete queue managers in C

The steps in deleting a queue manager are:
  1. Remove all Connection Definitions.
  2. Remove all Queues, including any "system" queues, for example the dead letter queue. Ensure all queues are empty.
  3. Remove the queue manager.
You require an administrator to perform these functions. We also recommend stopping the queue manager first.
Note: Deleting the queue mananger will free the queue manager handle for you.
MQeAdministratorHndl hAdmin:
/* Create the new administrator based on the exisitng QM Handle */
rc = mqeAdministrator_new(&exceptBlock,
                  &hAdmin,hQueueManager);
if (MQERETURN_OK == rc) {

    if (MQERETURN_OK == rc) {
        /* delete any conncetion definitins for example :*/
        rc = mqeAdministrator_Connection_delete(hAdmin, 
                                &exceptBlock, 
                                hRemoteQM);
    }

    /* delete all the local queues here - remember to do "special*/ 
   /*queues" for example ... */
    if (MQERETURN_OK == rc) {
        rc = mqeAdministrator_LocalQueue_delete(hAdmin, 
                                &exceptBlock, 
                                MQE_DEADLETTER_QUEUE_NAME,
                                hLocalQMName);
    }
    
    /* Finally delete the queue manager */
    if (MQERETURN_OK == rc) {
        rc = mqeAdministrator_QueueManager_delete(hAdmin, 
                                  &exceptBlock);
    }



    /* free of the amdinsitrator */
    (void)mqeAdministrator_free(hAdmin, &exceptBlock);
}


Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.