While Java applications use threads for parallelism, the Informix database server uses threads for overlapping latency. That is, Informix threads run concurrently but not in parallel. To parallelize a query, the database server must spread the work among multiple virtual processors.
Consequently, the database server must have multiple instances of JVPs to make parallel calls to UDRs written in Java code. Because the JVMs embedded in different VPs do not share states, you cannot store global states using Java class variables. All global states must be stored in the database to be consistent. The only guarantee from the database server is that any given UDR instance executes from start to finish on the same VP. The database server enforces a round-robin scheduling policy where the UDR instances are spread over the JVPs before they start executing.
The consistency of multiple JVMs is not an issue on the Windows platform because all VPs are mapped to kernel threads instead of processes. Because all VPs share the same process space, you do not need to start multiple instances of the JVM.