Creating Java code for a JavaCompute node
You can associate Java™ code with your JavaCompute node by using a wizard, setting node properties, or creating a Java project.
Before you begin
Before you complete this task, create a JavaCompute node in your message flow.
About this task
You can store the Java code for a JavaCompute node in the same application as the message flow that contains the JavaCompute node. Alternatively, if you want to share Java classes across multiple solutions, you can store Java code in a shared library and refer to that library from one or more applications that contain message flows with JavaCompute nodes. In this case, if you already have Java classes, you can add them to a shared library before you create your message flows. Alternatively, you can specify a shared library to contain the classes when you create the JavaCompute node.
Use the New Java Compute Node Class wizard to create template code
About this task
Procedure
Results
The Java class file opens in the editor. If you view the basic properties for the JavaCompute node, the Java class field is populated with the location of the specified Java class. If your Java classes are stored in a shared library, the Java classloader service field contains a qualifier for the shared library that contains the Java class in the form {sharedLibraryName}.
Associate a JavaCompute node with an existing Java class
About this task
To associate a JavaCompute node with an existing Java class, complete the following steps:
Procedure
- In the IBM App Connect Enterprise Toolkit, right-click the JavaCompute node and click Properties.
- In the Java Class field, click Browse and
start to type the name of the required Java class.
As you type, matching classes are displayed.
- Select the appropriate class and click OK.
Results
Create a Java project from scratch
About this task
Procedure
Results
You have created your Java project.