A.5.3. EJB 线程池属性
EJB 线程池可以使用属性进行配置,以便更高效地运行以满足特定配置需求。
-
max-threads
属性决定了执行者支持的线程总数或最大数量。
/subsystem=ejb3/thread-pool=default:write-attribute(name=max-threads, value=9) {"outcome" => "success"}
/subsystem=ejb3/thread-pool=default:write-attribute(name=max-threads, value=9)
{"outcome" => "success"}
-
core-threads
属性决定了 executor 池中保留的线程数。这包括空闲的线程。如果未指定core-threads
属性,它将默认为max-threads
的值。
/subsystem=ejb3/thread-pool=default:write-attribute(name=core-threads, value=3) {"outcome" => "success"}
/subsystem=ejb3/thread-pool=default:write-attribute(name=core-threads, value=3)
{"outcome" => "success"}
-
keepalive-time
属性决定非核心线程可以保持空闲的时间长度。这一次后,将删除非核心线程。
/subsystem=ejb3/thread-pool=default:write-attribute(name=keepalive-time, value={time=5, unit=MINUTES}) {"outcome"=> "success"}
/subsystem=ejb3/thread-pool=default:write-attribute(name=keepalive-time, value={time=5, unit=MINUTES})
{"outcome"=> "success"}
-
要在不更改
keepalive-time
属性的时间单位的情况下更改时间,请使用以下命令:
/subsystem=ejb3/thread-pool=default:write-attribute(name=keepalive-time.time, value=10) {"outcome"=> "success"}
/subsystem=ejb3/thread-pool=default:write-attribute(name=keepalive-time.time, value=10)
{"outcome"=> "success"}
修订了 2022 年 2 月 18 日:22:04 +1000