These are default values in JBoss EAP, except max-pool size increased to 40 (default=20)
I guess ejb max-pool-size should be equal to database max pool size.
Thanks to this explanations from Wolf-Dieter Fink in this thread
https://developer.jboss.org/thread/236044
I am gonna try to reduce instance acquisition timeout, event if it is a pain for performance.