org.springbyexample.jdbc.datasource
Class HsqldbInitializingDriverManagerDataSource
java.lang.Object
org.springframework.jdbc.datasource.AbstractDataSource
org.springframework.jdbc.datasource.DriverManagerDataSource
org.springbyexample.jdbc.datasource.InitializingDriverManagerDataSource
org.springbyexample.jdbc.datasource.HsqldbInitializingDriverManagerDataSource
- All Implemented Interfaces:
- DataSource, InitializingBean
public class HsqldbInitializingDriverManagerDataSource
- extends InitializingDriverManagerDataSource
- implements InitializingBean
HSQL DB specific initializing DriverManagerDataSource
.
If values aren't set for driver class name, url, username, or password
defaults for an in memory HSQL DB are used.
After the properties are set any database initialization scripts are run.
This is very useful for unit testing.
- Author:
- David Winterfeldt
- See Also:
DriverManagerDataSource
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 |
DRIVER_CLASS_NAME
protected static String DRIVER_CLASS_NAME
URL
protected static String URL
USERNAME
protected static String USERNAME
PASSWORD
protected static String PASSWORD
HsqldbInitializingDriverManagerDataSource
public HsqldbInitializingDriverManagerDataSource()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Implementation of
InitializingBean
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Overrides:
afterPropertiesSet
in class InitializingDriverManagerDataSource
- Throws:
Exception
Copyright © 2008 Spring by Example. All Rights Reserved.