Class NetXAConnection


  • public class NetXAConnection
    extends java.lang.Object
    • Constructor Detail

      • NetXAConnection

        public NetXAConnection​(LogWriter logWriter,
                               java.lang.String user,
                               java.lang.String password,
                               BasicClientDataSource40 dataSource,
                               int rmId,
                               boolean isXAConn,
                               ClientPooledConnection cpc)
                        throws SqlException
        The construcor for the NetXAConnection. The parameter is set to this from ClientXAConnection when it creates an instance of NetXAConnection. This is then passed on the underlying NetConnection constructor and is used to raise StatementEvents from any PreparedStatement that would be created from that NetConnection.
        Parameters:
        logWriter - LogWriter object associated with this connection
        user - user id for this connection
        password - password for this connection
        dataSource - The DataSource object passed from the ClientXAConnection object from which this constructor was called
        rmId - The Resource manager ID for XA Connections
        isXAConn - true if this is a XA connection
        cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
        Throws:
        SqlException
    • Method Detail

      • setCorrelatorToken

        public void setCorrelatorToken​(byte[] crttoken)
      • setNetXAResource

        void setNetXAResource​(NetXAResource xares)
      • getNetConnection

        public NetConnection getNetConnection()
        Returns underlying net connection
        Returns:
        NetConnection
      • createNetConnection

        private NetConnection createNetConnection​(LogWriter logWriter,
                                                  java.lang.String user,
                                                  java.lang.String password,
                                                  BasicClientDataSource40 dataSource,
                                                  int rmId,
                                                  boolean isXAConn,
                                                  ClientPooledConnection cpc)
                                           throws SqlException
        Creates NetConnection for the supported version of jdbc. This method can be overwritten to return NetConnection of the supported jdbc version.
        Parameters:
        logWriter - LogWriter object associated with this connection
        user - user id for this connection
        password - password for this connection
        dataSource - The DataSource object passed from the ClientXAConnection object from which this constructor was called
        rmId - The Resource manager ID for XA Connections
        isXAConn - true if this is a XA connection
        cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
        Returns:
        NetConnection
        Throws:
        SqlException