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.
Java Global Instance
The section has the following fields.
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. |