Setting up the User-defined Extension sample
To set up both the SearchFilter and the NumCompute samples, do the following:
- Import the two samples. This adds the following directories to the workspace:
- UDESampleCCode. This contains the source code for the NumCompute node.
- UDESampleJavaCode. This contains the source code for the SearchFilter node.
- UDESampleLibraries. The Java library is stored in the top level of this project. The C libraries are stored in subfolders
according to platform.
- UDESampleMessageFlowProject. This contains two sample message flow projects and enqueue files. There is one message flow
project for each of the samples.
- UDESamplePlugInNodeProject. This contains the properties definitions for the two samples.
- UDESampleServerProject. This contains compiled message flows for both the SearchFilter sample and the NumCompute sample.
Please be aware that upon importing and setting up the UDE sample, there will be approximately 9 errors and 1 warning (deprecated method)
in the toolkit, relating to the UDESampleMessageFlowProject. This is to be expected, and will be resolved after Step 4 is completed, enabling
the UDEs to appear in the message flow node palette.
- Close the Message Brokers Toolkit.
- Copy the UDESamplePlugInNodeProject folder from:
- On Windows: C:\Documents and Settings\user name\IBM\wmbt6.0\workspace\
- On Linux: /home/user name/IBM/wmbt6.0/workspace/
to:
- On Windows (if installed on drive C): C:\Program Files\IBM\MessageBrokersToolkit\6.0\evtoolkit\eclipse\plugins\
- On Linux: /opt/ibm/MessageBrokersToolkit/6.0/evtoolkit/eclipse/plugins/
This enables the nodes to appear in the message flow node palette.
For Linux only, if running the Toolkit as a non-root user, you must set the file permissions as follows:
- cd /opt/ibm/MessageBrokersToolkit/6.0/evtoolkit/eclipse/plugins/UDESamplePlugInNodeProject
- chmod 666 *
- chmod 755 icons
- Re-start the Message Brokers Toolkit with the "-clean" option. This can be done from the command line, or by modifying the menu shortcut.
The "-clean" option must be used whenever any changes are made to UDEs, in order for them to be picked up by the message flow node palette.
- If the errors remain in the Message Brokers Toolkit, clean all projects in the workspace: click Project > Clean... In the dialog that opens, click OK.
- Switch to the Broker Application Development perspective.
- Locate the sample libraries folder in the resource navigator window.
- Expand the appropriate platform specific subfolder until you can see both the .jar file and the relevant .lil file.
- Press and hold Ctrl, then select the .lil and .jar files.
- Click File > Export > File system, to export the UDESampleJavaCode.jar file and the relevant
NumComputeNode.lil file into a directory.
When you are asked to specify a directory into which you want to export the files
and you enter the name of a directory that has not been created, the directory
can be created for you automatically; for example, C:\UserLibraries
- In the command console, at the command prompt type the following command:
mqsistop WBRK6_DEFAULT_BROKER
- In the command console, at the command prompt type the following command:
mqsichangebroker WBRK6_DEFAULT_BROKER -l directory from step 10
- In the command console, at the command prompt type the following command:
mqsistart WBRK6_DEFAULT_BROKER
- Switch to the Broker Administration perspective.
- Connect to the Domain:
- In the Domains view, right-click the WBRK6_DEFAULT_CONFIGURATION_MANAGER domain.
- Click Connect.
- Expand WBRK6_DEFAULT_BROKER.
- Click Broker archives>UDESampleServerProject.
- Deploy the UDESampleArchive.bar file by dragging it onto the UDESampleExecutionGroup execution group.
The .bar file contains compiled message flows for both the SearchFilter and the NumCompute
samples. You should see two deployed message flows within UDESampleExecutionGroup.
You can now run the samples. See Running the
user-defined extension sample
Back to sample home