Advanced
The Advanced tab has the following fields:.
Field |
Global Var? |
Description |
Construct Declared Class |
No |
This field controls whether the declaring class must be constructed when the activity is executed or whether an object reference must be supplied in the activity’s input schema. When this field is checked, the declaring class is constructed using the default constructor when the activity executes. In this case, the declaring class is not included in the activity’s input schema. When this field is unchecked, you must supply an object reference for the Java class specified on the Configuration tab. The object must be created and contained in the output schema of a previously executed activity, such as a Java Code activity, another Java Method activity, a RMI Server process starter, or an XML To Java activity. In this case, the declaring class is included in the activity’s input schema. This field is not available when a static method is selected. |
Cache Constructed Class |
No |
This field is only available when the Construct Declared Class is checked. When checked, this specifies that all instances of this Java Method activity share the instance of the constructed declaring class. If the constructed object is cached, it is kept in memory until the process engine terminates. If this field is unchecked, each instance of this Java Method activity creates its own copy of the declaring class. For more information about caching the declared class, see Caching the Java Class. |
Invoke Cleanup Method |
No |
This field is only available when the Cache Constructed Class field is checked. When checked, this specifies that you want to invoke a method on the cached object before the object is released from memory when the process engine terminates. This allows you to perform cleanup activities, such as closing connections, updating database tables, and so on. When this field is checked, the Cleanup Method field appears. |
Cleanup Method |
No |
This field is only available when the Invoke Cleanup Method field is checked. This field allows you to specify the name of the method to invoke before the cached class in memory is released. The selected method cannot contain any parameters, therefore only methods with no parameters are listed in this field. Any values returned by the selected method are ignored, but any exceptions raised are sent to the log. |