Use IBM MQ Explorer trace in other Eclipse environments

IBM MQ Explorer can be installed into your own Eclipse environment or Eclipse-based product to help develop Java applications, or to develop your own extensions.


We can collect IBM MQ Explorer trace if we have installed IBM MQ Explorer into your own Eclipse or Eclipse-based product by following the procedure.

Note that you normally enable tracing only when asked to do so by your IBM Service Representative. Tracing slows down IBM MQ Explorer and the trace files can rapidly become large.


Procedure

  1. The IBM MQ Explorer trace mechanism relies on AspectJ and Equinox Weaving plug-ins being installed. To confirm that they are installed:
    1. Click Help
    2. Click About...
    3. Click Installation Details
    4. Click the Plug-ins tab.
    The org.eclipse.equinox.weaving.caching.j9 plug in no longer exists, but you require this plug in if you are using IBM MQ Version 9.0 Long Term Support, or IBM MQ Version 9.0 Continuous Delivery releases, prior to Version 9.0.4. Verify that the following plug-ins are installed:
    	org.aspectj.runtime
    	org.aspectj.weaver
    
    	org.eclipse.equinox.weaving.aspectj
    	org.eclipse.equinox.weaving.caching
    	org.eclipse.equinox.weaving.caching.j9
    	org.eclipse.equinox.weaving.hook
    
  2. If they are not already installed, install the AspectJ and Equinox Weaving plug-ins. These plugins must match the version of Eclipse you are using and can be downloaded from the Eclipse AspectJ Development Tools download site. To determine which download site to use for your version of Eclipse, see https://projects.eclipse.org/projects/tools.ajdt. If you are using Eclipse 4.4.2 then you need to use AJDT 2.2.4; do not use AJDT 2.2.3. This statement applies if you are using IBM MQ Version 9.0 Long Term Support, or IBM MQ Version 9.0 Continuous Delivery releases, prior to Version 9.0.4.

    IBM MQ Version 9.0.4 uses Eclipse 4.6.3. If you are using Eclipse 4.6.3, you must obtain a build from the AJDT site which is compatible with Eclipse 4.6.

    Currently, these builds are available as development builds only; you should select the latest one available.

    To install the AspectJ and Equinox Weaving plug-ins, complete the following substeps:
    1. Click Help then click Install New Software...
    2. Click Add... then enter the location of the download site appropriate for the Eclipse version. For example, for Eclipse 4.4, enter http://download.eclipse.org/tools/ajdt/44/dev/update.
    3. Click OK A list of available software is displayed.
    4. Expand the Other AJDT Tools (Optional) category and select AspectJ Compiler and Equinox Weaving SDK.
    5. Click Next and follow the wizard instructions.
  3. To trace IBM MQ Explorer, close and restart the IBM MQ Explorer by using the runwithtrace script. For the script to use for Windows operating systems, see runwithtrace command script for Windows. For the script to use for Linux operating systems, see runwithtrace command script for Linux.

    The script must be run from the directory that contains the Eclipse executable file.

    When you start the IBM MQ Explorer by using the runwithtrace command, extra parameters are incorporated that enable tracing of IBM MQ Explorer. Note the runwithtrace command takes no parameters itself.

    The output location of the trace file is printed to the command line when the command runs because the actual location:

    • Is dependent upon the status of the IBM WebSphere MQ installation
    • User permissions

    The IBM MQ Explorer trace files have a name of the format AMQYYYYMMDDHHmmssmmm.TRC.n that indicates the start time of the trace session. When a trace file reaches its maximum size, the trace facility renames all trace files from the session by incrementing the file suffix .n by one. The trace facility then creates a new file with the suffix .0 that contains the latest trace.

  4. Uninstall the AspectJ and Equinox Weaving plug-ins. When you finish with IBM MQ Explorer trace, we can remove the AspectJ and Equinox Weaving plugins from the Eclipse environment. To uninstall AspectJ and Equinox Weaving plug-ins:
    1. Click Help and then click About....
    2. Click Installation Details and then click the Installed Software tab.
    3. Select the items AspectJ Complier and Equinox Weaving SDK.
    4. Click Uninstall... and follow the wizard instructions.