See Using adapters and Java Programming Reference for more information on adapters.
You can assign multiple names or aliases to a connection. When an application calls methods on the MQeQueueManager class that require a queue manager name to be specified, it can also use an alias.
You can alias both local and remote queue managers. To alias a local queue manager, you must first establish a connection definition with the same name as the local queue manager. This is a logical connection that can have all parameters set to null.
To add and remove aliases, use the Action_AddAlias and Action_RemoveAlias actions of the MQeConnectionAdminMsg class. You can add or remove multiple aliases in one message. Put the aliases that you want to manipulate directly into the message by setting the ASCII array field Con_Aliases. Alternatively you can use the two methods addAlias() or removeAlias(). Each of these methods takes one alias name but you can call the method repeatedly to add multiple aliases to a message.
/** * Setup an admin msg to add aliases to a queue manager (connection) */ public MQeConnectionAdminMsg addAliases( String queueManagerName String aliases[] ) throws Exception { /* * Create an empty connection admin message */ MQeConnectionAdminMsg msg = new MQeConnectionAdminMsg(); /* * Prime message with who to reply to and a unique identifier */ MQeFields msgTest = primeAdminMsg( msg ); /* * Set name of the connection to add aliases to */ msg.setName( queueManagerName ); /* * Use the addAlias method to add aliases to the message. */ for ( int i=0; i<aliases.length; i++ ) { msg.addAlias( aliases[i] ); } return msg; }