This commit fixes the following things:
- Moves connection audit logging to the resource audit logger instead
of using a dedicated logger as that would adversely impact upgrading
users, and arguably didn't make sense in the first place.
- Mitigates an potential NPE w.r.t. connection ID.
- Updates the "dummy" management connection to return a valid
connection ID.
Previously, the code added a comment with the host name in it.
Sometimes hostnames don't follow the xml standards for comments.
Specifically, having a double dash ("--") in the host name would cause
an error when jolokia tried to load the config file - because it was
invalid xml.
The simple solution was to not put the host name into the comment.
A unit test has been included to ensure the same thing doesn't happen in the
future.
Signed-off-by: David Lanouette <David.Lanouette@RedHat.com>
- From now on we will save snapshots of page-counters on the journal (basically for compatibility with previous verions).
And we will recount the records on startup.
- While the rebuild is being done the value from the previous snapshot is still available with current updates.
CLI commands which only use a JMS connection (e.g. producer and
consumer) will retry successfully when omitting or specifying the
incorrect user and/or password. However, commands which use the core API
directly will not.
Attempt to standardize all Logger declaration to a singular variable name
which makes the code more consistent and make finding usages of loggers in
the code a bit easier.
Logger statements should use formatting syntax and let the normal framework checks take care of
checking if a logger is enabled instead of string concats and isXEnabled logger checks except
in cases there is known expense to the specifc logging message/arg preparation or passing.
Changes from myself and Robbie Gemmell.
Co-authored-by: Robbie Gemmell <robbie@apache.org>
Before we moved to Java 11 we recommended using the -XX:+AggressiveOpts
JVM tuning option. In Java 8 this was essentially equivalent to setting
these two main parameters:
- -XX:BiasedLockingStartupDelay=500 (4000 by default)
- -XX:AutoBoxCacheMax=20000 (128 by default)
BiasedLockingStartupDelay defaults to 0 in Java 11, but AutoBoxCacheMax
still defaults to 128. Therefore, we should add
-XX:AutoBoxCacheMax=20000 to restore this optimization that's been lost
since removing -XX:+AggressiveOpts.
By allowing to pass caller's classname directly to org.apache.activemq.artemis.utils.ActiveMQThreadFactory#defaultThreadFactory instead of calculating it from stack.