BTM
  1. BTM
  2. BTM-18

Invoke XAResource.setTransactionTimeout() when a resource is enlisted

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Labels:
      None
    • Number of attachments :
      0

      Description

      While BTM does set up a timer to mark the transaction for rollback on a timeout, it does not set any timeout on the XAResource's. I'm not sure if this is exactly a bug, but it would definitely be an improvement if BTM called setTransactionTimeout on the resource just before calling start() (the first time). Because there is no TM.getTransactionTimeout() it's not possible for the app-server to determine what the current transaction timeout is and set it itself.

      Ideally the timeout set on the XAResource would be the transaction timeout minus any elapsed time since the transaction was started, but even just setting the transaction timeout would help.

        Activity

        Hide
        Ludovic Orban added a comment -

        Setting resource timeout can (and probably should) be done but it should also be possible to disable this feature as it can cause problems with some implementations.

        Show
        Ludovic Orban added a comment - Setting resource timeout can (and probably should) be done but it should also be possible to disable this feature as it can cause problems with some implementations.
        Hide
        Ludovic Orban added a comment -

        implemented in trunk

        Show
        Ludovic Orban added a comment - implemented in trunk
        Hide
        Ludovic Orban added a comment -

        a new applyTransactionTimeout property has been added to ResourceBean. The default value is false, setting it to true will set the remaining time before TX timeout on the XAResource.

        Show
        Ludovic Orban added a comment - a new applyTransactionTimeout property has been added to ResourceBean. The default value is false, setting it to true will set the remaining time before TX timeout on the XAResource.

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Ronald Tschalär
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: