Package net.n2oapp.routing.datasource
Class JndiRoutingDataSource
- java.lang.Object
-
- org.springframework.jdbc.datasource.AbstractDataSource
-
- net.n2oapp.routing.datasource.RuntimeRoutingDataSource<String>
-
- net.n2oapp.routing.datasource.JndiRoutingDataSource
-
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
public class JndiRoutingDataSource extends RuntimeRoutingDataSource<String>
User: iryabov Date: 26.08.13 Time: 12:18
-
-
Constructor Summary
Constructors Constructor Description JndiRoutingDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDataSource(String jndiName)protected StringdetermineCurrentLookupKey()protected DataSourceresolveDataSourceByLookupKey(String lookupKey)-
Methods inherited from class net.n2oapp.routing.datasource.RuntimeRoutingDataSource
addDataSource, determineTargetDataSource, getConnection, getConnection, resolveSpecifiedDataSource, setDataSourceLookup, setDefaultLookupKey, setDefaultTargetDataSource, setLazyDetermineDS
-
Methods inherited from class org.springframework.jdbc.datasource.AbstractDataSource
getLoginTimeout, getLogWriter, getParentLogger, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Method Detail
-
addDataSource
public void addDataSource(String jndiName)
-
determineCurrentLookupKey
protected String determineCurrentLookupKey()
- Specified by:
determineCurrentLookupKeyin classRuntimeRoutingDataSource<String>
-
resolveDataSourceByLookupKey
protected DataSource resolveDataSourceByLookupKey(String lookupKey)
- Specified by:
resolveDataSourceByLookupKeyin classRuntimeRoutingDataSource<String>
-
-