| java.lang.Object com.ecyrd.jspwiki.TestJDBCDataSource
TestJDBCDataSource | public class TestJDBCDataSource implements DataSource(Code) | | Mock JDBC DataSource class that manages JDBC connections to a database whose
driver class, JDBC JAR location and connection details are specified in an
arbitrary propreties file. Gemerally, we pass on any exceptions encountered
as unchecked, since it means that the test case that references this class is
failing somehow.
author: Andrew R. Jaquith |
Constructor Summary | |
public | TestJDBCDataSource(File file) Constructs a new instance of this class, using a supplied properties
File as the source for JDBC driver properties. |
PROPERTY_DRIVER_CLASS | final protected static String PROPERTY_DRIVER_CLASS(Code) | | |
PROPERTY_DRIVER_JAR | final protected static String PROPERTY_DRIVER_JAR(Code) | | |
PROPERTY_DRIVER_URL | final protected static String PROPERTY_DRIVER_URL(Code) | | |
PROPERTY_USER_ID | final protected static String PROPERTY_USER_ID(Code) | | |
PROPERTY_USER_PASSWORD | final protected static String PROPERTY_USER_PASSWORD(Code) | | |
m_timeout | protected int m_timeout(Code) | | |
TestJDBCDataSource | public TestJDBCDataSource(File file) throws Exception(Code) | | Constructs a new instance of this class, using a supplied properties
File as the source for JDBC driver properties.
Parameters: file - the properties file containing JDBC properties throws: Exception - |
initializeJDBC | protected void initializeJDBC(File file) throws Exception(Code) | | Initialization method that reads a File, and attempts to locate and load
the JDBC driver from properties specified therein.
throws: SQLException - Parameters: file - the file containing the JDBC properties |
|
|