Class RemXAResource

    • Method Detail

      • commit

        public void commit​(Xid xid,
                           boolean onePhase)
                    throws XAException
        Commits the global transaction specified by xid.
        Specified by:
        commit in interface XAResource
        Parameters:
        xid - - A global transaction identifier.
        onePhase - - Use a one-phase commit protocol to commit the work done on behalf of xid.
        Throws:
        XAException
      • forget

        public void forget​(Xid xid)
                    throws XAException
        Forget about a transaction branch.
        Specified by:
        forget in interface XAResource
        Parameters:
        xid - - A global transaction identifier used by the start method.
        Throws:
        XAException
      • end

        public void end​(Xid xid,
                        int flags)
                 throws XAException
        Commits the global transaction specified by xid.
        Specified by:
        end in interface XAResource
        Parameters:
        xid - - A global transaction identifier used by the start method.
        flags - - TMSUCCESS, TMFAIL, or TMSUSPEND.
        Throws:
        XAException
      • getTransactionTimeout

        public int getTransactionTimeout()
                                  throws XAException
        Get the current transaction timeout value for this resource.
        Specified by:
        getTransactionTimeout in interface XAResource
        Returns:
        The current timeout value, in seconds.
        Throws:
        XAException - If an error occurred.
      • isSameRM

        public boolean isSameRM​(XAResource xares)
                         throws XAException
        Tells the caller if this resource has the same resource manager as the argument resource.
        Specified by:
        isSameRM in interface XAResource
        Throws:
        XAException - If an error occurred.
      • prepare

        public int prepare​(Xid xid)
                    throws XAException
        Prepare for a transaction commit of the specified xid.
        Specified by:
        prepare in interface XAResource
        Parameters:
        xid - - A global transaction identifier.
        Returns:
        - XA_RDONLY or XA_OK.
        Throws:
        XAException
      • recover

        public Xid[] recover​(int flag)
                      throws XAException
        Returns a list of prepared transaction branches.
        Specified by:
        recover in interface XAResource
        Parameters:
        flag - - TMNOFLAGS
        Returns:
        Array of prepared transaction XIDs.
        Throws:
        XAException
      • rollback

        public void rollback​(Xid xid)
                      throws XAException
        Roll back transaction branch specified by xid.
        Specified by:
        rollback in interface XAResource
        Parameters:
        xid - - A global transaction identifier.
        Throws:
        XAException
      • start

        public void start​(Xid xid,
                          int flags)
                   throws XAException
        Starts work on a transaction branch specified in xid
        Specified by:
        start in interface XAResource
        Parameters:
        xid - - A global transaction identifier.
        flags - - TMJOIN, TMSUSPEND, or TMNOFLAGS.
        Throws:
        XAException
      • setTransactionTimeout

        public boolean setTransactionTimeout​(int seconds)
                                      throws XAException
        Set the transaction timeout value for this resource. NuoDB resource manager does not support setting the timeout value.
        Specified by:
        setTransactionTimeout in interface XAResource
        Parameters:
        seconds - The timeout value, in seconds.
        Returns:
        false
        Throws:
        XAException