You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/06/14 14:35:52 UTC
svn commit: r954432 [2/3] - in /qpid/trunk/qpid/java: ./
broker-plugins/experimental/slowconsumerdetection/ broker/
broker/src/main/java/org/apache/qpid/server/
broker/src/main/java/org/apache/qpid/server/binding/
broker/src/main/java/org/apache/qpid/s...
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,224 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+STARTUP = MNG-1001 : Startup
+# 0 - Service
+# 1 - Port
+LISTENING = MNG-1002 : Starting : {0} : Listening on port {1,number,#}
+# 0 - Service
+# 1 - Port
+SHUTTING_DOWN = MNG-1003 : Shuting down : {0} : port {1,number,#}
+READY = MNG-1004 : Ready
+STOPPED = MNG-1005 : Stopped
+# 0 - Path
+SSL_KEYSTORE = MNG-1006 : Using SSL Keystore : {0}
+OPEN = MNG-1007 : Open : User {0}
+CLOSE = MNG-1008 : Close
\ No newline at end of file
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,219 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+# 0 - name
+CREATED = MST-1001 : Created : {0}
+# 0 - path
+STORE_LOCATION = MST-1002 : Store location : {0}
+CLOSED = MST-1003 : Closed
+RECOVERY_START = MST-1004 : Recovery Start
+RECOVERED = MST-1005 : Recovered {0,number} messages
+RECOVERY_COMPLETE = MST-1006 : Recovery Complete
\ No newline at end of file
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Queue_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Queue_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Queue_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Queue_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,217 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+# 0 - owner
+# 1 - priority
+CREATED = QUE-1001 : Create :[ Owner: {0}][ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+DELETED = QUE-1002 : Deleted
+OVERFULL = QUE-1003 : Overfull : Size : {0,number} bytes, Capacity : {1,number}
+UNDERFULL = QUE-1004 : Underfull : Size : {0,number} bytes, Resume Capacity : {1,number}
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Subscription_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Subscription_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Subscription_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Subscription_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,215 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+CREATE = SUB-1001 : Create[ : Durable][ : Arguments : {0}]
+CLOSE = SUB-1002 : Close
+# 0 - The current subscription state
+STATE = SUB-1003 : State : {0}
\ No newline at end of file
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/TransactionLog_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/TransactionLog_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/TransactionLog_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/TransactionLog_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,223 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+# 0 - name
+CREATED = TXN-1001 : Created : {0}
+# 0 - path
+STORE_LOCATION = TXN-1002 : Store location : {0}
+CLOSED = TXN-1003 : Closed
+# 0 - queue name
+RECOVERY_START = TXN-1004 : Recovery Start[ : {0}]
+# 0 - count
+# 1 - queue count
+RECOVERED = TXN-1005 : Recovered {0,number} messages for queue {1}
+# 0 - queue name
+RECOVERY_COMPLETE = TXN-1006 : Recovery Complete[ : {0}]
Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties?rev=954432&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties Mon Jun 14 12:35:51 2010
@@ -0,0 +1,214 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Default File used for all non-defined locales.
+#
+# This file was derivied from LogMessages used within the Java Broker and
+# originally defined on the wiki:
+# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
+#
+# Technical Notes:
+# This is a standard Java Properties file so white space is respected at the
+# end of the lines. This file is processed in a number of ways.
+# 1) ResourceBundle
+# This file is loaded as a ResourceBundle. The en_US
+# addition to the file is the localisation. Additional localisations can be
+# provided and will automatically be selected based on the <locale> value in
+# the config.xml. The default is en_US.
+#
+# 2) MessasgeFormat
+# Each entry is prepared with the Java Core MessageFormat methods. Therefore
+# most functionality you can do via MessageFormat can be done here:
+#
+# http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
+#
+# The cavet here is that only default String and number FormatTypes can be used.
+# This is due to the processing described in 3 below. If support for date, time
+# or choice is required then the GenerateLogMessages class should be updated to
+# provide support.
+#
+# Format Note:
+# As mentioned earlier white space in this file is very important. One thing
+# in particular to note is the way MessageFormat performs its replacements.
+# The replacement text will totally replace the {xxx} section so there will be
+# no addition of white space or removal e.g.
+# MSG = Text----{0}----
+# When given parameter 'Hello' result in text:
+# Text----Hello----
+#
+# For simple arguments this is expected however when using Style formats then
+# it can be a little unexpected. In particular a common pattern is used for
+# number replacements : {0,number,#}. This is used in the Broker to display an
+# Integer simply as the Integer with no formatting. e.g new Integer(1234567)
+# becomes the String "1234567" which is can be contrasted with the pattern
+# without a style format field : {0,number} which becomes string "1,234,567".
+#
+# What you may not expect is that {0,number, #} would produce the String " 1234567"
+# note the space after the ',' here /\ has resulted in a space /\ in
+# the output.
+#
+# More details on the SubformatPattern can be found on the API link above.
+#
+# 3) GenerateLogMessage/Velocity Macro
+# This is the only processing that this file goes through.
+# 1) Class Generation:
+# The GenerateLogMessage processes this file and uses the velocity Macro
+# to create classes with static methods to perform the logging and give us
+# compile time validation.
+#
+# 2) Property Processing:
+# During the class generation the message properties ({x}) are identified
+# and used to create the method signature.
+#
+# 3) Option Processing:
+# The Classes perform final formatting of the messages at runtime based on
+# optional parameters that are defined within the message. Optional
+# parameters are enclosed in square brackets e.g. [optional].
+#
+# To provide fixed log messages as required by the Technical Specification:
+# http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages
+#
+# This file is processed by Velocity to create a number of classes that contain
+# static methods that provide LogMessages in the code to provide compile time
+# validation.
+#
+# For details of what processing is done see GenerateLogMessages.
+#
+# What a localiser or developer need know is the following:
+#
+# The Property structure is important as it defines how the class and methods
+# will be built.
+#
+# Class Generation:
+# =================
+#
+# Each class of messages will be split in to their own <Class>Messages.java.
+# Each logmessage file contains only one class of messages the <Class> name
+# is derived from the name of the logmessages file e.g. <Class>_logmessages.properties.
+#
+# Property Format
+# ===============
+# The property format MUST adhere to the follow format to make it easier to
+# use the logging API as a developer but also so that operations staff can
+# easily locate log messages in the output.
+#
+# The property file should contain entries in the following format
+#
+# <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
+#
+# eg:
+# SHUTTING_DOWN = BRK-1003 : Shutting down : {0} port {1,number,#}
+#
+# Note: the developer focused identifier will become a method name so only a
+# valid method name should be used. Currently only '-' are converted to '_'.
+#
+# That said properties generate the logging code at build time so any error
+# can be easily identified.
+#
+# The three character identifier show above in BRK-1003 should ideally be unique.
+# This is the only requirement, limiting to 3 characters is not required.
+# That said the current broker contains the following mappings.
+#
+# Class | Type
+# ---------------------|--------
+# Broker | BKR
+# ManagementConsole | MNG
+# VirtualHost | VHT
+# MessageStore | MST
+# ConfigStore | CFG
+# TransactionLog | TXN
+# Connection | CON
+# Channel | CHN
+# Queue | QUE
+# Exchange | EXH
+# Binding | BND
+# Subscription | SUB
+#
+#
+# Property Processing:
+# ====================
+#
+# Each property is then processed by the GenerateLogMessages class to identify
+# The number and type of parameters, {x} entries. Parameters are defaulted to
+# String types but the use of FormatType number (e.g.{0,number}) will result
+# in a Number type being used. These parameters are then used to build the
+# method parameter list. e.g:
+# Property:
+# SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
+# becomes Method:
+# public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+#
+# This improves our compile time validation of log message content and
+# ensures that change in the message format does not accidentally cause
+# erroneous messages.
+#
+# Option Processing:
+# ====================
+#
+# Options are identified in the log message as being surrounded by square
+# brackets ([ ]). These optional values can themselves contain parameters
+# however nesting of options is not permitted. Identification is performed on
+# first matching so given the message:
+# Msg = Log Message [option1] [option2]
+# Two options will be identified and enabled to select text 'option1' and
+# 'option2'.
+#
+# The nesting of a options is not supported and will provide
+# unexpected results. e.g. Using Message:
+# Msg = Log Message [option1 [sub-option2]]
+#
+# The options will be 'option1 [sub-option2' and 'sub-option2'. The first
+# option includes the second option as the nesting is not detected.
+#
+# The detected options are presented in the method signature as boolean options
+# numerically identified by their position in the message. e.g.
+# Property:
+# CON-1001 = Open : Client ID {0} [: Protocol Version : {1}]
+# becomes Method:
+# public static LogMessage CON_1001(String param1, String param2, boolean opt1)
+#
+# The value of 'opt1' will show/hide the option in the message. Note that
+# 'param2' is still required however a null value can be used if the optional
+# section is not desired.
+#
+# Again here the importance of white space needs to be highlighted.
+# Looking at the QUE-1001 message as an example. The first thought on how this
+# would look would be as follows:
+# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}]
+# Each option is correctly defined so the text that is defined will appear when
+# selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is
+# the white space. Using the above definition of QUE-1001 if we were to print
+# the message with only the Priority option displayed it would appear as this:
+# "Create : Owner: guest Priority: 1"
+# Note the spaces here /\ This is because only the text between the brackets
+# has been removed.
+#
+# Each option needs to include white space to correctly format the message. So
+# the correct definition of QUE-1001 is as follows:
+# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
+# Note that white space is included with each option and there is no extra
+# white space between the options. As a result the output with just Priority
+# enabled is as follows:
+# "Create : Owner: guest Priority: 1"
+#
+#
+# Default File used for all non-defined locales.
+
+# 0 - name
+CREATED = VHT-1001 : Created : {0}
+CLOSED = VHT-1002 : Closed
\ No newline at end of file
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java Mon Jun 14 12:35:51 2010
@@ -102,7 +102,7 @@ public class JMXManagedObjectRegistry im
public void start() throws IOException, ConfigurationException
{
- CurrentActor.get().message(ManagementConsoleMessages.MNG_STARTUP());
+ CurrentActor.get().message(ManagementConsoleMessages.STARTUP());
//check if system properties are set to use the JVM's out-of-the-box JMXAgent
if (areOutOfTheBoxJMXOptionsSet())
@@ -173,7 +173,7 @@ public class JMXManagedObjectRegistry im
_log.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath());
_startupLog.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath());
- CurrentActor.get().message(ManagementConsoleMessages.MNG_SSL_KEYSTORE(ksf.getAbsolutePath()));
+ CurrentActor.get().message(ManagementConsoleMessages.SSL_KEYSTORE(ksf.getAbsolutePath()));
}
//check the key store password is set
@@ -201,8 +201,8 @@ public class JMXManagedObjectRegistry im
_startupLog.warn("Starting JMX ConnectorServer on port '"+ port + "' (+" +
(port +PORT_EXPORT_OFFSET) + ") with SSL");
- CurrentActor.get().message(ManagementConsoleMessages.MNG_LISTENING("SSL RMI Registry", port));
- CurrentActor.get().message(ManagementConsoleMessages.MNG_LISTENING("SSL RMI ConnectorServer", port + PORT_EXPORT_OFFSET));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING("SSL RMI Registry", port));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING("SSL RMI ConnectorServer", port + PORT_EXPORT_OFFSET));
}
else
@@ -213,8 +213,8 @@ public class JMXManagedObjectRegistry im
_log.warn("Starting JMX ConnectorServer on port '" + port + "' (+" + (port +PORT_EXPORT_OFFSET) + ")");
_startupLog.warn("Starting JMX ConnectorServer on port '" + port + "' (+" + (port +PORT_EXPORT_OFFSET) + ")");
- CurrentActor.get().message(ManagementConsoleMessages.MNG_LISTENING("RMI Registry", port));
- CurrentActor.get().message(ManagementConsoleMessages.MNG_LISTENING("RMI ConnectorServer", port + PORT_EXPORT_OFFSET));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING("RMI Registry", port));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING("RMI ConnectorServer", port + PORT_EXPORT_OFFSET));
}
//add a JMXAuthenticator implementation the env map to authenticate the RMI based JMX connector server
@@ -329,7 +329,7 @@ public class JMXManagedObjectRegistry im
_cs.start();
- CurrentActor.get().message(ManagementConsoleMessages.MNG_READY());
+ CurrentActor.get().message(ManagementConsoleMessages.READY());
}
/*
@@ -410,7 +410,7 @@ public class JMXManagedObjectRegistry im
// Stopping the JMX ConnectorServer
try
{
- CurrentActor.get().message(ManagementConsoleMessages.MNG_SHUTTING_DOWN("RMI ConnectorServer", _cs.getAddress().getPort()));
+ CurrentActor.get().message(ManagementConsoleMessages.SHUTTING_DOWN("RMI ConnectorServer", _cs.getAddress().getPort()));
_cs.stop();
}
catch (IOException e)
@@ -422,7 +422,7 @@ public class JMXManagedObjectRegistry im
if (_rmiRegistry != null)
{
// Stopping the RMI registry
- CurrentActor.get().message(ManagementConsoleMessages.MNG_SHUTTING_DOWN("RMI Registry", _cs.getAddress().getPort() - PORT_EXPORT_OFFSET));
+ CurrentActor.get().message(ManagementConsoleMessages.SHUTTING_DOWN("RMI Registry", _cs.getAddress().getPort() - PORT_EXPORT_OFFSET));
try
{
UnicastRemoteObject.unexportObject(_rmiRegistry, false);
@@ -456,7 +456,7 @@ public class JMXManagedObjectRegistry im
}
}
- CurrentActor.get().message(ManagementConsoleMessages.MNG_STOPPED());
+ CurrentActor.get().message(ManagementConsoleMessages.STOPPED());
}
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java Mon Jun 14 12:35:51 2010
@@ -301,12 +301,12 @@ public class MBeanInvocationHandlerImpl
if (notification.getType().equals(JMXConnectionNotification.OPENED))
{
- _logActor.message(ManagementConsoleMessages.MNG_OPEN(user));
+ _logActor.message(ManagementConsoleMessages.OPEN(user));
}
else if (notification.getType().equals(JMXConnectionNotification.CLOSED) ||
notification.getType().equals(JMXConnectionNotification.FAILED))
{
- _logActor.message(ManagementConsoleMessages.MNG_CLOSE());
+ _logActor.message(ManagementConsoleMessages.CLOSE());
}
}
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java Mon Jun 14 12:35:51 2010
@@ -196,7 +196,7 @@ public class AMQProtocolEngine implement
_id = _configStore.createId();
- _actor.message(ConnectionMessages.CON_OPEN(null, null, false, false));
+ _actor.message(ConnectionMessages.OPEN(null, null, false, false));
}
@@ -347,7 +347,7 @@ public class AMQProtocolEngine implement
try
{
// Log incomming protocol negotiation request
- _actor.message(ConnectionMessages.CON_OPEN(null, pi._protocolMajor + "-" + pi._protocolMinor, false, true));
+ _actor.message(ConnectionMessages.OPEN(null, pi._protocolMajor + "-" + pi._protocolMinor, false, true));
ProtocolVersion pv = pi.checkVersion(); // Fails if not correct
@@ -746,7 +746,7 @@ public class AMQProtocolEngine implement
notifyAll();
}
_poolReference.releaseExecutorService();
- CurrentActor.get().message(_logSubject, ConnectionMessages.CON_CLOSE());
+ CurrentActor.get().message(_logSubject, ConnectionMessages.CLOSE());
}
}
else
@@ -866,7 +866,7 @@ public class AMQProtocolEngine implement
setContextKey(new AMQShortString(clientID));
// Log the Opening of the connection for this client
- _actor.message(ConnectionMessages.CON_OPEN(clientID, _protocolVersion.toString(), true, true));
+ _actor.message(ConnectionMessages.OPEN(clientID, _protocolVersion.toString(), true, true));
}
if (_clientProperties.getString(ClientProperties.version.toString()) != null)
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java Mon Jun 14 12:35:51 2010
@@ -25,9 +25,7 @@ import org.apache.qpid.AMQSecurityExcept
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.pool.ReadWriteRunnable;
import org.apache.qpid.pool.ReferenceCountingExecutorService;
-import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.server.AMQChannel;
-import org.apache.qpid.server.protocol.AMQConnectionModel;
import org.apache.qpid.server.protocol.AMQSessionModel;
import org.apache.qpid.server.binding.Binding;
import org.apache.qpid.server.configuration.ConfigStore;
@@ -256,7 +254,7 @@ public class SimpleAMQQueue implements A
// Log the creation of this Queue.
// The priorities display is toggled on if we set priorities > 0
CurrentActor.get().message(_logSubject,
- QueueMessages.QUE_CREATED(String.valueOf(_owner),
+ QueueMessages.CREATED(String.valueOf(_owner),
priorities,
_owner != null,
autoDelete,
@@ -1467,7 +1465,7 @@ public class SimpleAMQQueue implements A
stop();
//Log Queue Deletion
- CurrentActor.get().message(_logSubject, QueueMessages.QUE_DELETED());
+ CurrentActor.get().message(_logSubject, QueueMessages.DELETED());
}
return getMessageCount();
@@ -1490,7 +1488,7 @@ public class SimpleAMQQueue implements A
{
_overfull.set(true);
//Overfull log message
- _logActor.message(_logSubject, QueueMessages.QUE_OVERFULL(_atomicQueueSize.get(), _capacity));
+ _logActor.message(_logSubject, QueueMessages.OVERFULL(_atomicQueueSize.get(), _capacity));
if(_blockedChannels.putIfAbsent(channel, Boolean.TRUE)==null)
{
@@ -1501,7 +1499,7 @@ public class SimpleAMQQueue implements A
{
//Underfull log message
- _logActor.message(_logSubject, QueueMessages.QUE_UNDERFULL(_atomicQueueSize.get(), _flowResumeCapacity));
+ _logActor.message(_logSubject, QueueMessages.UNDERFULL(_atomicQueueSize.get(), _flowResumeCapacity));
channel.unblock(this);
_blockedChannels.remove(channel);
@@ -1523,7 +1521,7 @@ public class SimpleAMQQueue implements A
{
if(_overfull.compareAndSet(true,false))
{//Underfull log message
- _logActor.message(_logSubject, QueueMessages.QUE_UNDERFULL(_atomicQueueSize.get(), _flowResumeCapacity));
+ _logActor.message(_logSubject, QueueMessages.UNDERFULL(_atomicQueueSize.get(), _flowResumeCapacity));
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java Mon Jun 14 12:35:51 2010
@@ -259,7 +259,7 @@ public abstract class ApplicationRegistr
_qmfService = new QMFService(getConfigStore(), this);
- CurrentActor.get().message(BrokerMessages.BRK_STARTUP(QpidProperties.getReleaseVersion(), QpidProperties.getBuildVersion()));
+ CurrentActor.get().message(BrokerMessages.STARTUP(QpidProperties.getReleaseVersion(), QpidProperties.getBuildVersion()));
initialiseManagedObjectRegistry();
@@ -367,7 +367,7 @@ public abstract class ApplicationRegistr
close(_pluginManager);
- CurrentActor.get().message(BrokerMessages.BRK_STOPPED());
+ CurrentActor.get().message(BrokerMessages.STOPPED());
}
private void unbind()
@@ -387,7 +387,7 @@ public abstract class ApplicationRegistr
_logger.error("Unable to close network driver due to:" + e.getMessage());
}
- CurrentActor.get().message(BrokerMessages.BRK_SHUTTING_DOWN(acceptor.toString(), bindAddress.getPort()));
+ CurrentActor.get().message(BrokerMessages.SHUTTING_DOWN(acceptor.toString(), bindAddress.getPort()));
}
}
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMessageStore.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMessageStore.java Mon Jun 14 12:35:51 2010
@@ -21,7 +21,6 @@
package org.apache.qpid.server.store;
import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.logging.messages.MessageStoreMessages;
import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
@@ -34,11 +33,11 @@ public abstract class AbstractMessageSto
public void configure(VirtualHost virtualHost) throws Exception
{
_logSubject = new MessageStoreLogSubject(virtualHost, this);
- CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_CREATED(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, MessageStoreMessages.CREATED(this.getClass().getName()));
}
public void close() throws Exception
{
- CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_CLOSED());
+ CurrentActor.get().message(_logSubject,MessageStoreMessages.CLOSED());
}
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java Mon Jun 14 12:35:51 2010
@@ -152,7 +152,7 @@ public class DerbyMessageStore implement
{
stateTransition(State.INITIAL, State.CONFIGURING);
_logSubject = logSubject;
- CurrentActor.get().message(_logSubject, ConfigStoreMessages.CFG_1001(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, ConfigStoreMessages.CREATED(this.getClass().getName()));
if(!_configured)
{
@@ -174,7 +174,7 @@ public class DerbyMessageStore implement
Configuration storeConfiguration,
LogSubject logSubject) throws Exception
{
- CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_CREATED(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, MessageStoreMessages.CREATED(this.getClass().getName()));
if(!_configured)
{
@@ -196,7 +196,7 @@ public class DerbyMessageStore implement
Configuration storeConfiguration,
LogSubject logSubject) throws Exception
{
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1001(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.CREATED(this.getClass().getName()));
if(!_configured)
{
@@ -232,7 +232,7 @@ public class DerbyMessageStore implement
}
}
- CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_STORE_LOCATION(environmentPath.getAbsolutePath()));
+ CurrentActor.get().message(_logSubject, MessageStoreMessages.STORE_LOCATION(environmentPath.getAbsolutePath()));
createOrOpenDatabase(name, databasePath);
}
@@ -370,7 +370,7 @@ public class DerbyMessageStore implement
{
stateTransition(State.CONFIGURING, State.RECOVERING);
- CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_RECOVERY_START());
+ CurrentActor.get().message(_logSubject,MessageStoreMessages.RECOVERY_START());
try
{
@@ -517,7 +517,7 @@ public class DerbyMessageStore implement
public void close() throws Exception
{
- CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_CLOSED());
+ CurrentActor.get().message(_logSubject,MessageStoreMessages.CLOSED());
_closed.getAndSet(true);
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java Mon Jun 14 12:35:51 2010
@@ -24,25 +24,17 @@ import org.apache.log4j.Logger;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.framing.abstraction.ContentChunk;
-import org.apache.qpid.server.message.MessageMetaData;
import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.logging.LogSubject;
import org.apache.qpid.server.logging.messages.MessageStoreMessages;
import org.apache.qpid.server.logging.messages.ConfigStoreMessages;
import org.apache.qpid.server.logging.actors.CurrentActor;
-import org.apache.qpid.server.message.ServerMessage;
import org.apache.commons.configuration.Configuration;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
-import java.nio.ByteBuffer;
/** A simple message store that stores the messages in a threadsafe structure in memory. */
public class MemoryMessageStore implements MessageStore
@@ -86,7 +78,7 @@ public class MemoryMessageStore implemen
public void configureConfigStore(String name, ConfigurationRecoveryHandler handler, Configuration configuration, LogSubject logSubject) throws Exception
{
_logSubject = logSubject;
- CurrentActor.get().message(_logSubject, ConfigStoreMessages.CFG_1001(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, ConfigStoreMessages.CREATED(this.getClass().getName()));
}
@@ -102,13 +94,13 @@ public class MemoryMessageStore implemen
}
int hashtableCapacity = config.getInt(name + "." + HASHTABLE_CAPACITY_CONFIG, DEFAULT_HASHTABLE_CAPACITY);
_log.info("Using capacity " + hashtableCapacity + " for hash tables");
- CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_CREATED(this.getClass().getName()));
+ CurrentActor.get().message(_logSubject, MessageStoreMessages.CREATED(this.getClass().getName()));
}
public void close() throws Exception
{
_closed.getAndSet(true);
- CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_CLOSED());
+ CurrentActor.get().message(_logSubject,MessageStoreMessages.CLOSED());
}
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java Mon Jun 14 12:35:51 2010
@@ -392,7 +392,7 @@ public abstract class SubscriptionImpl i
CurrentActor.get().
message(_logSubject,
- SubscriptionMessages.SUB_CREATE(filterLogString,
+ SubscriptionMessages.CREATE(filterLogString,
queue.isDurable() && exclusive,
filterLogString != null));
}
@@ -535,7 +535,7 @@ public abstract class SubscriptionImpl i
getConfigStore().removeConfiguredObject(this);
//Log Subscription closed
- CurrentActor.get().message(_logSubject, SubscriptionMessages.SUB_CLOSE());
+ CurrentActor.get().message(_logSubject, SubscriptionMessages.CLOSE());
}
public boolean isClosed()
@@ -623,7 +623,7 @@ public abstract class SubscriptionImpl i
_stateListener.stateChange(this, State.ACTIVE, State.SUSPENDED);
}
}
- CurrentActor.get().message(_logSubject,SubscriptionMessages.SUB_STATE(_state.get().toString()));
+ CurrentActor.get().message(_logSubject,SubscriptionMessages.STATE(_state.get().toString()));
}
public State getState()
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java?rev=954432&r1=954431&r2=954432&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java Mon Jun 14 12:35:51 2010
@@ -87,7 +87,7 @@ public class VirtualHostConfigRecoveryHa
{
_logSubject = new MessageStoreLogSubject(_virtualHost,store);
_store = store;
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1004(null, false));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.RECOVERY_START(null, false));
return this;
}
@@ -107,7 +107,7 @@ public class VirtualHostConfigRecoveryHa
_virtualHost.getQueueRegistry().registerQueue(q);
}
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1004(queueName, true));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.RECOVERY_START(queueName, true));
//Record that we have a queue for recovery
_queueRecoveries.put(queueName, 0);
@@ -348,12 +348,12 @@ public class VirtualHostConfigRecoveryHa
for(Map.Entry<String,Integer> entry : _queueRecoveries.entrySet())
{
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1005(entry.getValue(), entry.getKey()));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.RECOVERED(entry.getValue(), entry.getKey()));
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1006(entry.getKey(), true));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.RECOVERY_COMPLETE(entry.getKey(), true));
}
- CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1006(null, false));
+ CurrentActor.get().message(_logSubject, TransactionLogMessages.RECOVERY_COMPLETE(null, false));
}
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org