Class OracleXADataSource

    • Field Detail

      • useNativeXA

        protected boolean useNativeXA
    • Constructor Detail

      • OracleXADataSource

        public OracleXADataSource()
                           throws java.sql.SQLException

        Create an OracleXADataSource instance.

        Throws:
        java.sql.SQLException - if error occurs while creating an object
    • Method Detail

      • getXAConnection

        public abstract javax.sql.XAConnection getXAConnection()
                                                        throws java.sql.SQLException

        Attempt to establish a database connection.

        Specified by:
        getXAConnection in interface OracleXADataSource
        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 abstract javax.sql.XAConnection getXAConnection​(java.lang.String user,
                                                               java.lang.String passwd)
                                                        throws java.sql.SQLException

        Attempt to establish a database connection.

        Specified by:
        getXAConnection in interface OracleXADataSource
        Specified by:
        getXAConnection in interface javax.sql.XADataSource
        Parameters:
        user - the database 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.
      • setURL

        public void setURL​(java.lang.String url)
        Description copied from class: OracleDataSource
        Set the URL from which connections have to be obtained. If URL is set all other properties like databasename, servername, portNumber, network protocol, tnsentry, and driver Type will be ignored.

        Specified by:
        setURL in interface OracleCommonDataSource
        Overrides:
        setURL in class OracleDataSource
        Parameters:
        url - URL to be set.
      • createXAConnectionBuilder

        public OracleXAConnectionBuilder createXAConnectionBuilder()
        Creates a new Oracle XA ConnectionBuilder instance
        Specified by:
        createXAConnectionBuilder in interface OracleXADataSource
        Specified by:
        createXAConnectionBuilder in interface javax.sql.XADataSource
        Returns:
        The XA ConnectionBuilder instance that was created