Java™

As with all queues the first action is to create the appropriate admin message object. This then needs to be followed by priming the message using the code introduced in Configuring with messages.

/* Create an empty store and forward queue dmin message and parameters field */

MQeStoreAndForwardQueueAdminMsg msg = new MQeStoreAndForwardQueueAdminMsg();

MQeFields parms = new MQeFields();

/* Prime message stating who to reply to and a unique identifier */
/* Refer to Chapter 2, Administration using administration messages, */
/* for a definition of the user helper method primeAdminMsg(); */

primeAdminMsg( msg );

/* Set name of queue to manage */

msg.setName( qMgrName, queueName );

/* Add any characteristics of the queue here, otherwise */ 
/* characteristics will be left to default values. */

parms.putUnicode( MQeQueueAdminMsg.Queue_Description, description);

/* Set the admin action to create a new queue */

msg.create( parms );

After the administration message has been created, it needs to be sent to the local administration queue.


Terms of use | WebSphere software

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