Search code examples
eclipselinkconnection-pooling

How can I tell connection pool utilization in eclipselink


I am working on a eclipseLink backed project, I want to use internal connection pool with EclipseLink, but I don't know how can I see it really working before it goes online.

I think I should enable logging for EclipseLink but I don't know what am I suppose to looking at in the log.

Another question is what is the best strategy to set connection pool size.


Solution

  • If you enable logging you should see when connections are acquired and released to the pool. At least on the latest version.

    For the pool size, you want the size to be the same as your expected number of threads (threads, not clients). If you app server has a thread pool, a similar size should be used. Normally from 20-150 depending on your hardware, for big hardware you would use more.

    Make the max and min sizes the same to avoid thrashing. Do not use a separate read connection pool, a combined read/write pool normally is more efficient (unless using JTA).