Hello, is it possible to configure HikariCP as a Resource in Tomcat's context.xml file?
I just did it with DBCP V2 (not included in Tomcat 7):
<Context>
<Resource name="jdbc/dinamica" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp2.BasicDataSourceFactory"
initialSize="3" maxActive="100" maxIdle="10" maxWait="3000" maxTotal="100"
username="xxxxxx" password="xxxxx"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/demodb"/>
</Context>
I had to change maxActive attribute to maxTotal, and add the factory attribute. It works OK, assuming the required JARs are added to the lib folder.
I wonder if something similar can be done with HikariCP?
Regards,
Martin
--
Dinamica Framework