org.geotools.data.jdbc.datasource
Class DBCPDataSource

java.lang.Object
  extended by org.geotools.data.jdbc.datasource.AbstractManageableDataSource
      extended by org.geotools.data.jdbc.datasource.DBCPDataSource
All Implemented Interfaces:
java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource, ManageableDataSource

public class DBCPDataSource
extends AbstractManageableDataSource

A closeable wrapper around BasicDataSource

Author:
Administrator

Field Summary
 
Fields inherited from class org.geotools.data.jdbc.datasource.AbstractManageableDataSource
wrapped
 
Constructor Summary
DBCPDataSource(org.apache.commons.dbcp.BasicDataSource wrapped)
           
 
Method Summary
 void close()
          Closes up the datasource, frees all of its resources.
 boolean isWrapperFor(java.lang.Class type)
           
 java.lang.Object unwrap(java.lang.Class type)
           
 
Methods inherited from class org.geotools.data.jdbc.datasource.AbstractManageableDataSource
getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBCPDataSource

public DBCPDataSource(org.apache.commons.dbcp.BasicDataSource wrapped)
Method Detail

close

public void close()
           throws java.sql.SQLException
Description copied from interface: ManageableDataSource
Closes up the datasource, frees all of its resources. No other connection can be gathered from this DataSource once close() has been called

Throws:
java.sql.SQLException

isWrapperFor

public boolean isWrapperFor(java.lang.Class type)
                     throws java.sql.SQLException
Specified by:
isWrapperFor in interface java.sql.Wrapper
Overrides:
isWrapperFor in class AbstractManageableDataSource
Throws:
java.sql.SQLException

unwrap

public java.lang.Object unwrap(java.lang.Class type)
                        throws java.sql.SQLException
Specified by:
unwrap in interface java.sql.Wrapper
Overrides:
unwrap in class AbstractManageableDataSource
Throws:
java.sql.SQLException


Copyright © 1996-2010 Geotools. All Rights Reserved.