How to migrate JBoss EAP datasource setting to Spring Boot with HikariCP

Solution Unverified - Updated -

Issue

  • How do I configure Spring Boot with HikariCP to be the same as the following datasource settings in JBoss EAP?
<datasource jndi-name="java:jboss/datasources/PostgresDS" pool-name="PostgresDS">
    <connection-url>jdbc:postgresql://127.0.0.1:5432/mydb</connection-url>
    <driver>postgresql</driver>
    <pool>
        <min-pool-size>10</min-pool-size>
        <initial-pool-size>10</initial-pool-size>
        <max-pool-size>10</max-pool-size>
        <prefill>true</prefill>
    </pool>
    <security>
        <user-name>postgres</user-name>
        <password>postgres</password>
    </security>
    <validation>
        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
        <validate-on-match>true</validate-on-match>
        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
    </validation>
</datasource>
  • Does HikariCP support the EAP equivalent of validate-on-match?
  • Does HikariCP support prefill at startup?

Environment

  • Red Hat support for Spring Boot
    • 2.4.9
  • HikariCP
    • 3.4.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content