Websphere MQ Everyplace

com.ibm.mqe
Class MQeQueueManagerConfigure

java.lang.Object
  |
  +--com.ibm.mqe.MQe
        |
        +--com.ibm.mqe.MQeQueueManager
              |
              +--com.ibm.mqe.MQeQueueManagerConfigure
All Implemented Interfaces:
MQeExceptionCodes

public final class MQeQueueManagerConfigure
extends MQeQueueManager

Provides methods to configure and remove a queue manager.

To configure a Queue Manager, a registry is activated for it and definitions for the Queue Manager and its common local queues may be added to the registry. The queues themselves are not created, this will happen the first time the Queue Manager tries to use them.

Once the queue manager is constructed, close this object down, and use the resultant queue manager registry with an MQeQueueManager object.

To remove a Queue Manager, the registry definitions for the Queue manager itself and its default local queues are removed from the registry. The queues themselves are not removed, even if they are empty. Any other registry entries, eg for user-defined queues are not removed.

An instance of MQeQueueManagerConfigure is a MQeQueueManager, As there can only be one queue manager active at a time, you cannot have both an active instance of MQeQueueManagerConfigure at the same time as an active instance of MQeQueueManager. Similarly, you canot have two active instances of MQeQueueManagerConfigure simultaneously.

See Also:
MQeQueueManager

Field Summary
 
Fields inherited from class com.ibm.mqe.MQeQueueManager
Name, QueueManager, Registry
 
Fields inherited from class com.ibm.mqe.MQe
Admin_Queue_Name, Admin_Reply_Queue_Name, copyright, DeadLetter_Queue_Name, Event_Activate, Event_Attribute, Event_Authenticate, Event_Close, Event_Logoff, Event_Logon, Event_MiniCert_Validate, Event_Queue, Event_QueueManager, Event_UserBase, JMS_Version, MQ_Headers, MQe_Log_Audit_Failure, MQe_Log_Audit_Success, MQe_Log_Error, MQe_Log_Information, MQe_Log_Success, MQe_Log_Warning, Msg_BackoutCount, Msg_CorrelID, Msg_ExpireTime, Msg_LockID, Msg_MsgID, Msg_OriginQMgr, Msg_Priority, Msg_ReplyToQ, Msg_ReplyToQMgr, Msg_Resend, Msg_Style, Msg_Style_Datagram, Msg_Style_Reply, Msg_Style_Request, Msg_Time, Msg_WrapMsg, sccsid, System_Default_Queue_Name, version
 
Fields inherited from interface com.ibm.mqe.MQeExceptionCodes
Except_Active, Except_AdapterException, Except_AdapterMissingRemoteAddress, Except_Admin_ActionNotSupported, Except_Admin_InvalidField, Except_Admin_NotAdminMsg, Except_AdminAction, Except_Authenticate, Except_BadRequest, Except_BridgeListener, Except_Chnl_Attributes, Except_Chnl_ID, Except_Chnl_Limit, Except_Chnl_Overrun, Except_Closed, Except_Con_AdapterRequired, Except_Con_AliasAlreadyExists, Except_Con_AlreadyExists, Except_Con_InvalidName, Except_Connect_Failure, Except_ConnectonType, Except_Cryptor, Except_Data, Except_Duplicate, Except_JmxProperties, Except_Listener, Except_MessageStore, Except_MiniCertReg_ActivateFailed, Except_MiniCertReg_BadPIN, Except_MiniCertReg_NotOpen, Except_NotActive, Except_NotAllowed, Except_NotFound, Except_NotSupported, Except_PrivateReg_ActivateFailed, Except_PrivateReg_BadPIN, Except_PrivateReg_NotOpen, Except_PublicReg_ActivateFailed, Except_PublicReg_InvalidAddress, Except_PublicReg_InvalidRequest, Except_Q_Full, Except_Q_InvalidName, Except_Q_InvalidPriority, Except_Q_MsgTooLarge, Except_Q_NoMatchingMsg, Except_Q_TargetRegistryRequired, Except_QMgr_Activated, Except_QMgr_AlreadyExists, Except_QMgr_InvalidQMgrName, Except_QMgr_InvalidQName, Except_QMgr_NotActive, Except_QMgr_NotBridgeEnabled, Except_QMgr_NotConfigured, Except_QMgr_QDoesNotExist, Except_QMgr_QExists, Except_QMgr_QNotEmpty, Except_QMgr_RegistryDataVersion, Except_QMgr_UnknownQMgr, Except_QMgr_WrongQType, Except_Reg_AddFailed, Except_Reg_AlreadyExists, Except_Reg_AlreadyOpen, Except_Reg_CRTKeyDecFailed, Except_Reg_CRTKeySignFailed, Except_Reg_DeleteFailed, Except_Reg_DeleteRegistryFailed, Except_Reg_DoesNotExist, Except_Reg_InvalidSession, Except_Reg_ListFailed, Except_Reg_NotDefined, Except_Reg_NotSecure, Except_Reg_NullName, Except_Reg_OpenFailed, Except_Reg_ReadFailed, Except_Reg_RenameFailed, Except_Reg_ResetPINFailed, Except_Reg_SearchFailed, Except_Reg_UpdateFailed, Except_RemoteException, Except_Rule, Except_S_BadIntegrity, Except_S_BadSubject, Except_S_CertificateExpired, Except_S_Cipher, Except_S_InvalidAttribute, Except_S_InvalidSignature, Except_S_MiniCertNotAvailable, Except_S_MissingSection, Except_S_NoPresetKeyAvailable, Except_S_RegistryNotAvailable, Except_Stopped, Except_Syntax, Except_TimeOut, Except_Transporter, Except_TriggerTransmission, Except_Trnsport_QMgr, Except_Trnsport_Request, Except_Type, Except_UdpipAdapterStateException, Except_UdpipAdapterTimeOut, Except_UdpipAdapterUnableToConfirmSuccess, Except_UnCoded, Except_Uncontactable_DontTransmit
 
Constructor Summary
MQeQueueManagerConfigure()
          Constructs an object capable of creating or destroying a queue manager.
MQeQueueManagerConfigure(MQeFields configParams)
          Constructs an object capable of destroying a queue manager.
MQeQueueManagerConfigure(MQeFields configParams, java.lang.String qStore)
          Constructs an object capable of creating or destroying a queue manager.
 
Method Summary
 void activate(MQeFields configParams, java.lang.String qStore)
          Activates an MQeQueueManagerConfigure object so that it can be used.
 void close()
          Closes the Queue Manager.
 void defineDefaultAdminQueue()
          Define a default administration queue with default description.
 void defineDefaultAdminQueue(java.lang.String desc)
          Define a default administration queue.
 void defineDefaultAdminQueue(java.lang.String desc, java.lang.String qStore)
          Define a default administration queue.
 void defineDefaultAdminReplyQueue()
          Define a default administration reply queue with default description.
 void defineDefaultAdminReplyQueue(java.lang.String description)
          Define a default administration reply queue.
 void defineDefaultAdminReplyQueue(java.lang.String description, java.lang.String qStore)
          Define a default administration reply queue.
 void defineDefaultDeadLetterQueue()
          Define a default dead letter queue with default description.
 void defineDefaultDeadLetterQueue(java.lang.String description)
          Define a default dead letter queue.
 void defineDefaultDeadLetterQueue(java.lang.String description, java.lang.String qStore)
          Define a default dead letter queue.
 void defineDefaultSystemQueue()
          Define a default system queue with default description.
 void defineDefaultSystemQueue(java.lang.String description)
          Define a default system queue.
 void defineDefaultSystemQueue(java.lang.String description, java.lang.String qStore)
          Define a default system queue.
 void defineQueueManager()
          Create the Queue Manager Definition in the registry.
 void deleteAdminQueueDefinition()
          Delete a local admin queue definition.
 void deleteAdminReplyQueueDefinition()
          Delete a local admin reply queue definition.
 void deleteDeadLetterQueueDefinition()
          Delete a local dead letter queue definition.
protected  void deleteQueueDefinition(java.lang.String qName)
          Delete a queue definition.
 void deleteQueueManagerDefinition()
          Delete the definition of a Queue Manager and tidy up the registry.
 void deleteStandardQMDefinitions()
          Delete the standard Queue Manager and Queue definitions.
 void deleteSystemQueueDefinition()
          Delete a local system queue definition.
 boolean queueManagerExists()
          Check whether the Queue manager already exists.
 
Methods inherited from class com.ibm.mqe.MQeQueueManager
activate, activate, activate, addMessageListener, browseMessages, browseMessages, browseMessagesAndLock, checkActive, closeImmediate, closeQuiesce, confirmGetMessage, confirmPutMessage, deleteMessage, getDefaultQueueManager, getMessage, getName, getReference, isQueueManagerActive, putMessage, removeMessageListener, triggerTransmission, undo, unlockMessage, waitForMessage, waitForMessage
 
Methods inherited from class com.ibm.mqe.MQe
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQeQueueManagerConfigure

public MQeQueueManagerConfigure()
Constructs an object capable of creating or destroying a queue manager.

The Activate method must be called to use the class once it has been created using this constructor.

Example:
 MQeQueueManagerConfigure qmConfig1;
 
 qmConfig1 = new MQeQueueManagerConfigure();
 
 

MQeQueueManagerConfigure

public MQeQueueManagerConfigure(MQeFields configParams)
                         throws java.lang.Exception
Constructs an object capable of destroying a queue manager.

This constructor can only be used for removing a Queue Manager, because it does not specify a Queue Store location

The activate method need not be called after this object is constructed.

Parameters:
configParams - MQeFields object containing startup parameters
Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig2;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
 
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig2 = new MQeQueueManagerConfigure(parms);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

MQeQueueManagerConfigure

public MQeQueueManagerConfigure(MQeFields configParams,
                                java.lang.String qStore)
                         throws java.lang.Exception
Constructs an object capable of creating or destroying a queue manager.

The activate method need not be called after the object is constructed.

Parameters:
configParams - MQeFields object containing startup parameters
qStore - String containing the definition of the queue store
Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig3;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig3 = new MQeQueueManagerConfigure(parms, "MsgLog:" + "qmName" + File.separator +
                 "Queues" + File.separator);
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 
Method Detail

activate

public void activate(MQeFields configParams,
                     java.lang.String qStore)
              throws java.lang.Exception
Activates an MQeQueueManagerConfigure object so that it can be used.

This method must be used if the MQeQueueManager configure object is constructed using the null constructor.

Parameters:
configParams - MQeFields object containing startup parameters
qStore - String containing the definition of the queue store
Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure();
     qmConfig.activate(parms, "MsgLog:" + "qmName" + File.separator +
         "Queues" + File.separator);
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

queueManagerExists

public boolean queueManagerExists()
                           throws java.lang.Exception
Check whether the Queue manager already exists. This method uses the registry to ascertain whether the named queue manager has already been specified in a persistant form. Because it uses the registry it requires that the queue manager(configure) is active. If the QueueManagerConfigure has been closed, then this method will throw an MQeException Except_QMgr_NotActive, "Queue Manager not in defining state".

Throws:
java.lang.Exception
MQeException - Except_QMgr_NotActive, "Queue Manager not in defining state"
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     if (qmConfig.queueManagerExists()) {
         return true;
     }
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return true;
 
 

defineQueueManager

public void defineQueueManager()
                        throws java.lang.Exception
Create the Queue Manager Definition in the registry.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
     String qmName = "QM1";
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.setDescription("queue manager fo " + qmName);
     qmConfig.defineQueueManager();
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultAdminQueue

public void defineDefaultAdminQueue()
                             throws java.lang.Exception
Define a default administration queue with default description.

The description text associated with the queue will be "Admin Queue for <queueManagerName>"

The default queue store set by the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the queue to derive where messages are to be stored.

Throws:
java.lang.Exception - Thrown if the queue already exists.

defineDefaultAdminQueue

public void defineDefaultAdminQueue(java.lang.String desc)
                             throws java.lang.Exception
Define a default administration queue.

The location in which the queue stores its' messages is derived from the default qStore location set in the activate(com.ibm.mqe.MQeFields, java.lang.String) method.

Parameters:
desc - description string for the queue. A null is interpreted as a blank string "".
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultAdminQueue("This is a default Admin Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultAdminQueue

public void defineDefaultAdminQueue(java.lang.String desc,
                                    java.lang.String qStore)
                             throws java.lang.Exception
Define a default administration queue.

Normally, you would not use this method unless a short 8.3 file name message store.

The qStore location described here is the same string information as described in the MQeQueueAdminMsg.Queue_FileDesc field.

Parameters:
desc - String description string for the queue. A null is interpreted as a blank string "".
qStore - A string description which indicates where the queue will store its' messages. The syntax of the data in this string is the same as that in the MQeQueueAdminMsg.Queue_FileDesc field.
Throws:
java.lang.Exception -
  • Except_Syntax if the qStore parameter is invalid.
  • If the queue already exists, an exception will be thrown.
  • Other exception codes if there are other problems.

defineDefaultAdminReplyQueue

public void defineDefaultAdminReplyQueue()
                                  throws java.lang.Exception
Define a default administration reply queue with default description.

A text description of "Admin Reply Queue for <queueManagerName>" will be associated with the queue.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultAdminReplyQueue("This is a default Admin Reply Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultAdminReplyQueue

public void defineDefaultAdminReplyQueue(java.lang.String description)
                                  throws java.lang.Exception
Define a default administration reply queue.

The queue uses the location information provided by the activate(com.ibm.mqe.MQeFields, java.lang.String) method to derive where messages should be stored.

Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultAdminReplyQueue("This is a default Admin Reply Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultAdminReplyQueue

public void defineDefaultAdminReplyQueue(java.lang.String description,
                                         java.lang.String qStore)
                                  throws java.lang.Exception
Define a default administration reply queue.

Parameters:
description - A text string associated with the queue. Null is interpreted as a blank string.
qStore - A string description which indicates where the queue will store its' messages. The syntax of the data in this string is the same as that in the MQeQueueAdminMsg.Queue_FileDesc field.
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultAdminReplyQueue("This is a default Admin Reply Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultDeadLetterQueue

public void defineDefaultDeadLetterQueue()
                                  throws java.lang.Exception
Define a default dead letter queue with default description.

A default description of "Default Dead Letter Queue for <queueManagerName>" is associated with the queue.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultDeadLetterQueue("This is a default Dead Letter Queue");
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultDeadLetterQueue

public void defineDefaultDeadLetterQueue(java.lang.String description)
                                  throws java.lang.Exception
Define a default dead letter queue.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Parameters:
description - string for the queue. Null value is interpreted as a blank string "".
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultDeadLetterQueue("This is a default Dead Letter Queue");
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultDeadLetterQueue

public void defineDefaultDeadLetterQueue(java.lang.String description,
                                         java.lang.String qStore)
                                  throws java.lang.Exception
Define a default dead letter queue.

Parameters:
description - string for the queue. Null value is interpreted as a blank string "".
qStore - A string description which indicates where the queue will store its' messages. The syntax of the data in this string is the same as that in the MQeQueueAdminMsg.Queue_FileDesc field.
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultDeadLetterQueue("This is a default Dead Letter Queue");
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultSystemQueue

public void defineDefaultSystemQueue()
                              throws java.lang.Exception
Define a default system queue with default description.

A description of "Default Queue for <queueManagerName>" is used to describe the queue created.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultSystemQueue("This is a default System Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultSystemQueue

public void defineDefaultSystemQueue(java.lang.String description)
                              throws java.lang.Exception
Define a default system queue.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Parameters:
description - A text string associated with the queue to describe its' function.
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultSystemQueue("This is a default System Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

defineDefaultSystemQueue

public void defineDefaultSystemQueue(java.lang.String description,
                                     java.lang.String qStore)
                              throws java.lang.Exception
Define a default system queue.

The default queue store specified in the activate(com.ibm.mqe.MQeFields, java.lang.String) method will be used by the message store to indicate where messages are to be located.

Parameters:
description - string for the queue. Null value is interpreted as a blank string "".
qStore - A string description which indicates where the queue will store its' messages. The syntax of the data in this string is the same as that in the MQeQueueAdminMsg.Queue_FileDesc field.
Throws:
java.lang.Exception - If the queue already exists, an exception will be thrown.
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
     qmConfig = new MQeQueueManagerConfigure(parms, "qmName" + File.separator +
                 "Queues" + File.separator);
     qmConfig.defineQueueManager();
     qmConfig.defineDefaultSystemQueue("This is a default System Queue");
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteStandardQMDefinitions

public void deleteStandardQMDefinitions()
                                 throws java.lang.Exception
Delete the standard Queue Manager and Queue definitions. This method is provided for convenience, and it ensures that the deletions are performed in the correct sequence - Queue Manager last so that it can cleanup the registry properly.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     qmConfig.deleteStandardQMDefinitions();
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteQueueManagerDefinition

public void deleteQueueManagerDefinition()
                                  throws java.lang.Exception
Delete the definition of a Queue Manager and tidy up the registry.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
 
     qmConfig.deleteQueueManagerDefinition();
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteAdminQueueDefinition

public void deleteAdminQueueDefinition()
                                throws java.lang.Exception
Delete a local admin queue definition.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     qmConfig.deleteAdminQueueDefinition();
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteAdminReplyQueueDefinition

public void deleteAdminReplyQueueDefinition()
                                     throws java.lang.Exception
Delete a local admin reply queue definition.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     qmConfig.deleteAdminReplyQueueDefinition();
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteSystemQueueDefinition

public void deleteSystemQueueDefinition()
                                 throws java.lang.Exception
Delete a local system queue definition.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     qmConfig.deleteSystemQueueDefinition();
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteDeadLetterQueueDefinition

public void deleteDeadLetterQueueDefinition()
                                     throws java.lang.Exception
Delete a local dead letter queue definition.

Throws:
java.lang.Exception
Example:
 try {
     MQeQueueManagerConfigure qmConfig;
     MQeFields parms = new MQeFields();
 
     //initialize the parameters
     MQeFields queueManagerParameters = new MQeFields();
 
     queueManagerParameters.putAscii(MQeQueueManager.Name, queueManagerName);
     parms.putFields(MQeQueueManager.QueueManager, queueManagerParameters);
 
     MQeFields registryParameters = new MQeFields();
 
     parms.putFields(MQeQueueManager.Registry, registryParameters);
     registryParameters.putAscii(MQeRegistry.DirName, registryLocation);
 
     qmConfig = new MQeQueueManagerConfigure(parms, null);
     qmConfig.deleteDeadLetterQueueDefinition();
 
     qmConfig.close();
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

deleteQueueDefinition

protected void deleteQueueDefinition(java.lang.String qName)
                              throws java.lang.Exception
Delete a queue definition.

Parameters:
qName - The name of the queue to delete.
Throws:
java.lang.Exception

close

public void close()
Closes the Queue Manager.

Overrides:
close in class MQeQueueManager
Returns:
void

Websphere MQ Everyplace