TomEE 1.6.0 has a default thread pool with 3 threads for EJB timer scheduling. I'd like to increase the size of this pool or configure a separate pool for my web application.
I've tried to set the following properties separately or together inside my application in WEB-INF/application.properties
and for TomEE globally in tomee/conf/system.properties
but they don't seem to have any effect:
openejb.timer.pool.size = 30
org.quartz.threadPool.threadCount = 30
How can I increase the EJB timer pool thread count in TomEE?
Edit: I'm aware of this blog post which appears to give the answer and have tried to apply that with no success. I'd like to avoid a custom ThreadPool implementation and thought one of the above properties should suffice.
Thanks!
As discussed in a TomEE Users mailing list thread, the property is currently EjbTimerPool.CorePoolSize
. The fact that the other mentioned properties don't work in 1.6.0 is a regression which is now fixed in TomEE trunk and will be released in TomEE 1.7.0.
To set the EJB timer pool size to 30, for example, add this to tomee_home/conf/system.properties:
EjbTimerPool.CorePoolSize = 30
The source code verifies the answer although an unused constant for openejb.timer.pool.size in the same class can be confusing.