Java

To add an alias name to a queue, use the addAlias method on the MQeQueueAdminMsg.

With admin messages multiple add alias and remove alias operations can be done in one admin message.

Figure 1. Adding an alias to a queue in Java™
/* Create an empty queue admin message and parameters field */
MQeQueueAdminMsg msg = new MQeQueueAdminMsg();

/*  Prime message with who to reply to and a unique identifier 
 *  and set the name of the QueueManager and Queue 
 */

/* Add a name that will be the alias of this queue */
msg.addAlias( "Fred" );

/* Set the admin action to update the queue */
msg.update( parms );

Terms of use | WebSphere software

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