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

jta/jtax cross-package logging broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.3.SP8, 4.3.0.GA
    • 4.2.3.SP6, 4.3.0.BETA2
    • JTS
    • None

      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.

              rhn-engineering-jhallida Jonathan Halliday
              rhn-engineering-jhallida Jonathan Halliday
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: