Websphere MQ Everyplace

examples.administration.commandline
Class IniFileCreator

java.lang.Object
  |
  +--examples.administration.commandline.MQeAbstractCmdLineAdminTool
        |
        +--examples.administration.commandline.IniFileCreator

public class IniFileCreator
extends MQeAbstractCmdLineAdminTool

A command-line tool to create the simplest MQe queue manager .ini files possible.

Syntax

java examples.administration.commandline.IniFileCreator <iniFilePath> <qMgrName> <registryDir> <qMgrType> <port> <pin> <keyRingPassword> <msgLogAlias> <registryType> <listeningAdapter> <registryAdapter> <adminQStore> <adminReplyQStore> <deadLetterQStore> <systemDefaultLocalQStore> <propertyList>

Parameters

iniFilePath
The fully qualified path name of the .ini file we are creating.
qMgrName
The name of the queue manager in the ini file.
registryDir
The name of the directory which will be used to store the queue manager registry information. Note: This must have a trailing slash character to be valid.
qMgrType
The type of queue manager to be created. Can be either "Device", "Server" or "Gateway"
Device
A queue manager which does not have a channel manager. Such queue managers are incapable of creating the server-end of a client-server channel.
Server
A queue manager which is not bridge-enabled, but does have a channel manager configured. Such queue managers (unlike the 'device' style of queue manager) is capable of creating the server-end of a client-server channel.
Gateway
Essentially a 'server'-style queue manager (as above) which is enabled with a bridge to MQSeries. The MQSeries classes are assumed to be available for such MQe queue managers to operate. Specialist administration console which can administer bridge objects are detailed in gateway ini files. Same as "Server" from v2.0 onwards.
port
The port the queue manager will listen on, or 0 if the QM is a device queue manager.
pin
The Pin used to open the registry.
keyRingPassword
The password used to access secure keys within the registry.
msgLogAlias
What the "MsgLog" class alias should map to for this queue manager. Use "default" to set it to the usual value.
registryType
The type of the registry to be used to hold the queue manager configuration. This must be either "PrivateRegistry" or "FileRegistry". FileRegistry should be thought of as the default.
PrivateRegistry
Used when you want an encrypted registry
FileRegistry
Used when you don't want to use encryption, or if you want to use anything other than the default type of storage adapter under-pinning the configuration data registry
listeningAdapter
The MQe communications adapter which is used to create the server-side of all client-server connections made to this queue manager. This parameter will not be used for device queue managers, as they don't create a listener section in their .ini files. This can also be the alias name of a communications adapter. For example: "Network" or "FastNetwork"

Example

Java ...IniFileCreator C:\sMQe\QMgrs\MyQM\MyQM.ini MyQM C:\MQe\QMgrs\MyQM\Registry\ Server 8085 12345678 my_secret default FileRegistry FastNetwork

Creates an .ini file for a device queue manager "MyQM".


Field Summary
static java.lang.String syntax
           
static short[] version
           
 
Fields inherited from class examples.administration.commandline.MQeAbstractCmdLineAdminTool
ADMIN_Q_NAME, REPLY_TO_Q, TIMEOUT_MILLISECS
 
Constructor Summary
IniFileCreator()
           
 
Method Summary
 void activate(java.lang.String[] args)
          Uses the command-line parameters to call the method doing the work.
 void createDeviceQMIniFile(java.lang.String iniFileName, java.lang.String qMgrName, java.lang.String registryDir, java.lang.String pin, java.lang.String keyRingPassword, java.lang.String msgLogAlias, java.lang.String registryType, java.lang.String registryAdapter, java.util.Hashtable properties)
          Creates an .ini file for the device queue manager.
 void createServerQMIniFile(java.lang.String iniFileName, java.lang.String qMgrName, java.lang.String registryDir, java.lang.String portString, java.lang.String pin, java.lang.String keyRingPassword, java.lang.String msgLogAlias, java.lang.String registryType, java.lang.String registryAdapter, java.lang.String listenerAdapter, java.util.Hashtable properties)
          Creates an .ini file for the server queue manager (with no bridge function).
static void main(java.lang.String[] args)
          Allows the tool to be called from the command-line.
 
Methods inherited from class examples.administration.commandline.MQeAbstractCmdLineAdminTool
checkAdminReply, primeAdminMsg, processAdminMsg, sendWaitMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version

syntax

public static final java.lang.String syntax
See Also:
Constant Field Values
Constructor Detail

IniFileCreator

public IniFileCreator()
Method Detail

main

public static void main(java.lang.String[] args)
Allows the tool to be called from the command-line.


activate

public void activate(java.lang.String[] args)
              throws java.lang.Exception
Uses the command-line parameters to call the method doing the work.

Parameters:
args - Array of string arguments from the command-line.
Returns:
void
Throws:
java.lang.Exception

createDeviceQMIniFile

public void createDeviceQMIniFile(java.lang.String iniFileName,
                                  java.lang.String qMgrName,
                                  java.lang.String registryDir,
                                  java.lang.String pin,
                                  java.lang.String keyRingPassword,
                                  java.lang.String msgLogAlias,
                                  java.lang.String registryType,
                                  java.lang.String registryAdapter,
                                  java.util.Hashtable properties)
                           throws java.lang.Exception
Creates an .ini file for the device queue manager.

Parameters:
iniFileName - A string containing the fully-qualified or relative- path name of the .ini file which is going to be created.
qMgrName - A string containing the name of the MQe queue manager name for which the .ini file is being produced.
registryDir - A string containing the fully-qualified path name of the directory in which registry information will be placed. This parameter (rather unusually) requires a trailing directory-separator character.
pin - The PIN number to encrypt the registry with.
keyRingPassword - The keyring password to use when accessing keys within the registry.
msgLogAlias - What the "MsgLog" class alias should map to for this queue manager. Use "default" to set it to the usual value.
registryType - The name of the type of registry session we will use. "FileRegistry" or "PrivateRegistry" are good values.
Returns:
void
Throws:
java.lang.Exception

createServerQMIniFile

public void createServerQMIniFile(java.lang.String iniFileName,
                                  java.lang.String qMgrName,
                                  java.lang.String registryDir,
                                  java.lang.String portString,
                                  java.lang.String pin,
                                  java.lang.String keyRingPassword,
                                  java.lang.String msgLogAlias,
                                  java.lang.String registryType,
                                  java.lang.String registryAdapter,
                                  java.lang.String listenerAdapter,
                                  java.util.Hashtable properties)
                           throws java.lang.Exception
Creates an .ini file for the server queue manager (with no bridge function).

Parameters:
iniFileName - A string containing the fully-qualified or relative- path name of the .ini file which is going to be created.
qMgrName - A string containing the name of the MQe queue manager name for which the .ini file is being produced.
registryDir - A string containing the fully-qualified path name of the directory in which registry information will be placed. This parameter (rather unusually) requires a trailing directory-separator character.
portString - A string containing an integer number. Indicates which port the server queue manager will set it's client-server listener and channel manager up on. For example, 8082
pin - The PIN number to encrypt the registry with.
keyRingPassword - The keyring password to use when accessing keys within the registry.
msgLogAlias - What the "MsgLog" class alias should map to for this queue manager. Use "default" to set it to the usual value.
registryType - The name of the type of registry session we will use. "FileRegistry" or "PrivateRegistry" are good values.
listenerAdapter - A String holding the class name (or alias of a class name) of an MQe communications adapter. Examples are: "Network" , "FastNetwork" , "com.ibm.mqe.adpaters.MQeHTTPTcpipAdapter" Note that the .class extension is not specified.
Returns:
void
Throws:
java.lang.Exception

Websphere MQ Everyplace