OK, so it was just a matter of replacing
PoolableConnectionFactory factory = new PoolableConnectionFactory(xacf, pool, null, null, true, true);
by
PoolableManagedConnectionFactory factory = new PoolableManagedConnectionFactory(xacf, pool, null, null, true, true);
The rest are only imports cleaning.
Too bad we did not notice that for 3.5 years. It seems it does not affect servers with plenty of memory, or updated often enough. But I recommend to upgrade of course...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1431191 13f79535-47bb-0310-9956-ffa450edef68