Yes, you can set the thread affinity of the automatically created context thread.
The relevant context properties for the underlying C API can be found here.
From within JavaRTO, you can provide the required “CONTEXT_THREAD_AFFINITY” property on context creation like so:
String[] contextProperties = new String[4];
int index = 0;
contextProperties[index++] = "CONTEXT_THREAD_AFFINITY";
contextProperties[index++] = "255";
contextProperties[index++] = "CONTEXT_CREATE_THREAD";
contextProperties[index++] = "1";
rc = Solclient.createContextForHandle(contextHandle, contextProperties);
Note: if you pass context properties to createContextForHandle(), you must include CONTEXT_CREATE_THREAD with a value of 1. (Its default is 0, meaning disabled, which is not supported).