Starting queue managers in Java

Normally, creating and starting a queue manager can require a large set of parameters. Therefore, the required parameters are supplied as an instance of MQeFields, storing the values as fields of correct type and name.

The parameters fall into two categories, queue manager parameters and registry parameters. Each of these categories is represented by its own MQeFields instance, and both are also enclosed in an MQeFields instance. The following Java™ example explains this concept, passing the queue managers name, "ExampleQM" and the location of a registry, "C:\ExampleQM":
  /*create fields for queue manager parameters and place the queue manager name
  MQeFields queueManagerParameters = new MQeFields();
  queueManagerParameters.putAscii(MQeQueueManager.Name, "ExampleQM");
  
  /*create fields for registry parameters and place the registry location
  MQeFields registryParameters = new MQeFields();
  registryParameters.putAscii(MQeRegistry.DirName, "C:\\ExampleQM\\registry");
  
  /*create fields for combined parameters and place the two sub fields
  MQeFields parameters = new MQeFields();
  parameters.putFields(MQeQueueManager.Registry, queueManagerParameters);
  parameters.putFields(MQeQueueManager.Registry, registryParameters);
Wherever you see "initialize the parameters" in code snippets, prepare a set of parameters as shown in the example, including the appropriate options. Only one queue manager name and one registry location are mandatory.

Terms of use | WebSphere software

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