Skip to content

Data sources without explicitly specified dataSource or dataSourceClass overwrite each others connectionTimeouts #2404

Description

@Tobias43

Steps to reproduce:

  1. Create a HikariDataSource A with HikariConfiguration containing a jdbcUrl and a driverClassName (but neither dataSourceClassName, dataSourceJndiName nor dataSource) and a connectionTimeout of 10s.
  2. Create a HikariDataSource B with a different jdbcUrl and a timeout of 20s.

Actual result:
Both data sources use a connection timeout of 20s (the last one wins) because Hikari uses the static method java.sql.DriverManager#setLoginTimeout

Expected result:
Both data sources use their own individual connection timeouts.

This probably means having to use some vendor specific properties, but I think it is preferable to the current behavior. Even ignoring the connectionTimeout when no data source is set explicitly would be better than data sources overwriting each others timeouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions