Developing user-defined extensions

This section contains details on how to implement a user-defined node or parser to enhance the functionality of WebSphere Message Broker.

You can write user-defined nodes in C or Java. You can write user-defined parsers only in C. For information on designing and creating user-defined nodes and user-defined parsers, see the following topics:

The files you create and then distribute are:

On Windows systems, a dynamic link library (DLL), named with a file type of '.lil'.

On Linux systems, a shared object, again with a file type of '.lil'.

On UNIX systems, a shared object, again with a file type of '.lil'.

On z/OS, a shared object, with a file type of '.lil'.

For Java nodes, a Java Archive file (JAR), with a file type of '.jar'.

A C user-defined extension implements a node or parser factory that can support multiple nodes or parser types. For more information refer to node and parser factory behavior. Java users do not need to write a node factory.

The system loads the user-defined extension when the broker initializes. This invokes the registration functions in the user-defined extension so that the broker understands what nodes or parsers the user-defined extension supports.

For user-defined nodes only, the developer needs to create a workbench plug-in as well as the runtime LIL or JAR file. This adds the user-defined node to the node palette in the Message Flow editor, and allows the new node to be used in message flows. See Creating the user interface representation of a user-defined node in the workbench for more details. This step is not needed for user-defined parsers.

There are some restrictions and factors for consideration when developing user-defined extensions:
  • Interfacing a C user-defined node to Java and wrappering it in JNI is not supported. This is because the broker internally initializes a JVM, which is not available through the user-defined extension interface. The JVM initializes with various parameters that are specific to the broker's requirements. Because there is only one JVM in a process, whoever initializes it first specifies these parameters. If a user-defined node uses Java, and the broker is initialized first, these parameters might not be suitable for the user-defined node. If the user-defined node creates the JVM before the broker starts, the broker might not function correctly.
  • User-defined nodes can be deployed in WebSphere Event Broker. When creating user-defined nodes for WebSphere Event Broker users, you must ensure that you do not expose users to the ability to evaluate ESQL code. For example, nodes that expose the input to MbSQLStatement as a node property would effectively be emulating a Compute node. Use of ESQL in WebSphere Event Broker is not supported.
  • User-defined input nodes can only support XML, BLOB, and the MQ parsers.
  • Avoid using operating system specific functions. This enables the user-defined extensions to work on a variety of platforms without requiring changes to the source code.

The following table shows the topics that you must read based on the type of user-defined extension that you want to create:

Related concepts
User-defined extensions
Related reference
User-defined extensions