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. Java users do not need to write a node factory. For more information refer to node and parser factory behavior.

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.

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 attribute would effectively be emulating a compute node. Use of ESQL inWebSphere 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