public final boolean setTransactionTimeout(int seconds) throws XAException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) 
            Tr.event(this, tc, "setTransactionTimeout", seconds);

        // if the MC marked Stale, it means the user requested a purge pool with an immediate option
        // so don't allow any work to continue.  In this case, we throw XAER_RMFAIL xa error
        // which indicates that the resource manager is not available
        if (ivManagedConnection._mcStale) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) 
                Tr.debug(this, tc, "MC is stale throwing XAER_RMFAIL", ivManagedConnection);
            Tr.error(tc, "INVALID_CONNECTION");
            throw new XAException(XAException.XAER_RMFAIL);
        }

        return ivXaRes.setTransactionTimeout(seconds);
    }
public final boolean setTransactionTimeout ( int seconds ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "setTransactionTimeout" , seconds ) ; if ( ivManagedConnection . _mcStale ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale throwing XAER_RMFAIL" , ivManagedConnection ) ; Tr . error ( tc , "INVALID_CONNECTION" ) ; throw new XAException ( XAException . XAER_RMFAIL ) ; } return ivXaRes . setTransactionTimeout ( seconds ) ; }
Set the current transaction timeout value for this XAResource instance. Once set, this
timeout value is effective until setTransactionTimeout is invoked again with a different
value. To reset the timeout value to the default value used by the resource manager, set
the value to zero. If the timeout operation is performed successfully, the method returns
true; otherwise false.
<p>If a resource manager does not support transaction timeout value to be set explicitly,
this method returns false.

@param seconds
@return true if transaction timeout value is set successfully; otherwise false.
@exception XAException
Possible exception values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.