com.informix.jdbcx
Class IfxDataSource

java.lang.Object
  extended bycom.informix.jdbcx.IfxCoreDataSource
      extended bycom.informix.jdbcx.IfxDataSource
All Implemented Interfaces:
javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable

public class IfxDataSource
extends IfxCoreDataSource
implements javax.sql.DataSource, javax.naming.Referenceable

IfxDataSource class is the Informix implementation of javax.sql.DataSource.

See Also:
DataSource, IfxCoreDataSource, Serialized Form

Constructor Summary
IfxDataSource()
          Allocates an empty IfxDataSource object.
IfxDataSource(IfxConnectionPoolDataSource lcpds)
          Allocates an IfxDataSource object using the properties of the input ConnectionPoolDataSource.
 
Method Summary
 void activateHDRPool_Primary()
           
 void activateHDRPool_Secondary()
           
 java.sql.Connection getConnection()
          Attempts to establish a connection to the data source that this DataSource object represents.
 java.sql.Connection getConnection(java.lang.String luser, java.lang.String lpassword)
          Attempts to establish a connection to the data source that this DataSource object represents.
 IfxConnectionPoolDataSource getCPDS()
           
 int getCPMFreeCount()
           
 javax.naming.Reference getReference()
          This method implements the Referenceable interface.
 
Methods inherited from class com.informix.jdbcx.IfxCoreDataSource
addProp, getDatabaseName, getDataSourceName, getDescription, getDsProperties, getIfxALLOWREGISTEROUTFORINPARAM, getIfxBIG_FET_BUF_SIZE, getIfxCLIENT_LOCALE, getIfxCSM, getIfxDB_LOCALE, getIfxDBCENTURY, getIfxDBDATE, getIfxDBSPACETEMP, getIfxDBTEMP, getIfxDBTIME, getIfxDBUPSPACE, getIfxENABLE_HDRSWITCH, getIfxFET_BUF_SIZE, getIfxGL_DATE, getIfxGL_DATETIME, getIfxIFX_BATCHUPDATE_PER_SPEC, getIfxIFX_CODESETLOB, getIfxIFX_DIRECTIVES, getIfxIFX_EXTDIRECTIVES, getIfxIFX_GET_SMFLOAT_AS_FLOAT, getIfxIFX_ISOLATION_LEVEL, getIfxIFX_LOCK_MODE_WAIT, getIfxIFX_PAD_VARCHAR, getIfxIFX_SET_FLOAT_AS_SMFLOAT, getIfxIFXHOST_SECONDARY, getIfxIFXHOST, getIfxINFORMIXCONRETRY, getIfxINFORMIXCONTIME, getIfxINFORMIXOPCACHE, getIfxINFORMIXSERVER_SECONDARY, getIfxINFORMIXSTACKSIZE, getIfxJDBCTEMP, getIfxLDAP_IFXBASE, getIfxLDAP_PASSWD, getIfxLDAP_URL, getIfxLDAP_USER, getIfxLOBCACHE, getIfxNEWCODESET, getIfxNEWLOCALE, getIfxNEWNLSMAP, getIfxNODEFDAC, getIfxOPT_GOAL, getIfxOPTCOMPIND, getIfxOPTOFC, getIfxPATH, getIfxPDQPRIORITY, getIfxPLCONFIG, getIfxPLOAD_LO_PATH, getIfxPORTNO_SECONDARY, getIfxPROTOCOLTRACE, getIfxPROTOCOLTRACEFILE, getIfxPROXY, getIfxPSORT_DBTEMP, getIfxPSORT_NPROCS, getIfxSECURITY, getIfxSQLH_FILE, getIfxSQLH_LOC, getIfxSQLH_TYPE, getIfxSQLIDEBUG, getIfxSTMT_CACHE, getIfxTRACE, getIfxTRACEFILE, getLoginTimeout, getLogWriter, getPassword, getPortNumber, getProp, getRoleName, getServerName, getUser, isIfxDBANSIWARN, isIfxDELIMIDENT, isIfxENABLE_TYPE_CACHE, isIfxIFX_AUTOFREE, isIfxIFX_USEPUT, isIfxUSE_DTENV, isIfxUSEV5SERVER, readProperties, removeProperty, setDatabaseName, setDataSourceName, setDescription, setIfxALLOWREGISTEROUTFORINPARAM, setIfxBIG_FET_BUF_SIZE, setIfxCLIENT_LOCALE, setIfxCSM, setIfxDB_LOCALE, setIfxDBANSIWARN, setIfxDBCENTURY, setIfxDBDATE, setIfxDBSPACETEMP, setIfxDBTEMP, setIfxDBTIME, setIfxDBUPSPACE, setIfxDELIMIDENT, setIfxDirectConnection, setIfxENABLE_HDRSWITCH, setIfxENABLE_TYPE_CACHE, setIfxFET_BUF_SIZE, setIfxGL_DATE, setIfxGL_DATETIME, setIfxIFX_AUTOFREE, setIfxIFX_BATCHUPDATE_PER_SPEC, setIfxIFX_CODESETLOB, setIfxIFX_DIRECTIVES, setIfxIFX_EXTDIRECTIVES, setIfxIFX_GET_SMFLOAT_AS_FLOAT, setIfxIFX_ISOLATION_LEVEL, setIfxIFX_LOCK_MODE_WAIT, setIfxIFX_PAD_VARCHAR, setIfxIFX_SET_FLOAT_AS_SMFLOAT, setIfxIFX_USEPUT, setIfxIFXHOST_SECONDARY, setIfxIFXHOST, setIfxINFORMIXCONRETRY, setIfxINFORMIXCONTIME, setIfxINFORMIXOPCACHE, setIfxINFORMIXSERVER_SECONDARY, setIfxINFORMIXSTACKSIZE, setIfxJDBCTEMP, setIfxLDAP_IFXBASE, setIfxLDAP_PASSWD, setIfxLDAP_URL, setIfxLDAP_USER, setIfxLOBCACHE, setIfxNEWCODESET, setIfxNEWLOCALE, setIfxNEWNLSMAP, setIfxNODEFDAC, setIfxOPT_GOAL, setIfxOPTCOMPIND, setIfxOPTOFC, setIfxPATH, setIfxPDQPRIORITY, setIfxPLCONFIG, setIfxPLOAD_LO_PATH, setIfxPORTNO_SECONDARY, setIfxPROTOCOLTRACE, setIfxPROTOCOLTRACEFILE, setIfxPROXY, setIfxPSORT_DBTEMP, setIfxPSORT_NPROCS, setIfxSECURITY, setIfxSQLH_FILE, setIfxSQLH_LOC, setIfxSQLH_TYPE, setIfxSQLIDEBUG, setIfxSTMT_CACHE, setIfxTRACE, setIfxTRACEFILE, setIfxUSE_DTENV, setIfxUSEV5SERVER, setLoginTimeout, setLogWriter, setPassword, setPortNumber, setRoleName, setServerName, setUser, writeProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.DataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

IfxDataSource

public IfxDataSource()
              throws java.sql.SQLException
Allocates an empty IfxDataSource object.

Throws:
java.sql.SQLException - if error is encountered while instantiating the object.

IfxDataSource

public IfxDataSource(IfxConnectionPoolDataSource lcpds)
              throws java.sql.SQLException
Allocates an IfxDataSource object using the properties of the input ConnectionPoolDataSource.

Parameters:
lcpds - the ConnectionPoolDataSource object that contains the properties needed to make the physical connection.
Throws:
java.sql.SQLException - if error is encountered while instantiating the object.
See Also:
IfxConnectionPoolDataSource
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Attempts to establish a connection to the data source that this DataSource object represents.

Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException - if a database-access error occurs.

getConnection

public java.sql.Connection getConnection(java.lang.String luser,
                                         java.lang.String lpassword)
                                  throws java.sql.SQLException
Attempts to establish a connection to the data source that this DataSource object represents.

Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException - if a database-access error occurs.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
This method implements the Referenceable interface. Perhaps it should be called, makeReference. It is used by the naming service provider to create a reference object that embodies enough information about this datasource such that the datasource can be recreated when naming.lookup() is called. This reference is only used internally by the naming service. It is eventually bound to a user specified name (in naming.bind()) and subsequently, it is used to reconstruct the datasource when naming.lookup() is called with the given name.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
reference to the datasource.
Throws:
javax.naming.NamingException

getCPMFreeCount

public int getCPMFreeCount()

getCPDS

public IfxConnectionPoolDataSource getCPDS()

activateHDRPool_Primary

public void activateHDRPool_Primary()
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

activateHDRPool_Secondary

public void activateHDRPool_Secondary()
                               throws java.sql.SQLException
Throws:
java.sql.SQLException