org.synchronoss.cpo.jdbc
Class ClassDataSourceInfo

Package class diagram package ClassDataSourceInfo
java.lang.Object
  extended by org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
      extended by org.synchronoss.cpo.jdbc.AbstractDataSource
          extended by 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
 
Method Summary
 void connectionClosed(javax.sql.ConnectionEvent ce)
           
 void connectionErrorOccurred(javax.sql.ConnectionEvent ce)
           
protected  javax.sql.DataSource createDataSource()
           
 void finalize()
           
 java.sql.Connection getConnection()
           
 java.lang.String toString()
           
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractDataSource
getConnection, getLoginTimeout, getLogWriter, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
getDataSource, getDataSourceName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 datasource
properties - - The connection properties for connecting to the database
Throws:
CpoException
Method Detail

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.