Java language advanced remote mode
To create a remote mode program that can handle multiple simultaneous connections, each connection must be handled independently to avoid blocking. In most of the examples, this is shown by using the runnable class to execute the AE and adding it to the executor pool. See Java Language Scalar Function (Remote Mode) for detail
Since this is already implemented in the remote mode "apply,” the compilation, registration, and running are the same.