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

jta/jtax cross-package logging broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.2.3.SP6, 4.3.0.BETA2
    • Fix Version/s: 4.2.3.SP8, 4.3.0.GA
    • Component/s: JTS
    • Labels:
      None

      Description

      Some classes in jtax i.e. the JTS based JTA implementation, use logging support from the jta rather than jtax pakage. This is the only instance of cross-package logging in the codebase.

      This is supported by the LoggerSetup helper class, which merges the jtax log messages properties file into the jta logger using addResourceBundle.

      That means that jtax code can call e.g.
      jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.jts.syncproblem");
      and the message key will get resolved correctly.

      jtaLogger.logger.* is not internationalized i.e. does not use resource bundles, so it's fine too.

      The problem comes with jtax code's use of e.g.
      jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.jts.subordinate.invalidstate")
      as is found in many new Exception(...) type statements and elsewhere.

      Since this code bypasses the loggerI18N and goes direct to the un-merged message bundle, it can resolve only jta keys, not jtax ones. Because it's used mostly in exception handlers, the problem goes unnoticed until something breaks, at which point you fail to get a useful error message.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jhalliday Jonathan Halliday
                Reporter:
                jhalliday Jonathan Halliday
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: