Comments (4)
That is correct.
Sent from my iPhone
On Feb 4, 2014, at 8:22 AM, mbucc [email protected] wrote:
Hi,
If my HikariCP config has the wrong database credentials, I'd like my server to fail fast.Seems like the only way is to wait for the acquireRetries * acquireRetryDelay milliseconds, then try to call getConnection(), catch the SQLException and then exit.
Do I have that right?
Thanks,
Mark�
Reply to this email directly or view it on GitHub.
from hikaricp.
I'll investigate a way to fail the pool fast. Likely it will be via a RuntimeException thrown from the constructor ... but will require that the minimum pool size is non-zero.
from hikaricp.
If you instantiate your DataSource programmatically, you could use the raw driver DataSource to do the getConnection() check. e.g.:
PGSimpleDataSource dataSource = new PGSimpleDataSource();
dataSource.setUser("username");
dataSource.setPassword("password");
// check raw data source, e.g. dataSource.getConnection();
HikariConfig config = new HikariConfig();
config.setDataSource(dataSource);
HikariDataSource connectionPool = new HikariDataSource(config);
But I guess that won't help if you do this the declarative way.
from hikaricp.
The recently released HikariCP 1.2.9 has a new property initializationFailFast
that is not yet documented. If you set this to true
, there will be a RuntimeException
thrown when a HikariDataSource
is constructed, providing that the minimumPoolSize
is > 0.
from hikaricp.
Related Issues (20)
- PoolBase.quietlyCloseConnection() calls close twice HOT 1
- Encryption in DB Pool Configuration
- support to implement the go version Hikari HOT 1
- Hikari doesnt open more than 10 connections, even when maximumPoolSize and minimumIdle are greater than 10 HOT 2
- The meaning of the indicator is unclear and the relevant definition cannot be found in the source code.
- When I tested the throughput using JMH,found that hikaricp 5.0.0 was faster than version 5.0.1 HOT 1
- Available connections in HikariPool occassionaly drop to zero and not being renewed HOT 7
- In HikariJNDIFactory, int[] type property of DataSource cannot be set.
- PoolEntryCreator logs "Connection not added" when connection is added
- what is the default retry count , that hikari cp does when db is down
- repository @hikaricp which failed to fetch
- Refreshing AADSecurePrincipalSecret dynamically at runtime
- Hooking the connection.close() call HOT 1
- Connection schema is not recovered to settings value when setSchema is used (underline connection is Postgres).
- ability to set exceptionOverride instance, not just class name HOT 1
- hikaricp logs exception, then rethrows it
- Setting Login Timeout While Using HikariDataSource HikariDataSource(HikariConfig configuration) Constructor
- Connection leak in application because it fails to close pooled connections HOT 3
- How to handle OAuth connections that require manually updating the token
- getConnection Method is not throwing exception even when the key is expired HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hikaricp.