org.synchronoss.cpo.jdbc
Class ClassJdbcDataSourceInfo
java.lang.Object
org.synchronoss.cpo.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
org.synchronoss.cpo.jdbc.ClassJdbcDataSourceInfo
- All Implemented Interfaces:
- Wrapper, EventListener, CommonDataSource, ConnectionEventListener, DataSource, DataSourceInfo
public class ClassJdbcDataSourceInfo
- extends AbstractJdbcDataSource
- implements ConnectionEventListener
Collects the info required to instantiate a DataSource from a JDBC Driver
Provides the DataSourceInfo factory method getDataSource which instantiates the DataSource
- Author:
- dberry
ClassJdbcDataSourceInfo
public ClassJdbcDataSourceInfo(String className,
SortedMap<String,String> properties)
throws CpoException
- Creates a ClassJdbcDataSourceInfo from a Jdbc Driver
- Parameters:
classname - The classname of a class that implements datasourceproperties - - The connection properties for connecting to the database
- Throws:
CpoException
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection in interface DataSource
- Throws:
SQLException
toString
public String toString()
- Overrides:
toString in class Object
createDataSource
protected DataSource createDataSource()
throws CpoException
- Specified by:
createDataSource in class AbstractDataSourceInfo
- Throws:
CpoException
connectionClosed
public void connectionClosed(ConnectionEvent ce)
- Specified by:
connectionClosed in interface ConnectionEventListener
connectionErrorOccurred
public void connectionErrorOccurred(ConnectionEvent ce)
- Specified by:
connectionErrorOccurred in interface ConnectionEventListener
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
Copyright © 2014. All Rights Reserved.