diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-08-06 09:43:12 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-08-06 09:43:12 +0000 |
| commit | c1dd3ceae904404af5e36bbddfd5a043e397fffe (patch) | |
| tree | b22222734b7722c974e9d83495755e2497ff2073 /qpid/java/broker/src/velocity | |
| parent | fff1166174f6b2aeb7ebfe14eee9007093423869 (diff) | |
| download | qpid-python-c1dd3ceae904404af5e36bbddfd5a043e397fffe.tar.gz | |
QPID-2002 : Completion of BrokerLoggingTest, the shutdown tests have been excluded due to QPID-2031. An update to the LogMessages.vm templates and ApplicationRegistry was requried. This is because BrokerMessages is loaded before the ApplicationRegistry is initialised. As a result the NullApplicationRegistry is created which should not be used. The AR is loaded to discover the current Locale. There were a couple of options here. Either always use the Default Locale and have the AR loading set that or add the ability to check if the AR has been configured. I chose the latter as knowing if an AR exists may be useful for our testing framework.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@801575 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker/src/velocity')
| -rw-r--r-- | qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm b/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm index 10be2299e9..e2fe7ec3c2 100644 --- a/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm +++ b/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm @@ -45,7 +45,21 @@ public class ${type.name}Messages static { - Locale currentLocale = ApplicationRegistry.getInstance().getConfiguration().getLocale(); + reload(); + } + + public static void reload() + { + Locale currentLocale; + + if (ApplicationRegistry.isConfigured()) + { + currentLocale = ApplicationRegistry.getInstance().getConfiguration().getLocale(); + } + else + { + currentLocale = Locale.getDefault(); + } _messages = ResourceBundle.getBundle("org.apache.qpid.server.logging.messages.LogMessages", currentLocale); @@ -54,6 +68,7 @@ public class ${type.name}Messages _formatter.setLocale(currentLocale); } + ## ## The list stored under key 'list' in the 'type' HashMap contains all the ## log messages that this class should contain. So for each entry in the list |
