Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-18718

ServiceRegistry's RetryingTransactionHelper is inconsistent with TransactionService's equivalent

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.d Community, 4.2.c Community
    • Fix Version/s: 4.2 Enterprise
    • Component/s: Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Resolution Time Custom Field:
      17 hours, 35 minutes, 49 seconds

      Description

      I wasn't sure if I should post this as a bug or as documentation issue or something else. So first of all sorry if this isn't the best place to post this.

      When you call getRetryingTransactioHelper() method of TransactionService you get a new instance of it but when you call the method with the same name for ServiceRegistry you get the bean defined as "retryingTransactionHelper", which is a "singleton bean".

      So changing retrying related parameters to fit your needs (for example setMaxRetries) is safe when you get the helper from the transactionService but not from the ServiceRegistry. In the last case you would change the settings for whoever calls for the instance.

      If this is the intended behaviour and there is a reason for this I think the API documentation for the serviceRegistry should be slightly improved to make this subtle but dangerous difference clear.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                iblanco Igor Blanco
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: