I am currently trying different connection pools together with eclipselink. The one I am currently configuring is the one by eclipselink itself. Now I am not sure if it is meant to be used in production or if I should use another such as HikariCP? Also I am not sure how to detect if the Eclipselink connection pool is really running. My configuration is the following:
persistence.xml
...
<!-- Configuring Eclipse Link -->
<property name="javax.persistence.jdbc.driver" value="net.sourceforge.jtds.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:jtds:sqlserver://SERVER/dev;instance=MSSQL2008R2"/>
<property name="javax.persistence.jdbc.user" value="user"/>
<property name="javax.persistence.jdbc.password" value="password"/>
<property name="eclipselink.persistence-context.flush-mode" value="commit" /> <!-- Flushing occurs at transaction commit. (https://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_persistence_context_flushmode.htm)-->
<!-- We use the EclipseLink internal components (https://www.eclipse.org/eclipselink/documentation/2.6/jpa/extensions/persistenceproperties_ref.htm)-->
<!-- Eclipselink jdbc configuration -->
<property name="eclipselink.jdbc.batch-writing" value="JDBC"/> <!-- Batch-writing is supported by mssql and our jdbc driver (https://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_jdbc_batchwriting.htm) -->
<!-- <property name="eclipselink.jdbc.batch-writing.size" value="10000"/> --> <!--Performance testing http://java-persistence-performance.blogspot.ch/2013/05/batch-writing-and-dynamic-vs.html -->
<property name="eclipselink.jdbc.bind-parameters" value="true"/> <!-- Parameterized sql queries -->
<property name="eclipselink.jdbc.cache-statements" value="true"/> <!-- https://docs.oracle.com/middleware/1212/core/ASPER/toplink.htm#ASPER99838 -->
<property name="eclipselink.jdbc.cache-statements.size" value="10000"/>
<property name="eclipselink.jdbc.allow-native-sql-queries" value="false"/> <!-- We explicitly set this, even though it is disabled by multitenancy by default -->
<!-- Eclipselink connection pool configuration-->
<property name="eclipselink.connection-pool.default.initial" value="50" />
<property name="eclipselink.connection-pool.default.min" value="50"/>
<property name="eclipselink.connection-pool.default.max" value="100"/>
<property name="eclipselink.connection-pool.default.url" value="jdbc:jtds:sqlserver://SERVER/dev;instance=MSSQL2008R2"/>
<!-- Eclipselink cache configuration -->
<property name="eclipselink.cache.shared.default" value="true" />
<!-- Eclipselink logging configuration -->
<property name="eclipselink.logging.level" value="OFF"/> <!-- How much log should be shown | from: https://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Log_Level_Configuration-->
<property name="eclipselink.logging.level.sql" value="OFF"/> <!-- How to show the sql queries -->
<property name="eclipselink.target-database" value="SQLServer"/> <!-- What sql database is used | from: http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_target_database.htm-->
<property name="eclipselink.ddl-generation" value="none"/>
<property name="eclipselink.session.customizer" value="platform.data.EclipseLinkSessionCustomizer"/> <!-- Defines a naming strategy -->
<property name="eclipselink.multitenant.tenants-share-emf" value="false"/>
...
Thank you for your help!