Set the number of virtual processors
The dynamic, multithreaded nature of a virtual processor allows it to perform parallel processing. Virtual processors of the CPU class can run multiple session threads, working in parallel, for an SQL statement contained within a UDR.
VPCLASS cpu,num=4
On Windows™, all virtual processors share the same process space. Therefore, you do not need to start multiple instances of Java™ VPs to execute Java UDRs in parallel. On UNIX™, the database server must have multiple instances of JVPs to parallelize Java UDR calls. Because the Java Virtual Machines that are embedded in different VPs do not share states, you cannot store global states with Java class variables. All global states must be stored in the database to be consistent.