Skip to content

JNDI DataSource Factory (Tomcat, etc.)

Brett Wooldridge edited this page Apr 30, 2014 · 4 revisions

HikariCP includes a JNDI DataSource factory that can be used with Tomcat or other containers.

Example (Tomcat) configuration:

<Resource name="jdbc/exampleDS" 
          auth="Container"
          type="javax.sql.DataSource"
          factory="com.zaxxer.hikari.HikariJNDIFactory"
          maximumPoolSize="16"
          username="postgres"
          password="password"
          driverClassName="org.postgresql.Driver"
          jdbcUrl="jdbc:postgresql://localhost/demodb"/>

Clone this wiki locally