Installing a user-defined extension to current and past versions of the broker

The task described here is for users, for example for third-party vendors, who want to install user-defined extensions with the minimum of user intervention.

Before you start

  1. You must have created and compiled your user-defined node, in Java or in C.
  2. Start of changeYou must have created the workbench representation of your user-defined node.End of change
  3. You must have tested your user-defined node.
  4. Start of changeYou must have packaged the user-defined node workbench project.End of change

You must install user-defined extensions on all appropriate broker computers, and, if the extension is a user-defined node, on the toolkit computers (user-defined parsers have no toolkit component). Components can be installed separately, or as part of one process. The components can be on different systems, so you should ensure that the installations are completed on all affected systems.

Toolkit installation

Before installing a user-defined node, you might need to establish the version of the toolkit you are installing to, because a specific version of the toolkit could be a prerequisite of the user-defined extension, or it might require specific files to run.

Windows platform To determine the toolkit version, see Detecting Installed versions of WebSphere Message Broker.

If the product is shell-sharing with another product, the installation path is determined by the first Rational program that was installed. To determine the location of the toolkit installation, look at the cdi_ref.properties file which is set up by Rational. This file is installed by the Message Brokers Toolkit and by Rational Version 6.x products; the first time one of these products is installed the file is created. It is shared by all subsequent installations. If all Message Brokers Toolkit and Rational Version 6.x products are uninstalled, the file is removed when the last product is uninstalled.

  1. If you are using Installshield Multiplatform Edition to determine the location, the location resolves to $D(os_main)/IBM/RAT60/.sdpinst/cdi_ref.properties

    In this instance, $D(os_main) is an Installshield variable, which the CDI install framework used.

  2. If you are not using Installshield Multiplatform Edition:
    1. The location resolves to /etc/IBM/RAT60/.sdpinst/cdi_ref.properties
    2. Look for the file in two locations, in the following order:
      1. %windir%/IBM/RAT60/.sdpinst/cdi_ref.properties
      2. %SystemRoot%/IBM/RAT60/.sdpinst/cdi_ref.properties
  3. Use the cdi_ref.properties file to detect the presence of a Message Brokers Toolkit installation; search for c_wmbt_specific.products=wmbt

    For the location, look at the following variable: c_wmbt_specifc.b_wmbt_specific.location.

    Windows platform For example, C:\Program Files\IBM\MessageBrokersToolkit\6.0

    Linux platform For example, /opt/ibm/MessageBrokerToolkit/6.0

    For the location of the workbench look at variable c_wb.b_wb.location.

    Windows platform For example, C:\Program Files\IBM\MessageBrokersToolkit\6.0

    Linux platform For example, /opt/ibm/MessageBrokerToolkit/6.0

The value of c_wb.b_wb.location might not be the same as the value of c_wmbt_specifc.b_wmbt_specific.location. This discrepancy can occur if another Rational product has been installed before WebSphere Message Broker.

If cdi_ref.properties does not exist, no Rational products are installed, and the Message Brokers Toolkit is not installed.

To set up Message Brokers Toolkit with icons and options for a new user-defined node, set up a new Eclipse link file that points to the directory containing the Eclipse plug-in files. The link file must contain one line which specifies the full path of the target directory. When you create the Eclipse link file, place it in <c.wb.b_wb.location>/eclipse/links/.

Start of changeCopy the compressed file that you created in Packaging a user-defined node workbench project to the directory identified by your link file. Extract the contents into that directory. For example:End of change

Linux platform Start of changeThe file named opt/ibm/MessageBrokerToolkit/6.0/eclipse/links/Myextension.link might contain the line path=/opt/My/Extension/Nodes/eclipse/plugins/your_node_name. The directory pointed to by the path variable must contain the contents of the compressed file that you created earlier when you packaged the project.End of change

When you have installed the extension, restart the target workbench with the -clean option. You can do this from the command line, or by modifying the menu shortcut. You should use the -clean option whenever any changes are made to user-defined extensions, to make sure the changes are picked up by the message flow node palette. When the workbench has restarted, the new category of nodes appears on the palette of the flow editor.

Start of changeIf you are an experienced Eclipse user or plug-in developer, you might want to use more advanced Eclipse functions to handle additional products like user-defined extensions. For example, you can package user-defined extensions as Eclipse features, instead of plug-ins.End of change

Start of changeFeatures have several advantages:End of change

Start of change
  • You can include many related plug-ins in a single feature.
  • You can define a feature such that it is restricted to use with particular versions of your workbench.
  • You can provide automated updates to features using the Eclipse Update Manager.
End of change

Start of changeFor a full description of these and other advanced Eclipse options, see the PDE Guide which includes a section about creating features. You might also find useful the description of the feature manifest in "Navigating and customizing the workbench".End of change

Runtime installation

You might need to detect the version of the runtime that is installed, to ensure that the correct .lil file is loaded by the correct level of the broker. See Detecting Installed versions of WebSphere Message Broker.

To add .jar or .lil files to runtime installations on WebSphere Business Integration Message Broker Version 5.0 or later, see Installing user-defined extension runtime files on a broker. For Version 2 brokers, add the plug-in files to install_dir/lil/ and restart the broker.

Single broker extension

Start of changeTo make a 32-bit extension accessible from only one broker on the system, modify the UserLilPath setting for the broker by specifying the -l parameter on the mqsicreatebroker or mqsichangebroker command. For more information, see mqsicreatebroker command and mqsichangebroker command.

You cannot use the -l parameter to modify the user LILPATH for 64-bit extensions. Instead, append the directory containing the directory that holds the extension files to the environment variable MQSI_LILPATH64, as described below.

End of change

Multiple brokers extension

Start of changeTo affect all brokers on a system, you must modify the system LILPATH. Append the directory containing the directory that holds the extension files to the environment variable MQSI_LILPATH (for 32-bit extensions) or MQSI_LILPATH64 (for 64-bit extensions). You can do this by creating a custom environment script in %ALLUSERSPROFILE%\Application Data\IBM\MQSI\common\profiles on Windows, or /var/mqsi/common/profiles on UNIX and Linux. You can give the environment script any name, but the file extension must be .cmd on Windows and .sh on all other platforms. The script can perform all the operations of a shell script, but you should limit the scope to only appending the following variables:
Start of changeMQSI_LILPATHEnd of change
Start of changeDefines the directories to search for 32-bit plug-insEnd of change
Start of changeMQSI_LILPATH64End of change
Start of changeDefines the directories to search for 64-bit plug-insEnd of change
CLASSPATH
Defines the locations Java should search for additional classes
NLSPATH
Defines the location of message catalogues
PATH
Defines the location of executable files. On Windows, this variable also defines the location of dependent libraries.
LIBPATH / SHLIB_PATH / LD_LIBRARY_PATH
Defines the location of dependent libraries on UNIX and Linux.
End of change

Example Script

Windows platform Environment profile for MyExtension, installed in C:\Program Files\MyExtensions. The script is called C:\Documents and Settings\All Users\Application Data\IBM\MQSI\common\profiles\MyExtension.cmd:
REM Added by MyExtension install, do not modify
set MQSI_LILPATH=%MQSI_LILPATH%;"C:\Program Files\MyExtension\bin"
UNIX platform Environment profile for MyExtension, installed in /opt/MyExtension. The script is called /var/mqsi/common/profiles/MyExtension.sh:
#!/bin/ksh
# Added by MyExtension install, do not modify
export MQSI_LILPATH=/opt/MyExtension/lil${MQSI_LILPATH:+":"${MQSI_LILPATH}}

You can test the following variables in the profile script, for example if you want to ensure that a user-defined extension only runs on a specific version of the broker.

MQSI_FILEPATH
The full path to the installed file for WebSphere Message Broker
MQSI_WORKPATH
The full path to the configuration data for WebSphere Message Broker
MQSI_VERSION
WebSphere Message Broker version, in the form version.release.modification.fix
MQSI_VERSION_V
The value of WebSphere Message Broker major version
MQSI_VERSION_R
The value of WebSphere Message Broker release
MQSI_VERSION_M
The value of WebSphere Message Broker modification number
MQSI_VERSION_F
The value of WebSphere Message Broker fix level