Search Results

Java Global Instance

You can use Java Global Instance shared configuration resource to specify a Java object to be shared across all process instances in a Java Virtual Machine (JVM).

When the engine is started, an instance of the specified Java class is constructed. When the process engine is shut down, if specified, a cleanup method is invoked on the object. The object is released before the engine shuts down. Any Java Invoke activity can be configured to access the shared Java global instance when the process engine runs. Any Java Invoke activity can access the shared java global instance by invoking the static methods of the configured Java class.

If multiple process instances access the shared Java global instance, you may want to ensure that only one process instance can access the object at a time. You can accomplish this by either declaring the methods of the configured class as synchronous or by using a critical section group.


The General field has the following fields.

Field Description
Package The name of the package in which you want to create a shared resource.
Name The name of the shared resource.
Description A short description of the shared resource.

Java Global Instance

The section has the following fields.

Field Description
Class Use the Browse a Class button to locate the class you want to use.
Method Select a constructor from the drop-down list of constructors available for this class. This is used to construct the class when the engine is started.

This field displays only the default constructor with no parameters or constructors that have only parameters of Java primitive types. You cannot create an object using a constructor that requires an object, array, or non-primitive type for a parameter.

Parameter Input The input parameters for the constructor selected in the Method field. Each input parameter has the following three fields:
  • Parameter: the name of the parameter
  • Type: the datatype of the parameter
  • Value: specify a value for the parameter in this field
Note: When string is the datatype for the parameter, do not use quotes around the string when specifying the value.

Advanced Configuration

This section has the following fields.

Field Description
Invoke Cleanup Method Selecting this check box signifies that you want to invoke a method on the object before the object is released from memory when the engine terminates. You can perform cleanup activities, such as closing connections, releasing resources, and so on.

Selecting this check box enables the Cleanup Method field.

Cleanup Method This field is only available when you select the Invoke Cleanup Method check box.

You can specify the name of the method to invoke before the object in memory is released. The method selected cannot contain any parameters, therefore only methods without parameters are listed in this field. Any values returned by the selected method are ignored, but exceptions raised by the selected method are sent to the log.