[jbossts-issues] [JBoss JIRA] Created: (JBTM-320) jta/jtax cross-package logging broken

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Mon Jan 7 11:40:44 EST 2008


jta/jtax cross-package logging broken
-------------------------------------

                 Key: JBTM-320
                 URL: http://jira.jboss.com/jira/browse/JBTM-320
             Project: JBoss Transaction Manager
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JTS Implementation
    Affects Versions: 4.3.0.BETA2, 4.2.3.SP6
            Reporter: Jonathan Halliday
         Assigned To: Jonathan Halliday
             Fix For: 4.2.3.SP8, 4.3.0.BETA3


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossts-issues mailing list