com.informix.jdbcx

Class IfxXADataSource

  • All Implemented Interfaces:
    java.io.Serializable, javax.naming.Referenceable, javax.sql.CommonDataSource, 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 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
        Parameters:
        user - the data source user on whose behalf the connection is being made
        password - the user's password
        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).
        Parameters:
        IFX_XASPEC_Flag - if set and valid, ("y", "Y", "n" or "N") enables or disables conformance. Default IFX_XASPEC is the System property IFX_XASPEC if set and valid or "n".
      • 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).
        Parameters:
        IFX_XASTDCOMPLIANCE_XAEND_Flag - 1 enables other disables conformance. Default behavior is set by the server and onconfig variables and can be changed on a connection basis by setting this variable
      • 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.
      • getParentLogger

        public java.util.logging.Logger getParentLogger()
                                                 throws java.sql.SQLFeatureNotSupportedException
        Specified by:
        getParentLogger in interface javax.sql.CommonDataSource
        Throws:
        java.sql.SQLFeatureNotSupportedException