org.springbyexample.jdbc.datasource
Class InitializingDriverManagerDataSource
java.lang.Object
org.springframework.jdbc.datasource.AbstractDataSource
org.springframework.jdbc.datasource.DriverManagerDataSource
org.springbyexample.jdbc.datasource.InitializingDriverManagerDataSource
- All Implemented Interfaces:
- DataSource, InitializingBean
- Direct Known Subclasses:
- HsqldbInitializingDriverManagerDataSource
public class InitializingDriverManagerDataSource
- extends DriverManagerDataSource
- implements InitializingBean
Initializing version of DriverManagerDataSource
.
After the properties are set any database initialization scripts are run.
This is very useful for unit testing.
- Author:
- David Winterfeldt
- See Also:
DriverManagerDataSource
,
SqlScriptProcessor
Methods inherited from class org.springframework.jdbc.datasource.DriverManagerDataSource |
getConnection, getConnection, getConnectionFromDriverManager, getConnectionFromDriverManager, getConnectionFromDriverManager, getConnectionProperties, getDriverClassName, getPassword, getUrl, getUsername, setConnectionProperties, setDriverClassName, setPassword, setUrl, setUsername |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sqlScriptProcessor
protected SqlScriptProcessor sqlScriptProcessor
InitializingDriverManagerDataSource
public InitializingDriverManagerDataSource()
setSqlScriptProcessor
public void setSqlScriptProcessor(SqlScriptProcessor sqlScriptProcessor)
- Sets SQL script processor.
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Implementation of
InitializingBean
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
Copyright © 2008 Spring by Example. All Rights Reserved.