Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3990

Do not log problems and and then throw exceptions

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.3.0.Final
    • 7.2.1.Final
    • Transaction Core
    • None
    • Hide
      A new config property to suppress logging a problem if the code is about to throw an exception back to the caller relying on them to do the logging.

      The new behaviour can be enabled by setting a config property (CoreEnvironmentBean.logAndRethrow) to false otherwise the existing behaviour will be maintained. The default is true so the existing behaviour is maintained. The message ids affected by the change are as follows:

      jdbcI18NLogger.java (projectCode: ARJUNA)
      17043
      17043
      17040
      17041

      arjunaI18NLogger.java (projectCode = ARJUNA)
      12031
      12049
      12125
      12128
      12041
      12411
      12250
      12257
      12244
      12260
      12387
      Note that the following three codes are still logged and then thrown
      message id 12049 is logged
      message id 12168 is logged
      message id 12342 is logged

      jtaI18NLogger.java (projectCode = "ARJUNA")
      16116
      16122
      16124
      16126
      16138
      16120
      16045
      16039
      16061
      16089
      16129
      16085
      16137
      16139

      jtaxI18NLogger.java (projectCode = "ARJUNA")
      24015
      24023
      24068
      24064
      22110
      22109
      22008
      22267
      22025
      22043
      22038
      22044
      22042
      22125
      22234
      22267
      22243
      22096
      22094
      22095
      22267
      22099
      22101
      22102
      22105
      22249

      orbportabilityI18NLogger.java (projectCode = "ARJUNA")
      21003
      21001
      21005
      21017
      21015
      21018
      21032

      atI18NLogger.java (RESTATLogger) (projectCode = "AT")
      27003 (warn_failedToStartBridge)
      27004 (warn_failedToStopBridge)
      27005 (warn_failedToEnlistTransaction)
      27006 (warn_failedToImportTransaction)
      27011 (warn_subordinateCommitXAException)
      27010 (warn_subordinateRollbackXAException)

      txbridgeI18NLogger.java (projectCode = "ARJUNA")
      33001
      33002
      Show
      A new config property to suppress logging a problem if the code is about to throw an exception back to the caller relying on them to do the logging. The new behaviour can be enabled by setting a config property (CoreEnvironmentBean.logAndRethrow) to false otherwise the existing behaviour will be maintained. The default is true so the existing behaviour is maintained. The message ids affected by the change are as follows: jdbcI18NLogger.java (projectCode: ARJUNA) 17043 17043 17040 17041 arjunaI18NLogger.java (projectCode = ARJUNA) 12031 12049 12125 12128 12041 12411 12250 12257 12244 12260 12387 Note that the following three codes are still logged and then thrown message id 12049 is logged message id 12168 is logged message id 12342 is logged jtaI18NLogger.java (projectCode = "ARJUNA") 16116 16122 16124 16126 16138 16120 16045 16039 16061 16089 16129 16085 16137 16139 jtaxI18NLogger.java (projectCode = "ARJUNA") 24015 24023 24068 24064 22110 22109 22008 22267 22025 22043 22038 22044 22042 22125 22234 22267 22243 22096 22094 22095 22267 22099 22101 22102 22105 22249 orbportabilityI18NLogger.java (projectCode = "ARJUNA") 21003 21001 21005 21017 21015 21018 21032 atI18NLogger.java (RESTATLogger) (projectCode = "AT") 27003 (warn_failedToStartBridge) 27004 (warn_failedToStopBridge) 27005 (warn_failedToEnlistTransaction) 27006 (warn_failedToImportTransaction) 27011 (warn_subordinateCommitXAException) 27010 (warn_subordinateRollbackXAException) txbridgeI18NLogger.java (projectCode = "ARJUNA") 33001 33002

      We had a report about Message "ARJUNA012125" implementing log-and-throw antipattern.

      The proposed fix is to provide a config property such that problems are no longer logged if the code is about to throw an exception back to the caller relying on them to do the logging instead.

      There have been other reports of excessive logging so resolving this issue seems to align with the needs of the projects users.

              rhn-engineering-mmusgrov Michael Musgrove
              rhn-engineering-mmusgrov Michael Musgrove
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: