Basic MQ Commands


1. Create/start/stop a Queue Manager

crtmqm [-z] [-q] [-c Text] [-d DefXmitQ] [-h MaxHandles]
[-g ApplicationGroup] [-t TrigInt]
[-u DeadQ] [-x MaxUMsgs] [-lp LogPri] [-ls LogSec]
[-lc | -ll] [-lf LogFileSize] [-ld LogPath] QMgrName

Output :

WebSphere MQ queue manager created.
Creating or replacing default objects for QMA.
Default objects statistics : 43 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

2. Starting a Queue Manager

$ strmqm QMA

Output:

WebSphere MQ queue manager ‘QMA’ starting.
2108 log records accessed on queue manager ‘QMA’ during the log
replay phase.
Log replay for queue manager ‘QMA’ complete.
Transaction manager state recovered for queue manager ‘QMA’.
WebSphere MQ queue manager ‘QMA’ started.

3. Checking that the Queue Manager is running

$ dspmq

Output :

QMNAME(QMA) STATUS(Running)

4. Stopping a Queue Manager

$ endmqm –i QMA

5. Deleting a Queue Manager

The following command will stop all the Listeners associated with Queue Manager pointed to by the –m flag (QMA in this example). The –w flag means the command will wait until all the Listeners are stopped before returning control:

$ endmqlsr -w -m QMA

The command to stop (end) the Queue Manager is:

$ endmqm QMA

And fnally the command to delete the Queue Manager is:

$ dltmqm QMA

 

Other Useful Links:

Enable JMX Remote port in WebSphere

 

Install SSL Certificates into Java JRE


Some times it would require to install the SSL certificates into our JRE. Below are the steps that need to perform to get the certificates added into the JRE security folder.

1. Navigate to JDK\jre\bin and copy the “keytool.exe” and “jli.dll” files to the JDK\jre\lib\security directory.

2. Copy the your XXX.cer files to the JDK\jre7\lib\security directory

3. Open command prompt and navigate to the JDK\jre\lib\security directory

4. Run the following command to verify the tool is working: “keytool -list -keystore cacerts”

a. Default password to access the keystore is: changeit

5. Run the following commands to import the certificates

     keytool -keystore cacerts -importcert -alias YYY -file XXX.cer

6. If the certificate already exists then there is no need to re-import it.

 

Other Useful Links:

Javac/Java searching algorithm for other classes

Struts Internationalization Example

How to find count of duplicates in a List

How to Create a Thread Using Runnable Interface