com.informix.jdbcx
Class IfxXADataSource

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

public class IfxXADataSource
extends IfxCoreDataSource
implements javax.sql.XADataSource, javax.naming.Referenceable

IfxXADataSource class is the Informix implementation of javax.sql.XADataSource.

See Also:
DataSource, XADataSource, IfxCoreDataSource, Serialized Form

Constructor Summary
IfxXADataSource()
           
 
Method Summary
 java.lang.String getIfxIFX_XASPEC()
          Gets the value of Informix specific variable IFX_XASPEC.
 int getIfxIFX_XASTDCOMPLIANCE_XAEND()
          Gets the value of Informix specific variable IFX_XASTDCOMPLIANCE_XAEND.
 javax.naming.Reference getReference()
          Gets a reference to IfxXAConnectionPooledDataSource object.
 javax.sql.XAConnection getXAConnection()
          Attempts to establish a connection to the data source that this XADataSource object represents.
 javax.sql.XAConnection getXAConnection(java.lang.String uid, java.lang.String passwd)
          Attempts to establish a connection to the data source that this XADataSource object represents.
 void setIfxIFX_XASPEC(java.lang.String XASPEC_Flag)
          Sets the value of Informix specific variable IFX_XASPEC.
 void setIfxIFX_XASTDCOMPLIANCE_XAEND(int flag)
          Sets the value of Informix specific variable IFX_XASTDCOMPLIANCE_XAEND IFX_IFX_XASTDCOMPLIANCE_XAEND if set to 1 will enable if set to 0 will disable server behavior that conforms to the XA+ Specification (1994).
 
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.XADataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

IfxXADataSource

public IfxXADataSource()
Method Detail

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Attempts to establish a connection to the data source that this XADataSource object represents. User and password are taken from the XADataSource values.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Returns:
A Connection to the database.
Throws:
java.sql.SQLException - if a database-access error occurs.

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String uid,
                                              java.lang.String passwd)
                                       throws java.sql.SQLException
Attempts to establish a connection to the data source that this XADataSource object represents. The user and password parameters override those set in the XADataSource.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Returns:
a Connection to the database.
Throws:
java.sql.SQLException - if a database-access error occurs.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Gets a reference to IfxXAConnectionPooledDataSource object. Used for registering this object.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
a Reference object to IfxXAConnectionPooledDataSource.
Throws:
javax.naming.NamingException - if error occurs in getting the reference.

setIfxIFX_XASPEC

public void setIfxIFX_XASPEC(java.lang.String XASPEC_Flag)
Sets the value of Informix specific variable IFX_XASPEC. IFX_XASPEC if set to "y" or "Y" will enable server behavior that conforms to the XA+ Specification (1994).


getIfxIFX_XASPEC

public java.lang.String getIfxIFX_XASPEC()
Gets the value of Informix specific variable IFX_XASPEC.

Returns:
the current setting of Datasource property IFX_XASPEC if set or the current setting of System property IFX_XASPEC if set or "n". Only "y" or "n" are returned. Settings other than "y", "Y", "n", or "N" are ignored.

setIfxIFX_XASTDCOMPLIANCE_XAEND

public void setIfxIFX_XASTDCOMPLIANCE_XAEND(int flag)
Sets the value of Informix specific variable IFX_XASTDCOMPLIANCE_XAEND IFX_IFX_XASTDCOMPLIANCE_XAEND if set to 1 will enable if set to 0 will disable server behavior that conforms to the XA+ Specification (1994).


getIfxIFX_XASTDCOMPLIANCE_XAEND

public int getIfxIFX_XASTDCOMPLIANCE_XAEND()
Gets the value of Informix specific variable IFX_XASTDCOMPLIANCE_XAEND.

Returns:
the current setting of Datasource property IFX_XASTDCOMPLIANCE_XAEND only 1 (enabled), 0 (disabled) or -1 (not set) will be returned.