[ 
https://issues.apache.org/jira/browse/TEPHRA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511765#comment-15511765
 ] 

ASF GitHub Bot commented on TEPHRA-185:
---------------------------------------

Github user anew commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/14#discussion_r79965250
  
    --- Diff: 
tephra-core/src/main/java/org/apache/tephra/TransactionContext.java ---
    @@ -88,7 +88,27 @@ public boolean removeTransactionAware(TransactionAware 
txAware) {
        *     TransactionAware
        */
       public void start() throws TransactionFailureException {
    -    currentTx = txClient.startShort();
    +    txClient.startShort();
    +    staretAllTxAwares();
    +  }
    +
    +  /**
    +   * Starts a new transaction.  Calling this will initiate a new 
transaction using the {@link TransactionSystemClient},
    +   * and pass the returned transaction to {@link 
TransactionAware#startTx(Transaction)} for each registered
    +   * TransactionAware.  If an exception is encountered, the transaction 
will be aborted and a
    +   * {@code TransactionFailureException} wrapping the root cause will be 
thrown.
    +   *
    +   * @param timeout the transaction timeout for the transaction
    +   *
    +   * @throws TransactionFailureException if an exception occurs starting 
the transaction with any registered
    +   *     TransactionAware
    +   */
    +  public void start(int timeout) throws TransactionFailureException {
    +    txClient.startShort(timeout);
    --- End diff --
    
    ditto


> TransactionContext should support a custom transaction timeout
> --------------------------------------------------------------
>
>                 Key: TEPHRA-185
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-185
>             Project: Tephra
>          Issue Type: Improvement
>          Components: core
>            Reporter: Andreas Neumann
>            Assignee: Andreas Neumann
>
> TransactionSystemClient has a startShort(timeout). TransactionContext should 
> allow to specify a timeout, too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to