Class XASessionImpl

    • Field Detail

      • SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT

        public static final String SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT
        System property specifying the default Transaction Timeout
        See Also:
        Constant Field Values
    • Method Detail

      • isSameRM

        public boolean isSameRM​(XAResource xares)
                         throws XAException

        Two resources belong to the same resource manager if both connections (i.e. sessions) have the same credentials.

        Specified by:
        isSameRM in interface XAResource
        Throws:
        XAException
      • start

        public void start​(Xid xid,
                          int flags)
                   throws XAException

        If TMNOFLAGS is specified, we create a new transaction context and associate it with this resource. If TMJOIN is specified, this resource should use the same transaction context as another, already known transaction. If TMRESUME is specified, we should resume work on a transaction context that was suspended earlier. All other flags generate an XAException of type XAER_INVAL

        Specified by:
        start in interface XAResource
        Throws:
        XAException
      • end

        public void end​(Xid xid,
                        int flags)
                 throws XAException

        If TMSUCCESS is specified, we disassociate this session from the transaction specified. If TMFAIL is specified, we disassociate this session from the transaction specified and mark the transaction rollback only. If TMSUSPEND is specified, we disassociate this session from the transaction specified. All other flags generate an XAException of type XAER_INVAL

        It is legal for a transaction association to be suspended and then ended (either with TMSUCCESS or TMFAIL) without having been resumed again.

        Specified by:
        end in interface XAResource
        Throws:
        XAException
      • associate

        public void associate​(TransactionContext tx)
        Associate this session with a global transaction. Internally, set the transaction containing all transaction-local objects to be used when performing item retrieval and store.
      • logout

        public void logout()
        Invalidates this session and releases all associated resources.
        Specified by:
        logout in interface Session
        Overrides:
        logout in class SessionImpl