Implementing the supplied user-defined extension samples

WebSphere® Message Broker provides some sample code to help you understand how to write user-defined nodes and parsers.

The samples consist of a sample parser, and the following sample nodes:
Switch A node, implemented in both C and Java™ versions, that propagates an input message to one of several output terminals depending on the message content.
Transform A node, implemented in both C and Java versions, that performs a simple message transformation.

Each sample node consists of the source files and some files that you can use to test each node. For the sample parser there are only source files. See Sample node files and Sample parser files for details of the sample files and where to find them.

To implement the supplied samples:
  1. Compile the samples. For information on how to compile a Java node, see Compiling a Java user-defined node. For information on how to compile a C node or parser, see Compiling a C user-defined extension.
  2. Install the user-defined extension in a broker domain. For instructions on completing this step, see Installing user-defined extension runtime files on a broker.
  3. Start of changeOn the computer that hosts the workbench, extract the SampleNodesProject.zip file, which is located in the samples subdirectory and copy the files to a directory from which the workbench can access them. For example, on Windows®, the location is install_dir\sample\extensions\com.ibm.samples.nodes directory. For further information about where to copy the files, see Installing a user-defined extension to current and past versions of the broker.End of change
  4. Open the workbench and switch to the Broker Application Development perspective. The category called "Sample nodes" is now visible in the palette, and the sample nodes are shown below it. Documentation about the sample nodes is also visible in the help system under "Samples".
  5. Include the sample nodes in a message flow (see Adding a message flow node).
  6. Deploy the message flow; see Deploying.
  7. For the Switch and Transform nodes, you can put a message to the input queue of the message flow and observe the results, as follows:
    1. Make sure that the message flow containing the sample node is deployed successfully; see Checking the results of deployment.
    2. Use the Enqueue message function to put the sample input messages (the .xml files listed above) to the input queue named on the input node of the message flow; see Debug: putting a test message on an input queue.
    You can also use a Trace node or the Flow debugger to see what is happening in your message flow.
Related concepts
User-defined extensions overview
Related tasks
Adding a message flow node
Testing and debugging message flow applications
Developing user-defined extensions
Compiling a Java user-defined node
Compiling a C user-defined extension
Installing a user-defined extension to current and past versions of the broker
Checking the results of deployment
Troubleshooting and support
Related reference
Trace node
User-defined extensions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:23:16

as09990_