Administration message

First of all create the QueueAdminMsg object. This needs to be primed using the code introduced in Administration using the administrator API, to set up the origin queue manager administration reply.

Figure 23. Create a local queue

/* Create an empty queue admin message and parameters field */
MQeQueueAdminMsg msg = new MQeQueueAdminMsg();
 
MQeFields parms = new MQeFields();
 
/** Prime message with who to reply to and a unique identifier */
 
/*  Set name of queue to manage */
msg.setName( qMgrName, queueName );
 
/* Add any characteristics of queue here, otherwise */
/* characteristics will be left to default values. */
parms.putUnicode( MQeQueueAdminMsg.Queue_Description,  description);
 
parms.putInt32(MQeQueueAdminMsg.Queue_MaxQSize,200);
parms.putInt32(MQeQueueAdminMsg. Queue_Expiry, 20000);_
 
/* Set the admin action to create a new queue */
msg.create( parms );

Once the Admin message has been created, it needs to be sent to the local admin queue, as described in Administration using the administrator API.

Constructor



© IBM Corporation 2002, 2003. All Rights Reserved