org.firebirdsql.pool
Class SimpleDataSource

java.lang.Object
  extended by org.firebirdsql.ds.RootCommonDataSource
      extended by org.firebirdsql.pool.SimpleDataSource
All Implemented Interfaces:
java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

Deprecated. Use FBSimpleDataSource for non-pooling, this implementation only works correctly with the deprecated FBConnectionPoolDataSource and DriverConnectionPoolDataSource classes

public class SimpleDataSource
extends RootCommonDataSource
implements javax.sql.DataSource

This is simple implementation of DataSource interface that uses ConnectionPoolDataSource as connection provider.

Author:
Roman Rokytskyy

Constructor Summary
SimpleDataSource(javax.sql.ConnectionPoolDataSource pool)
          Deprecated. Create instance of this class.
 
Method Summary
 java.sql.Connection getConnection()
          Deprecated. Get JDBC connection.
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
          Deprecated. Get JDBC connection for the specified username and password.
 int getLoginTimeout()
          Deprecated.  
 boolean isWrapperFor(java.lang.Class iface)
          Deprecated.  
 void setLoginTimeout(int seconds)
          Deprecated.  
 java.lang.Object unwrap(java.lang.Class iface)
          Deprecated.  
 
Methods inherited from class org.firebirdsql.ds.RootCommonDataSource
getLogWriter, getParentLogger, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.CommonDataSource
getLogWriter, setLogWriter
 

Constructor Detail

SimpleDataSource

public SimpleDataSource(javax.sql.ConnectionPoolDataSource pool)
Deprecated. 
Create instance of this class.

Parameters:
pool - instance of ConnectionPoolDataSource that will provide connections to this data source.
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Deprecated. 
Get JDBC connection.

Specified by:
getConnection in interface javax.sql.DataSource
Returns:
instance of Connection from this data source.
Throws:
java.sql.SQLException - if connection cannot be obtained.

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Deprecated. 
Get JDBC connection for the specified username and password.

Specified by:
getConnection in interface javax.sql.DataSource
Parameters:
username - username for new connection.
password - password corresponding to the username.
Returns:
instance of Connection.
Throws:
java.sql.SQLException - if connection cannot be obtained.

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Deprecated. 
Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws java.sql.SQLException
Deprecated. 
Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

isWrapperFor

public boolean isWrapperFor(java.lang.Class iface)
                     throws java.sql.SQLException
Deprecated. 
Specified by:
isWrapperFor in interface java.sql.Wrapper
Throws:
java.sql.SQLException

unwrap

public java.lang.Object unwrap(java.lang.Class iface)
                        throws java.sql.SQLException
Deprecated. 
Specified by:
unwrap in interface java.sql.Wrapper
Throws:
java.sql.SQLException


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.