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

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue Jan 8 07:11:43 EST 2008


    [ http://jira.jboss.com/jira/browse/JBTM-320?page=comments#action_12394119 ] 
            
Jonathan Halliday commented on JBTM-320:
----------------------------------------

Changed all calls in jtax to use jtaLogger.loggerI18N.getString() instead of jtaLogger.logMesg.getString().  Thus they lookup against the combined message properties bundle, not just the jta one. in trunk at r17616, still needs backporting to 4.2.3.SP.

> 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