public class ViburGetConnectionTimeoutMonitor extends Object
For example, Hibernate when Hibernate calls DataSource.getConnection()
and gets a
SQLTimeoutException
, it treats it like any other SQLException
, which results in a
generic server error. This results in a shitty user experience.
By exposing the "failed to get a connection within the timeout" condition, we can report this to the user more elegantly, e.g. return an HTTP 503 rather than a 500, or to render a dedicated "please try again" error message.
ConfluenceViburConnectionPoolProvider.setAdditionalProperties(ViburDBCPDataSource)
,
Hook.GetConnection
,
ViburDBCPDataSource.getConnection()
Modifier and Type | Class and Description |
---|---|
static class |
ViburGetConnectionTimeoutMonitor.ServletFilter |
Constructor and Description |
---|
ViburGetConnectionTimeoutMonitor() |
Modifier and Type | Method and Description |
---|---|
static org.vibur.dbcp.pool.Hook.GetConnection |
createViburHook()
Returns a Vibur hook which listens for cases where no connection was returned
|
Copyright © 2003–2017 Atlassian. All rights reserved.