org.synchronoss.cpo.jdbc
Class ClassDataSourceInfo
java.lang.Object
org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractDataSource
org.synchronoss.cpo.jdbc.ClassDataSourceInfo
- All Implemented Interfaces:
- java.sql.Wrapper, java.util.EventListener, javax.sql.CommonDataSource, javax.sql.ConnectionEventListener, javax.sql.DataSource, DataSourceInfo
public class ClassDataSourceInfo
- extends AbstractDataSource
- implements javax.sql.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
|
Constructor Summary |
ClassDataSourceInfo(java.lang.String className,
java.util.SortedMap<java.lang.String,java.lang.String> properties)
Creates a ClassDataSourceInfo from a Jdbc Driver |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClassDataSourceInfo
public ClassDataSourceInfo(java.lang.String className,
java.util.SortedMap<java.lang.String,java.lang.String> properties)
throws CpoException
- Creates a ClassDataSourceInfo 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 java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
createDataSource
protected javax.sql.DataSource createDataSource()
throws CpoException
- Specified by:
createDataSource in class AbstractDataSourceInfo
- Throws:
CpoException
connectionClosed
public void connectionClosed(javax.sql.ConnectionEvent ce)
- Specified by:
connectionClosed in interface javax.sql.ConnectionEventListener
connectionErrorOccurred
public void connectionErrorOccurred(javax.sql.ConnectionEvent ce)
- Specified by:
connectionErrorOccurred in interface javax.sql.ConnectionEventListener
finalize
public void finalize()
throws java.lang.Throwable
- Overrides:
finalize in class java.lang.Object
- Throws:
java.lang.Throwable
Copyright © 2012. All Rights Reserved.