类 SpringJDBCDataSourceHolder
java.lang.Object
org.anyline.data.datasource.init.AbstractDataSourceHolder
org.anyline.data.jdbc.datasource.JDBCDataSourceHolder
org.anyline.environment.spring.data.jdbc.datasource.SpringJDBCDataSourceHolder
- 所有已实现的接口:
org.anyline.data.datasource.DataSourceHolder
@Component("anyline.environment.spring.data.datasource.holder.jdbc")
public class SpringJDBCDataSourceHolder
extends org.anyline.data.jdbc.datasource.JDBCDataSourceHolder
-
字段概要
从接口继承的字段 org.anyline.data.datasource.DataSourceHolder
caches, instances, log, params, types -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static DataSourcestatic DataSourcedatasource(String key) 原生DataSourcestatic SpringJDBCDataSourceHolderinstance()void在spring启动之前注册的数据源regTransactionManager(String key, DataSource datasource, boolean primary) org.anyline.data.runtime.DataRuntimeruntime(String key, Object datasource, String database, org.anyline.metadata.type.DatabaseType type, org.anyline.data.adapter.DriverAdapter adapter, boolean override) 添加数据源,同时添加事务与serviceboolean检测数据源是否连接正常booleanvalidate(DataSource datasource) booleanvalidate(org.anyline.data.runtime.DataRuntime runtime) booleanvalidate(org.springframework.jdbc.core.JdbcTemplate jdbc) 从类继承的方法 org.anyline.data.jdbc.datasource.JDBCDataSourceHolder
create, create, create, inject, inject, reg从类继承的方法 org.anyline.data.datasource.init.AbstractDataSourceHolder
value, value, value, value从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.anyline.data.datasource.DataSourceHolder
create, create, create, create, create, create, create, create, create, regTransactionManager, regTransactionManager, regTransactionManager, runtime, validate, value, value
-
构造器详细资料
-
SpringJDBCDataSourceHolder
public SpringJDBCDataSourceHolder()
-
-
方法详细资料
-
instance
-
datasource
原生DataSource- 参数:
key- key- 返回:
- DataSource
-
datasource
-
runtime
添加数据源,同时添加事务与service- 指定者:
runtime在接口中org.anyline.data.datasource.DataSourceHolder- 覆盖:
runtime在类中org.anyline.data.jdbc.datasource.JDBCDataSourceHolder- 参数:
key- 数据源名称datasource- 数据源bean idoverride- 是否覆盖同名数据源- 返回:
- DataSource
- 抛出:
Exception- 异常 Exception
-
runtime
public org.anyline.data.runtime.DataRuntime runtime(String key, Object datasource, String database, org.anyline.metadata.type.DatabaseType type, org.anyline.data.adapter.DriverAdapter adapter, boolean override) throws Exception - 指定者:
runtime在接口中org.anyline.data.datasource.DataSourceHolder- 覆盖:
runtime在类中org.anyline.data.jdbc.datasource.JDBCDataSourceHolder- 抛出:
Exception
-
loadCache
public void loadCache()在spring启动之前注册的数据源 -
validate
检测数据源是否连接正常- 参数:
datasource- 数据源名称- 返回:
- boolean
- 抛出:
Exception
-
validate
- 抛出:
Exception
-
validate
- 抛出:
Exception
-
validate
- 指定者:
validate在接口中org.anyline.data.datasource.DataSourceHolder- 覆盖:
validate在类中org.anyline.data.jdbc.datasource.JDBCDataSourceHolder- 抛出:
Exception
-
regTransactionManager
- 指定者:
regTransactionManager在接口中org.anyline.data.datasource.DataSourceHolder- 覆盖:
regTransactionManager在类中org.anyline.data.jdbc.datasource.JDBCDataSourceHolder
-