Architecture with UPoC Java
There is one JVM loaded per engine process, and is loaded when the first Java UPOC command is invoked. This stays loaded in memory until the engine process terminates.
When a UPoC Java class is first used by the engine, an instance of the class is instantiated in the JVM; subsequent uses of the same class in the same thread make use of the same instance. These instances stay in the JVM until the thread that instantiated these classes die. This also means that different threads instantiate different instances, even if they make use of the same UPoC class.
The scope of static variables is the lifetime of the process, and the scope of instance variables is the lifetime of the thread.
The extendable classes (TPS, TrxID, and the XLT subclasses) share a common
base class, Upoc
, and a common approach to constructors.