Base administration fields

The base administration fields, that are common to all administration messages, are:

MQE_ADMIN_TARGET_QMGR
This field provides the name of the queue manager on which the requested action is to take place (target queue manager). The target queue manager can be either a local or a remote queue manager. As only one queue manager can be active at a time in a Java Virtual Machine, the target queue manager, and the one to which the message is put, are the same.

MQE_ADMIN_ACTION
This field contains the administration action that is to be performed. Each managed resource provides a set of administrative actions that it can perform. A single administration message can only request that one action be performed. The following common actions are defined:

Table 3. Administration actions

Administration action Purpose
MQE_ADMIN_ACTION_CREATE Create a new instance of a managed resource.
MQE_ADMIN_ACTION_DELETE Delete an existing managed resource
MQE_ADMIN_ACTION_INQUIRE Inquire on one or more characteristics of a managed resource
MQE_ADMIN_ACTION_INQUIREALL Inquire on all characteristics of a managed resource
MQE_ADMIN_ACTION_UPDATE Update one or more characteristics of a managed resource

All resources do not necessarily implement these actions. For instance, it is not possible to create a queue manager using an administration message. Specific administration messages can extend the base set to provide additional actions that are specific to a resource.

Each common action provides a function that sets the
MQE_ADMIN_ACTION field:

Table 4. Setting the administration action field

Administration action Setting function
MQE_ADMIN_ACTION_CREATE mqeAdminMsg_create(parameters)
MQE_ADMIN_ACTION_DELETE mqeAdminMsg_delete(parameters)
MQE_ADMIN_ACTION_INQUIRE mqeAdminMsg_inquire(parameters)
MQE_ADMIN_ACTION_INQUIREALL mqeAdminMsg_inquireAll(parameters)
MQE_ADMIN_ACTION_UPDATE mqeAdminMsg_update(parameters)
Where parameters is:
MQeAdminMsgHndl hMsgObj, 
MQeExceptBlock *pErrStruct, 
MQECONST MQeFieldsHndl hParms

MQE_ADMIN_MAXATTEMPTSAdmin_MaxAttempts

This field determines how many times an action can be retried if the initial action fails. The retry occurs either the next time that the queue manager restarts or at the next interval set on the administration queue.

Other fields
For most failures further information is available in the reply message. It is the responsibility of the requesting application to read and handle failure information. Refer to The basic administration reply message for more details on using the reply data.

A set of functions are available for setting some of the request fields:

Table 5. Setting administration request fields

Administration action Field type Set and get functions
MQE_ADMIN_PARAMS MQeFields mqeAdminMsg_getInputFields( MQeAdminMsgHndl hMsgObj , MQeExceptBlock * pErrStruct , MQeFieldsHndl * phFields)
MQE_ADMIN_ACTION int mqeAdminMsg_setAction( MQeAdminMsgHndl hMsgObj, MQeExceptBlock * pErrStruct, MQEINT32 action)
MQE_ADMIN_TARGET_QMGR ascii mqeAdminMsg_setTargetQMgr( MQeAdminMsgHndl hMsgObj, MQeExceptBlock * pErrStruct, MQECONST MQeStringHndl hName)
MQE_ADMIN_MAXATTEMPTS int mqeAdminMsg_setMaxAttempts( MQeAdminMsgHndl hMsgObj, MQeExceptBlock * pErrStruct, MQEINT32 maxAttempts)


© IBM Corporation 2000, 2003. All Rights Reserved