Class DataSourceProxy
- java.lang.Object
-
- org.springframework.jdbc.datasource.AbstractDataSource
-
- org.apereo.cas.configuration.support.DataSourceProxy
-
- All Implemented Interfaces:
java.sql.Wrapper
,javax.sql.CommonDataSource
,javax.sql.DataSource
public class DataSourceProxy extends org.springframework.jdbc.datasource.AbstractDataSource
This purpose of this class is to fix a class loading issue that occurs in some application servers when using a datasource/pool from the container @ClassLoader
. By having this class at the app level, proxying that occurs (e.g.RefreshScope
annotation) doesn't encounter problems if another proxying library somewhere else uses the container class loader and encounters other proxying classes in the application.Extends
AbstractDataSource
but it could probably just delegate all methods to the wrapped datasource if anything that AbstractDataSource is doing causes a problem.- Since:
- 5.1
-
-
Constructor Summary
Constructors Constructor Description DataSourceProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
getConnection()
java.sql.Connection
getConnection(java.lang.String username, java.lang.String password)
-
Methods inherited from class org.springframework.jdbc.datasource.AbstractDataSource
getLoginTimeout, getLogWriter, getParentLogger, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
-
-