Setting up the User-defined Extension sample
You might find it easier to follow these instructions if you print them out before you start because you must close the Message Brokers Toolkit before you can perform Step 3.
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 for the SearchFilter node is stored in the top level of this project. The C libraries for the NumCompute node are stored in subfolders
according to platform.
- UDESampleMessageFlowProject. This contains two sample message flows and two .mbtest files. There is one message flow
and one .mbtest file for each of the samples. This project also contains a bar file containing compiled message flows for both the SearchFilter sample and the NumCompute sample.
- UDESamplePlugInNodeProject. This contains the node definitions for the SearchFilter and NumCompute nodes, so that they appear in the message flows and the node palette.
Please be aware that upon importing and setting up the UDE sample, there will be approximately 9 errors in the toolkit, relating to the UDESampleMessageFlowProject.
This is to be expected, and will be resolved after Step 5 is completed.
- Close the Message Brokers Toolkit.
- Copy the UDESamplePlugInNodeProject folder from:
- On Windows: C:\Documents and Settings\user name\IBM\wmbt61\workspace\
- On Linux: /home/user name/IBM/wmbt61/workspace/
to:
- On Windows (if installed on drive C): C:\Program Files\IBM\WMBT610\plugins\
- On Linux: /opt/ibm/WMBT610/plugins/
This enables the nodes to appear in the message flows and the 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/WMBT610/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, ensure the Clean all projects radio button is selected and click OK.
- Switch to the Broker Application Development perspective.
- Locate the sample libraries folder in the Broker Development view.
- 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 then expand General and click 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 WBRK61_DEFAULT_BROKER
- In the command console, at the command prompt type the following command:
mqsichangebroker WBRK61_DEFAULT_BROKER -l directory from step 10
- In the command console, at the command prompt type the following command:
mqsistart WBRK61_DEFAULT_BROKER
- Switch to the Broker Administration perspective.
- Connect to the Domain:
- In the Domains view, right-click the WBRK61_DEFAULT_CONFIGURATION_MANAGER domain.
- Click Connect.
- Expand WBRK61_DEFAULT_BROKER.
- Click Broker archives>UDESampleMessageFlowProject.
- 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