The setTransactionTimeOut() method is used to modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method. This method belongs to the UserTransaction interface. The transaction service uses some default value for the transaction timeout if an application has not called this method. The following is the general format of this method:

public abstract void setTransactionTimeout(int sec)

Here, sec represents the value of the timeout in seconds. If the value is zero, the transaction service restores the default value.

  • Share/Bookmark