Default language.

Using multithreading in the Java plug-in server


To improve performance, the Java plug-in server uses a configurable pool of worker threads to handle RPC calls. The pool and its associated plug-in instances are created at startup, rather than as RPC calls are received. If a connection fails, the plug-in instances associated with the thread remain instantiated and can still process calls from other connections. Do not send any requests to the Java plug-in server before the plug-ins are loaded and instantiated. (If the plug-in log level is Warn or higher, a message is recorded in the log file when the plug-in server is ready to receive RPC calls.)

An unlimited number of tasks can be added to the worker thread task queue. To be notified when too many tasks accumulate in the queue, specify a task threshold. When the threshold is exceeded, a message is logged in the arjavaplugin.log file. This enables you to avoid potential queue bottlenecks by creating more worker threads in a timely fashion.

To avoid bottlenecks, here are some changes you can make on the AR System Administration:Plugin Server Configuration form:

  • When an RPC call is received from the , a selector thread adds the call to the worker thread task queue. By default, the system uses two selector threads. To increase the number of selector threads, change the Number of Selector Threads field.
  • Whenever a worker thread is free, it starts processing the next request in the task queue. By default, the pool contains five worker threads. To increase the number of worker threads, change the Number Of Core Threads field.
  • To specify the task threshold, use the Work Queue Task Threshold field.
  • To specify how frequently the system checks to see whether the task threshold has been exceeded, use the Work Queue Monitor Log Interval field. 


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*