You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/10/11 15:28:54 UTC

[1/4] activemq-artemis git commit: ARTEMIS-2121 reload logging config at runtime

Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 6333c2d0a -> 5cc6f7e9e


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java
index c0a7702..d10ede8 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java
@@ -23,11 +23,6 @@ import org.apache.activemq.artemis.jms.client.ConnectionFactoryOptions;
 
 public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
 
-   /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
    private boolean hasBeenUpdated = false;
 
    /**
@@ -181,14 +176,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public String getConnectionLoadBalancingPolicyClassName() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getConnectionLoadBalancingPolicyClassName()");
       }
       return connectionLoadBalancingPolicyClassName;
    }
 
    public void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + connectionLoadBalancingPolicyClassName + ")");
       }
       hasBeenUpdated = true;
@@ -196,14 +191,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public String getDiscoveryAddress() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDiscoveryAddress()");
       }
       return discoveryAddress;
    }
 
    public void setDiscoveryAddress(final String discoveryAddress) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDiscoveryAddress(" + discoveryAddress + ")");
       }
       hasBeenUpdated = true;
@@ -211,14 +206,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getDiscoveryPort() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDiscoveryPort()");
       }
       return discoveryPort;
    }
 
    public void setDiscoveryLocalBindAddress(final String discoveryLocalBindAddress) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")");
       }
       hasBeenUpdated = true;
@@ -226,14 +221,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public String getDiscoveryLocalBindAddress() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDiscoveryLocalBindAddress()");
       }
       return discoveryLocalBindAddress;
    }
 
    public void setDiscoveryPort(final Integer discoveryPort) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDiscoveryPort(" + discoveryPort + ")");
       }
       hasBeenUpdated = true;
@@ -241,14 +236,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getDiscoveryRefreshTimeout() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDiscoveryRefreshTimeout()");
       }
       return discoveryRefreshTimeout;
    }
 
    public void setDiscoveryRefreshTimeout(final Long discoveryRefreshTimeout) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
       }
       hasBeenUpdated = true;
@@ -256,14 +251,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getDiscoveryInitialWaitTimeout() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDiscoveryInitialWaitTimeout()");
       }
       return discoveryInitialWaitTimeout;
    }
 
    public void setDiscoveryInitialWaitTimeout(final Long discoveryInitialWaitTimeout) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
       }
       hasBeenUpdated = true;
@@ -271,14 +266,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public String getClientID() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getClientID()");
       }
       return clientID;
    }
 
    public void setClientID(final String clientID) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setClientID(" + clientID + ")");
       }
       hasBeenUpdated = true;
@@ -286,14 +281,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getDupsOKBatchSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDupsOKBatchSize()");
       }
       return dupsOKBatchSize;
    }
 
    public void setDupsOKBatchSize(final Integer dupsOKBatchSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
       }
       hasBeenUpdated = true;
@@ -301,14 +296,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getTransactionBatchSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTransactionBatchSize()");
       }
       return transactionBatchSize;
    }
 
    public void setTransactionBatchSize(final Integer transactionBatchSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
       }
       hasBeenUpdated = true;
@@ -316,14 +311,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getClientFailureCheckPeriod() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getClientFailureCheckPeriod()");
       }
       return clientFailureCheckPeriod;
    }
 
    public void setClientFailureCheckPeriod(final Long clientFailureCheckPeriod) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")");
       }
       hasBeenUpdated = true;
@@ -331,14 +326,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getConnectionTTL() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getConnectionTTL()");
       }
       return connectionTTL;
    }
 
    public void setConnectionTTL(final Long connectionTTL) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setConnectionTTL(" + connectionTTL + ")");
       }
       hasBeenUpdated = true;
@@ -346,14 +341,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getCallTimeout() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getCallTimeout()");
       }
       return callTimeout;
    }
 
    public void setCallTimeout(final Long callTimeout) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setCallTimeout(" + callTimeout + ")");
       }
       hasBeenUpdated = true;
@@ -361,14 +356,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getCallFailoverTimeout() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getCallFailoverTimeout()");
       }
       return callFailoverTimeout;
    }
 
    public void setCallFailoverTimeout(final Long callFailoverTimeout) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")");
       }
       hasBeenUpdated = true;
@@ -376,14 +371,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getConsumerWindowSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getConsumerWindowSize()");
       }
       return consumerWindowSize;
    }
 
    public void setConsumerWindowSize(final Integer consumerWindowSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
       }
       hasBeenUpdated = true;
@@ -391,14 +386,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getConsumerMaxRate() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getConsumerMaxRate()");
       }
       return consumerMaxRate;
    }
 
    public void setConsumerMaxRate(final Integer consumerMaxRate) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
       }
       hasBeenUpdated = true;
@@ -406,14 +401,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getConfirmationWindowSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getConfirmationWindowSize()");
       }
       return confirmationWindowSize;
    }
 
    public void setConfirmationWindowSize(final Integer confirmationWindowSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")");
       }
       hasBeenUpdated = true;
@@ -430,14 +425,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getProducerMaxRate() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getProducerMaxRate()");
       }
       return producerMaxRate;
    }
 
    public void setProducerMaxRate(final Integer producerMaxRate) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setProducerMaxRate(" + producerMaxRate + ")");
       }
       hasBeenUpdated = true;
@@ -445,14 +440,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getProducerWindowSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getProducerWindowSize()");
       }
       return producerWindowSize;
    }
 
    public void setProducerWindowSize(final Integer producerWindowSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setProducerWindowSize(" + producerWindowSize + ")");
       }
       hasBeenUpdated = true;
@@ -460,14 +455,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getMinLargeMessageSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMinLargeMessageSize()");
       }
       return minLargeMessageSize;
    }
 
    public void setMinLargeMessageSize(final Integer minLargeMessageSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
       }
       hasBeenUpdated = true;
@@ -475,14 +470,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isBlockOnAcknowledge() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isBlockOnAcknowledge()");
       }
       return blockOnAcknowledge;
    }
 
    public void setBlockOnAcknowledge(final Boolean blockOnAcknowledge) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
       }
       hasBeenUpdated = true;
@@ -490,14 +485,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isBlockOnNonDurableSend() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isBlockOnNonDurableSend()");
       }
       return blockOnNonDurableSend;
    }
 
    public void setBlockOnNonDurableSend(final Boolean blockOnNonDurableSend) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")");
       }
       hasBeenUpdated = true;
@@ -505,14 +500,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isBlockOnDurableSend() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isBlockOnDurableSend()");
       }
       return blockOnDurableSend;
    }
 
    public void setBlockOnDurableSend(final Boolean blockOnDurableSend) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")");
       }
       hasBeenUpdated = true;
@@ -520,14 +515,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isAutoGroup() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isAutoGroup()");
       }
       return autoGroup;
    }
 
    public void setAutoGroup(final Boolean autoGroup) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setAutoGroup(" + autoGroup + ")");
       }
       hasBeenUpdated = true;
@@ -535,14 +530,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isPreAcknowledge() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isPreAcknowledge()");
       }
       return preAcknowledge;
    }
 
    public void setPreAcknowledge(final Boolean preAcknowledge) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPreAcknowledge(" + preAcknowledge + ")");
       }
       hasBeenUpdated = true;
@@ -550,14 +545,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Long getRetryInterval() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getRetryInterval()");
       }
       return retryInterval;
    }
 
    public void setRetryInterval(final Long retryInterval) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setRetryInterval(" + retryInterval + ")");
       }
       hasBeenUpdated = true;
@@ -565,14 +560,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Double getRetryIntervalMultiplier() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getRetryIntervalMultiplier()");
       }
       return retryIntervalMultiplier;
    }
 
    public void setRetryIntervalMultiplier(final Double retryIntervalMultiplier) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
       }
       hasBeenUpdated = true;
@@ -589,14 +584,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getReconnectAttempts() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getReconnectAttempts()");
       }
       return reconnectAttempts;
    }
 
    public void setReconnectAttempts(final Integer reconnectAttempts) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setReconnectAttempts(" + reconnectAttempts + ")");
       }
       hasBeenUpdated = true;
@@ -604,14 +599,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isUseGlobalPools() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isUseGlobalPools()");
       }
       return useGlobalPools;
    }
 
    public void setUseGlobalPools(final Boolean useGlobalPools) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUseGlobalPools(" + useGlobalPools + ")");
       }
       hasBeenUpdated = true;
@@ -619,14 +614,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isCacheDestinations() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isCacheDestinations()");
       }
       return cacheDestinations;
    }
 
    public void setCacheDestinations(final Boolean cacheDestinations) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setCacheDestinations(" + cacheDestinations + ")");
       }
       hasBeenUpdated = true;
@@ -634,14 +629,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Boolean isEnable1xPrefixes() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isEnable1xPrefixes()");
       }
       return enable1xPrefixes;
    }
 
    public void setEnable1xPrefixes(final Boolean enable1xPrefixes) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setEnable1xPrefixes(" + enable1xPrefixes + ")");
       }
       hasBeenUpdated = true;
@@ -649,14 +644,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getScheduledThreadPoolMaxSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getScheduledThreadPoolMaxSize()");
       }
       return scheduledThreadPoolMaxSize;
    }
 
    public void setScheduledThreadPoolMaxSize(final Integer scheduledThreadPoolMaxSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setScheduledThreadPoolMaxSize(" + scheduledThreadPoolMaxSize + ")");
       }
       hasBeenUpdated = true;
@@ -664,14 +659,14 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
    }
 
    public Integer getThreadPoolMaxSize() {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getThreadPoolMaxSize()");
       }
       return threadPoolMaxSize;
    }
 
    public void setThreadPoolMaxSize(final Integer threadPoolMaxSize) {
-      if (ConnectionFactoryProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setThreadPoolMaxSize(" + threadPoolMaxSize + ")");
       }
       hasBeenUpdated = true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-server/pom.xml b/artemis-server/pom.xml
index 7e7c162..f24731b 100644
--- a/artemis-server/pom.xml
+++ b/artemis-server/pom.xml
@@ -51,7 +51,6 @@
       <dependency>
          <groupId>org.jboss.logmanager</groupId>
          <artifactId>jboss-logmanager</artifactId>
-         <scope>test</scope>
       </dependency>
       <dependency>
          <groupId>org.apache.activemq</groupId>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 16dc972..755aeb7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -329,7 +329,7 @@ public interface ActiveMQServerLogger extends BasicLogger {
    void removingBackupData(String path);
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 221056, value = "Reloading configuration ...{0}",
+   @Message(id = 221056, value = "Reloading configuration: {0}",
       format = Message.Format.MESSAGE_FORMAT)
    void reloadingConfiguration(String module);
 
@@ -1603,6 +1603,16 @@ public interface ActiveMQServerLogger extends BasicLogger {
       format = Message.Format.MESSAGE_FORMAT)
    void problemDeployingQueue(String queueName, String message);
 
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 222276, value = "Failed to process changes to the logging configuration file: {0}",
+      format = Message.Format.MESSAGE_FORMAT)
+   void loggingReloadFailed(String configFile, @Cause Exception e);
+
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 222277, value = "Problem initializing automatic logging configuration reload for {0}",
+      format = Message.Format.MESSAGE_FORMAT)
+   void problemAddingConfigReloadCallback(String propertyName, @Cause Exception e);
+
    @LogMessage(level = Logger.Level.ERROR)
    @Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
    void initializationError(@Cause Throwable e);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationFileReloader.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationFileReloader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationFileReloader.java
new file mode 100644
index 0000000..26fdf29
--- /dev/null
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationFileReloader.java
@@ -0,0 +1,86 @@
+/**
+ * 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.
+ */
+
+package org.apache.activemq.artemis.core.server;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.activemq.artemis.core.server.reload.ReloadCallback;
+import org.jboss.logmanager.Configurator;
+import org.jboss.logmanager.LogContext;
+import org.jboss.logmanager.PropertyConfigurator;
+import org.jboss.logmanager.config.LogContextConfiguration;
+
+public class LoggingConfigurationFileReloader implements ReloadCallback {
+
+   private final Lock lock = new ReentrantLock();
+   private final org.jboss.logmanager.Logger.AttachmentKey<LoggingConfigurationUpdater> KEY = new org.jboss.logmanager.Logger.AttachmentKey<>();
+
+   @Override
+   public void reload(URL uri) throws Exception {
+      ActiveMQServerLogger.LOGGER.reloadingConfiguration("logging");
+      final LoggingConfigurationUpdater updater = getOrCreateUpdater();
+      if (updater == null) {
+         ActiveMQServerLogger.LOGGER.loggingReloadFailed(uri.toString(), null);
+         return;
+      }
+      try (InputStream in = uri.openStream()) {
+         lock.lock();
+         updater.configure(in);
+      } catch (Exception e) {
+         ActiveMQServerLogger.LOGGER.loggingReloadFailed(uri.toString(), e);
+      } finally {
+         lock.unlock();
+      }
+   }
+
+   private LoggingConfigurationUpdater getOrCreateUpdater() {
+      final LogContext logContext = LogContext.getLogContext();
+      final org.jboss.logmanager.Logger rootLogger = logContext.getLogger("");
+      LoggingConfigurationUpdater updater = rootLogger.getAttachment(KEY);
+      if (updater == null) {
+         final LogContextConfiguration logContextConfiguration = getOrCreateConfiguration(rootLogger);
+         if (logContextConfiguration == null) {
+            return null;
+         }
+         updater = new LoggingConfigurationUpdater(logContextConfiguration);
+         final LoggingConfigurationUpdater appearing = rootLogger.attachIfAbsent(KEY, updater);
+         if (appearing != null) {
+            updater = appearing;
+         }
+      }
+      return updater;
+   }
+
+   private LogContextConfiguration getOrCreateConfiguration(final org.jboss.logmanager.Logger rootLogger) {
+      Configurator configurator = rootLogger.getAttachment(Configurator.ATTACHMENT_KEY);
+      if (configurator == null) {
+         configurator = new PropertyConfigurator(rootLogger.getLogContext());
+         final Configurator appearing = rootLogger.attachIfAbsent(Configurator.ATTACHMENT_KEY, configurator);
+         if (appearing != null) {
+            configurator = appearing;
+         }
+      }
+      if (configurator instanceof PropertyConfigurator) {
+         return ((PropertyConfigurator) configurator).getLogContextConfiguration();
+      }
+      return null;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationUpdater.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationUpdater.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationUpdater.java
new file mode 100644
index 0000000..f8be8e9
--- /dev/null
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LoggingConfigurationUpdater.java
@@ -0,0 +1,447 @@
+/*
+ * 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.
+ */
+
+package org.apache.activemq.artemis.core.server;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import org.jboss.logmanager.config.ErrorManagerConfiguration;
+import org.jboss.logmanager.config.FilterConfiguration;
+import org.jboss.logmanager.config.FormatterConfiguration;
+import org.jboss.logmanager.config.HandlerConfiguration;
+import org.jboss.logmanager.config.HandlerContainingConfigurable;
+import org.jboss.logmanager.config.LogContextConfiguration;
+import org.jboss.logmanager.config.LoggerConfiguration;
+import org.jboss.logmanager.config.PojoConfiguration;
+import org.jboss.logmanager.config.PropertyConfigurable;
+import org.jboss.logmanager.config.ValueExpression;
+
+public class LoggingConfigurationUpdater {
+
+   private static final String[] EMPTY_STRINGS = new String[0];
+   private static final Pattern EXPRESSION_PATTERN = Pattern.compile(".*\\$\\{.*\\}.*");
+   private static final String LOGGERS = "loggers";
+   private static final String HANDLERS = "handlers";
+   private static final String FILTERS = "filters";
+   private static final String FORMATTERS = "formatters";
+   private static final String ERROR_MANAGERS = "errorManagers";
+   private static final String POJOS = "pojos";
+   private static final String LOGGER = "logger";
+   private static final String LEVEL = "level";
+   private static final String HANDLER = "handler";
+   private static final String FORMATTER = "formatter";
+   private static final String ENCODING = "encoding";
+   private static final String ERROR_MANAGER = "errorManager";
+   private static final String POST_CONFIGURATION = "postConfiguration";
+   private static final String POJO = "pojo";
+   private static final String MODULE = "module";
+   private static final String PROPERTIES = "properties";
+   private static final String FILTER = "filter";
+   private static final String CONSTRUCTOR_PROPERTIES = "constructorProperties";
+   private static final String USE_PARENT_HANDLERS = "useParentHandlers";
+
+   private final LogContextConfiguration config;
+
+   public LoggingConfigurationUpdater(final LogContextConfiguration config) {
+      this.config = config;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void configure(final InputStream inputStream) throws IOException {
+      final Properties properties = new Properties();
+      try {
+         properties.load(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
+         inputStream.close();
+      } finally {
+         safeClose(inputStream);
+      }
+      configure(properties);
+   }
+
+   /**
+    * Configure the log manager from the given properties.
+    * <p/>
+    * The following values read in from a configuration will be trimmed of prefixed and trailing whitespace:
+    * <pre>
+    *     <ul>
+    *         <li>logger.NAME.filter</li>
+    *         <li>logger.NAME.level</li>
+    *         <li>logger.NAME.useParentHandlers</li>
+    *         <li>handler.NAME.filter</li>
+    *         <li>handler.NAME.formatter</li>
+    *         <li>handler.NAME.level</li>
+    *         <li>handler.NAME.encoding</li>
+    *         <li>handler.NAME.errorManager</li>
+    *     </ul>
+    * </pre>
+    *
+    * @param properties the properties
+    */
+   private void configure(final Properties properties) {
+      try {
+         final Collection<String> handlersToRemove = config.getHandlerNames();
+         // Start with the list of loggers to configure.  The root logger is always on the list.
+         handlersToRemove.removeAll(configureLogger(properties, ""));
+
+         // And, for each logger name, configure any filters, handlers, etc.
+         final String[] loggerNames = getStringCsvArray(properties, LOGGERS);
+         for (String loggerName : loggerNames) {
+            handlersToRemove.removeAll(configureLogger(properties, loggerName));
+         }
+         // Remove any loggers that are not longer required
+         final Collection<String> loggersToRemove = config.getLoggerNames();
+         loggersToRemove.remove("");
+         loggersToRemove.removeAll(Arrays.asList(loggerNames));
+         for (String loggerName : loggersToRemove) {
+            config.removeLoggerConfiguration(loggerName);
+         }
+
+         // Configure any declared handlers.
+         final String[] handlerNames = getStringCsvArray(properties, HANDLERS);
+         for (String handlerName : handlerNames) {
+            configureHandler(properties, handlerName);
+         }
+         // Remove any handlers that are not longer required
+         handlersToRemove.removeAll(Arrays.asList(handlerNames));
+         for (String handlerName : handlersToRemove) {
+            config.removeHandlerConfiguration(handlerName);
+         }
+
+         // Configure any declared filters.
+         for (String filterName : getStringCsvArray(properties, FILTERS)) {
+            configureFilter(properties, filterName);
+         }
+
+         // Configure any declared formatters.
+         for (String formatterName : getStringCsvArray(properties, FORMATTERS)) {
+            configureFormatter(properties, formatterName);
+         }
+
+         // Configure any declared error managers.
+         for (String errorManagerName : getStringCsvArray(properties, ERROR_MANAGERS)) {
+            configureErrorManager(properties, errorManagerName);
+         }
+
+         // Configure POJOs
+         for (String pojoName : getStringCsvArray(properties, POJOS)) {
+            configurePojos(properties, pojoName);
+         }
+         config.commit();
+      } finally {
+         config.forget();
+      }
+   }
+
+   private List<String> configureLogger(final Properties properties, final String loggerName) {
+      final LoggerConfiguration loggerConfiguration;
+      if (config.getLoggerNames().contains(loggerName)) {
+         loggerConfiguration = config.getLoggerConfiguration(loggerName);
+      } else {
+         loggerConfiguration = config.addLoggerConfiguration(loggerName);
+      }
+
+      // Get logger level
+      final String levelName = getStringProperty(properties, getKey(LOGGER, loggerName, LEVEL));
+      if (notEqual(levelName, loggerConfiguration.getLevelValueExpression())) {
+         loggerConfiguration.setLevel(levelName == null ? "ALL" : levelName);
+      }
+
+      // Get logger filter
+      final String filterName = getStringProperty(properties, getKey(LOGGER, loggerName, FILTER));
+      final ValueExpression<String> newValue = ValueExpression.STRING_RESOLVER.resolve(filterName);
+      if (notEqual(newValue, loggerConfiguration.getFilterValueExpression())) {
+         loggerConfiguration.setFilter(filterName);
+         final String resolvedFilter = loggerConfiguration.getFilterValueExpression().getResolvedValue();
+         if (resolvedFilter != null) {
+            // Check for a filter class
+            final String filterClassName = getStringProperty(properties, getKey(FILTER, resolvedFilter));
+            // If the filter class is null, assume it's a filter expression
+            if (filterClassName != null) {
+               configureFilter(properties, resolvedFilter);
+            }
+         }
+      }
+
+      // Get logger handlers
+      configureHandlerNames(properties, loggerConfiguration, LOGGER, loggerName);
+
+      // Get logger properties
+      final String useParentHandlersString = getStringProperty(properties, getKey(LOGGER, loggerName, USE_PARENT_HANDLERS));
+      if (booleanNotEqual(useParentHandlersString, loggerConfiguration.getUseParentHandlersValueExpression())) {
+         // Check for expression
+         if (EXPRESSION_PATTERN.matcher(useParentHandlersString).matches()) {
+            loggerConfiguration.setUseParentHandlers(useParentHandlersString);
+         } else {
+            loggerConfiguration.setUseParentHandlers(Boolean.parseBoolean(useParentHandlersString));
+         }
+      }
+      return loggerConfiguration.getHandlerNames();
+   }
+
+   private void configureFilter(final Properties properties, final String filterName) {
+      final String className = getStringProperty(properties, getKey(FILTER, filterName));
+      if (className == null) {
+         // Assume we're using a filter expression
+         return;
+      }
+      final FilterConfiguration configuration;
+      if (config.getFilterNames().contains(filterName)) {
+         configuration = config.getFilterConfiguration(filterName);
+      } else {
+         configuration = config.addFilterConfiguration(getStringProperty(properties, getKey(FILTER, filterName, MODULE)), className, filterName, getStringCsvArray(properties, getKey(FILTER, filterName, CONSTRUCTOR_PROPERTIES)));
+      }
+      final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(FILTER, filterName, POST_CONFIGURATION));
+      configuration.setPostConfigurationMethods(postConfigurationMethods);
+      configureProperties(properties, configuration, getKey(FILTER, filterName));
+   }
+
+   private boolean configureFormatter(final Properties properties, final String formatterName) {
+      final String className = getStringProperty(properties, getKey(FORMATTER, formatterName));
+      if (className == null) {
+         printError("Formatter %s is not defined%n", formatterName);
+         return false;
+      }
+      final FormatterConfiguration configuration;
+      if (config.getFormatterNames().contains(formatterName)) {
+         configuration = config.getFormatterConfiguration(formatterName);
+      } else {
+         configuration = config.addFormatterConfiguration(getStringProperty(properties, getKey(FORMATTER, formatterName, MODULE)), className, formatterName, getStringCsvArray(properties, getKey(FORMATTER, formatterName, CONSTRUCTOR_PROPERTIES)));
+      }
+      final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(FORMATTER, formatterName, POST_CONFIGURATION));
+      configuration.setPostConfigurationMethods(postConfigurationMethods);
+      configureProperties(properties, configuration, getKey(FORMATTER, formatterName));
+      return true;
+   }
+
+   private boolean configureErrorManager(final Properties properties, final String errorManagerName) {
+      final String className = getStringProperty(properties, getKey(ERROR_MANAGER, errorManagerName));
+      if (className == null) {
+         printError("Error manager %s is not defined%n", errorManagerName);
+         return false;
+      }
+      final ErrorManagerConfiguration configuration;
+      if (config.getErrorManagerNames().contains(errorManagerName)) {
+         configuration = config.getErrorManagerConfiguration(errorManagerName);
+      } else {
+         configuration = config.addErrorManagerConfiguration(getStringProperty(properties, getKey(ERROR_MANAGER, errorManagerName, MODULE)), className, errorManagerName, getStringCsvArray(properties, getKey(ERROR_MANAGER, errorManagerName, CONSTRUCTOR_PROPERTIES)));
+      }
+      final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(ERROR_MANAGER, errorManagerName, POST_CONFIGURATION));
+      configuration.setPostConfigurationMethods(postConfigurationMethods);
+      configureProperties(properties, configuration, getKey(ERROR_MANAGER, errorManagerName));
+      return true;
+   }
+
+   private boolean configureHandler(final Properties properties, final String handlerName) {
+      final String className = getStringProperty(properties, getKey(HANDLER, handlerName));
+      if (className == null) {
+         printError("Handler %s is not defined%n", handlerName);
+         return false;
+      }
+      final HandlerConfiguration configuration;
+      if (config.getHandlerNames().contains(handlerName)) {
+         configuration = config.getHandlerConfiguration(handlerName);
+      } else {
+         configuration = config.addHandlerConfiguration(getStringProperty(properties, getKey(HANDLER, handlerName, MODULE)), className, handlerName, getStringCsvArray(properties, getKey(HANDLER, handlerName, CONSTRUCTOR_PROPERTIES)));
+      }
+      final String filter = getStringProperty(properties, getKey(HANDLER, handlerName, FILTER));
+      if (notEqual(filter, configuration.getFilterValueExpression())) {
+         configuration.setFilter(filter);
+         final String resolvedFilter = configuration.getFilterValueExpression().getResolvedValue();
+         if (resolvedFilter != null) {
+            // Check for a filter class
+            final String filterClassName = getStringProperty(properties, getKey(FILTER, resolvedFilter));
+            // If the filter class is null, assume it's a filter expression
+            if (filterClassName != null) {
+               configureFilter(properties, resolvedFilter);
+            }
+         }
+      }
+      final String levelName = getStringProperty(properties, getKey(HANDLER, handlerName, LEVEL));
+      if (notEqual(levelName, configuration.getLevelValueExpression())) {
+         configuration.setLevel(levelName == null ? "ALL" : levelName);
+      }
+      final String formatterName = getStringProperty(properties, getKey(HANDLER, handlerName, FORMATTER));
+      if (formatterName != null) {
+         if (getStringProperty(properties, getKey(FORMATTER, ValueExpression.STRING_RESOLVER.resolve(formatterName).getResolvedValue())) == null) {
+            printError("Formatter %s is not defined%n", formatterName);
+         } else {
+            final ValueExpression<String> newValue = ValueExpression.STRING_RESOLVER.resolve(formatterName);
+            if (notEqual(newValue, configuration.getFormatterNameValueExpression())) {
+               if (configureFormatter(properties, newValue.getResolvedValue())) {
+                  configuration.setFormatterName(formatterName);
+               }
+            }
+         }
+      }
+      final String encoding = getStringProperty(properties, getKey(HANDLER, handlerName, ENCODING));
+      if (notEqual(encoding, configuration.getEncodingValueExpression())) {
+         configuration.setEncoding(encoding);
+      }
+      final String errorManagerName = getStringProperty(properties, getKey(HANDLER, handlerName, ERROR_MANAGER));
+      if (errorManagerName != null) {
+         if (getStringProperty(properties, getKey(ERROR_MANAGER, ValueExpression.STRING_RESOLVER.resolve(errorManagerName).getResolvedValue())) == null) {
+            printError("Error manager %s is not defined%n", errorManagerName);
+         } else {
+            final ValueExpression<String> newValue = ValueExpression.STRING_RESOLVER.resolve(errorManagerName);
+            if (notEqual(newValue, configuration.getErrorManagerNameValueExpression())) {
+               if (configureErrorManager(properties, newValue.getResolvedValue())) {
+                  configuration.setErrorManagerName(errorManagerName);
+               }
+            }
+         }
+      }
+      configureHandlerNames(properties, configuration, HANDLER, handlerName);
+      final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(HANDLER, handlerName, POST_CONFIGURATION));
+      configuration.setPostConfigurationMethods(postConfigurationMethods);
+      configureProperties(properties, configuration, getKey(HANDLER, handlerName));
+      return true;
+   }
+
+   private void configurePojos(final Properties properties, final String pojoName) {
+      final String className = getStringProperty(properties, getKey(POJO, pojoName));
+      if (className == null) {
+         printError("POJO %s is not defined%n", pojoName);
+         return;
+      }
+      final PojoConfiguration configuration;
+      if (config.getPojoNames().contains(pojoName)) {
+         configuration = config.getPojoConfiguration(pojoName);
+      } else {
+         configuration = config.addPojoConfiguration(getStringProperty(properties, getKey(POJO, pojoName, MODULE)), getStringProperty(properties, getKey(POJO, pojoName)), pojoName, getStringCsvArray(properties, getKey(POJO, pojoName, CONSTRUCTOR_PROPERTIES)));
+      }
+      final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(POJO, pojoName, POST_CONFIGURATION));
+      configuration.setPostConfigurationMethods(postConfigurationMethods);
+      configureProperties(properties, configuration, getKey(POJO, pojoName));
+   }
+
+   private void configureProperties(final Properties properties,
+                                    final PropertyConfigurable configurable,
+                                    final String prefix) {
+      final List<String> propertyNames = getStringCsvList(properties, getKey(prefix, PROPERTIES));
+      for (String propertyName : propertyNames) {
+         final String valueString = getStringProperty(properties, getKey(prefix, propertyName), false);
+         if (notEqual(valueString, configurable.getPropertyValueExpression(propertyName))) {
+            configurable.setPropertyValueString(propertyName, valueString);
+         }
+      }
+   }
+
+   private void configureHandlerNames(final Properties properties,
+                                      final HandlerContainingConfigurable configuration,
+                                      final String prefix,
+                                      final String name) {
+      final String[] handlerNames = getStringCsvArray(properties, getKey(prefix, name, HANDLERS));
+      final Collection<String> availableHandlers = new ArrayList<>();
+      for (String handlerName : handlerNames) {
+         if (configureHandler(properties, handlerName)) {
+            availableHandlers.add(handlerName);
+         }
+      }
+      configuration.setHandlerNames(availableHandlers);
+   }
+
+   private static String getKey(final String prefix, final String objectName) {
+      return objectName.length() > 0 ? prefix + "." + objectName : prefix;
+   }
+
+   private static String getKey(final String prefix, final String objectName, final String key) {
+      return objectName.length() > 0 ? prefix + "." + objectName + "." + key : prefix + "." + key;
+   }
+
+   private static String getStringProperty(final Properties properties, final String key) {
+      return getStringProperty(properties, key, true);
+   }
+
+   private static String getStringProperty(final Properties properties, final String key, final boolean trim) {
+      final String value = properties.getProperty(key);
+      return (trim ? (value == null ? null : value.trim()) : value);
+   }
+
+   private static String[] getStringCsvArray(final Properties properties, final String key) {
+      final String property = properties.getProperty(key, "");
+      if (property == null) {
+         return EMPTY_STRINGS;
+      }
+      final String value = property.trim();
+      if (value.length() == 0) {
+         return EMPTY_STRINGS;
+      }
+      return value.split("\\s*,\\s*");
+   }
+
+   private static List<String> getStringCsvList(final Properties properties, final String key) {
+      return new ArrayList<>(Arrays.asList(getStringCsvArray(properties, key)));
+   }
+
+   private static void printError(final String format, final Object... args) {
+      System.err.printf(format, args);
+   }
+
+   private static void safeClose(final Closeable stream) {
+      if (stream != null)
+         try {
+            stream.close();
+         } catch (Exception e) {
+            // can't do anything about it
+         }
+   }
+
+   private static boolean notEqual(final ValueExpression<String> newValue, final ValueExpression<String> currentValue) {
+      if (newValue == null) {
+         return currentValue.getResolvedValue() != null;
+      }
+      return !Objects.equals(newValue.getValue(), currentValue.getValue());
+   }
+
+   private static boolean notEqual(final String newValue, final ValueExpression<String> currentValue) {
+      if (newValue == null) {
+         return currentValue.getResolvedValue() != null;
+      }
+      if (currentValue.isExpression()) {
+         final String resolvedCurrentValue = currentValue.getResolvedValue();
+         final String resolvedNewValue = ValueExpression.STRING_RESOLVER.resolve(newValue).getResolvedValue();
+         return resolvedCurrentValue == null ? resolvedNewValue != null : !resolvedCurrentValue.equals(resolvedNewValue);
+      }
+      return !newValue.equals(currentValue.getValue());
+   }
+
+   private static boolean booleanNotEqual(final String newValue, final ValueExpression<Boolean> currentValue) {
+      if (newValue == null) {
+         return currentValue.getResolvedValue() != null;
+      }
+      if (currentValue.isExpression()) {
+         final Boolean resolvedCurrentValue = currentValue.getResolvedValue();
+         final Boolean resolvedNewValue = ValueExpression.BOOLEAN_RESOLVER.resolve(newValue).getResolvedValue();
+         return resolvedCurrentValue == null ? resolvedNewValue != null : !resolvedCurrentValue.equals(resolvedNewValue);
+      }
+      return !newValue.equals(currentValue.getValue());
+   }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index c990ad6..be340ee 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.management.ManagementFactory;
+import java.net.URI;
 import java.net.URL;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -123,6 +124,7 @@ import org.apache.activemq.artemis.core.server.BindingQueryResult;
 import org.apache.activemq.artemis.core.server.Divert;
 import org.apache.activemq.artemis.core.server.JournalType;
 import org.apache.activemq.artemis.core.server.LargeServerMessage;
+import org.apache.activemq.artemis.core.server.LoggingConfigurationFileReloader;
 import org.apache.activemq.artemis.core.server.MemoryManager;
 import org.apache.activemq.artemis.core.server.NetworkHealthCheck;
 import org.apache.activemq.artemis.core.server.NodeManager;
@@ -2360,6 +2362,15 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          reloadManager.addCallback(configuration.getConfigurationUrl(), new ConfigurationFileReloader());
       }
 
+      if (System.getProperty("logging.configuration") != null) {
+         try {
+            reloadManager.addCallback(new URI(System.getProperty("logging.configuration")).toURL(), new LoggingConfigurationFileReloader());
+         } catch (Exception e) {
+            // a syntax error with the logging system property shouldn't prevent the server from starting
+            ActiveMQServerLogger.LOGGER.problemAddingConfigReloadCallback(System.getProperty("logging.configuration"), e);
+         }
+      }
+
       if (hasBrokerPlugins()) {
          callBrokerPlugins(plugin -> plugin.registered(this));
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/test/java/org/apache/activemq/artemis/core/reload/LoggingConfigurationFileReloaderTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/reload/LoggingConfigurationFileReloaderTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/reload/LoggingConfigurationFileReloaderTest.java
new file mode 100644
index 0000000..9f111c6
--- /dev/null
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/reload/LoggingConfigurationFileReloaderTest.java
@@ -0,0 +1,117 @@
+/**
+ * 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.
+ */
+
+package org.apache.activemq.artemis.core.reload;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.logging.LogManager;
+
+import org.apache.activemq.artemis.core.server.LoggingConfigurationFileReloader;
+import org.apache.activemq.artemis.utils.ClassloadingUtil;
+import org.jboss.logging.Logger;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class LoggingConfigurationFileReloaderTest {
+
+   @Test
+   public void test() throws Exception {
+      LogManager logManager = LogManager.getLogManager();
+
+      List loggerNames = Collections.list(logManager.getLoggerNames());
+      assertFalse(loggerNames.contains("test1"));
+      assertFalse(loggerNames.contains("test2"));
+      assertFalse(loggerNames.contains("test3"));
+
+      // everything defaults to INFO
+      final Logger root = Logger.getLogger("");
+      assertTrue(root.isEnabled(Logger.Level.ERROR));
+      assertTrue(root.isEnabled(Logger.Level.WARN));
+      assertTrue(root.isEnabled(Logger.Level.INFO));
+      assertFalse(root.isEnabled(Logger.Level.DEBUG));
+      assertFalse(root.isEnabled(Logger.Level.TRACE));
+
+      final Logger test1 = Logger.getLogger("test1");
+      assertTrue(test1.isEnabled(Logger.Level.ERROR));
+      assertTrue(test1.isEnabled(Logger.Level.WARN));
+      assertTrue(test1.isEnabled(Logger.Level.INFO));
+      assertFalse(test1.isEnabled(Logger.Level.DEBUG));
+      assertFalse(test1.isEnabled(Logger.Level.TRACE));
+
+      final Logger test2 = Logger.getLogger("test2");
+      assertTrue(test2.isEnabled(Logger.Level.ERROR));
+      assertTrue(test2.isEnabled(Logger.Level.WARN));
+      assertTrue(test2.isEnabled(Logger.Level.INFO));
+      assertFalse(test2.isEnabled(Logger.Level.DEBUG));
+      assertFalse(test2.isEnabled(Logger.Level.TRACE));
+
+      LoggingConfigurationFileReloader loggingConfigurationFileReloader = new LoggingConfigurationFileReloader();
+      loggingConfigurationFileReloader.reload(ClassloadingUtil.findResource("reload-logging-1.properties"));
+
+      loggerNames = Collections.list(logManager.getLoggerNames());
+      assertTrue(loggerNames.contains("test1"));
+      assertTrue(loggerNames.contains("test2"));
+      assertFalse(loggerNames.contains("test3"));
+
+      assertTrue(root.isEnabled(Logger.Level.ERROR));
+      assertTrue(root.isEnabled(Logger.Level.WARN));
+      assertFalse(root.isEnabled(Logger.Level.INFO));
+      assertFalse(root.isEnabled(Logger.Level.DEBUG));
+      assertFalse(root.isEnabled(Logger.Level.TRACE));
+
+      assertTrue(test1.isEnabled(Logger.Level.ERROR));
+      assertTrue(test1.isEnabled(Logger.Level.WARN));
+      assertTrue(test1.isEnabled(Logger.Level.INFO));
+      assertTrue(test1.isEnabled(Logger.Level.DEBUG));
+      assertTrue(test1.isEnabled(Logger.Level.TRACE));
+
+      assertTrue(test2.isEnabled(Logger.Level.ERROR));
+      assertFalse(test2.isEnabled(Logger.Level.WARN));
+      assertFalse(test2.isEnabled(Logger.Level.INFO));
+      assertFalse(test2.isEnabled(Logger.Level.DEBUG));
+      assertFalse(test2.isEnabled(Logger.Level.TRACE));
+
+      loggingConfigurationFileReloader.reload(ClassloadingUtil.findResource("reload-logging-2.properties"));
+
+      loggerNames = Collections.list(logManager.getLoggerNames());
+      assertTrue(loggerNames.contains("test1"));
+      assertTrue(loggerNames.contains("test2"));
+      assertTrue(loggerNames.contains("test3"));
+
+      assertTrue(root.isEnabled(Logger.Level.ERROR));
+      assertFalse(root.isEnabled(Logger.Level.WARN));
+      assertFalse(root.isEnabled(Logger.Level.INFO));
+      assertFalse(root.isEnabled(Logger.Level.DEBUG));
+      assertFalse(root.isEnabled(Logger.Level.TRACE));
+
+      assertTrue(test1.isEnabled(Logger.Level.ERROR));
+      assertTrue(test1.isEnabled(Logger.Level.WARN));
+      assertFalse(test1.isEnabled(Logger.Level.INFO));
+      assertFalse(test1.isEnabled(Logger.Level.DEBUG));
+      assertFalse(test1.isEnabled(Logger.Level.TRACE));
+
+      final Logger test3 = Logger.getLogger("test3");
+      assertTrue(test3.isEnabled(Logger.Level.ERROR));
+      assertTrue(test3.isEnabled(Logger.Level.WARN));
+      assertTrue(test3.isEnabled(Logger.Level.INFO));
+      assertTrue(test3.isEnabled(Logger.Level.DEBUG));
+      assertFalse(test3.isEnabled(Logger.Level.TRACE));
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/test/resources/reload-logging-1.properties
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/reload-logging-1.properties b/artemis-server/src/test/resources/reload-logging-1.properties
new file mode 100644
index 0000000..7aba821
--- /dev/null
+++ b/artemis-server/src/test/resources/reload-logging-1.properties
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+
+loggers=test1,test2
+logger.test1.level=TRACE
+logger.test2.level=ERROR
+logger.level=WARN
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-server/src/test/resources/reload-logging-2.properties
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/reload-logging-2.properties b/artemis-server/src/test/resources/reload-logging-2.properties
new file mode 100644
index 0000000..8ff0a5f
--- /dev/null
+++ b/artemis-server/src/test/resources/reload-logging-2.properties
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+
+loggers=test1,test3
+logger.test1.level=WARN
+logger.test3.level=DEBUG
+logger.level=ERROR
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
----------------------------------------------------------------------
diff --git a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
index b80795c..80b7167 100644
--- a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
+++ b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
@@ -48,14 +48,12 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
  */
 public class ActiveMQXAResourceRecovery {
 
-   private final boolean trace = ActiveMQXARecoveryLogger.LOGGER.isTraceEnabled();
-
    private boolean hasMore;
 
    private ActiveMQXAResourceWrapper res;
 
    public ActiveMQXAResourceRecovery() {
-      if (trace) {
+      if (ActiveMQXARecoveryLogger.LOGGER.isTraceEnabled()) {
          ActiveMQXARecoveryLogger.LOGGER.trace("Constructing ActiveMQXAResourceRecovery");
       }
    }


[4/4] activemq-artemis git commit: ARTEMIS-2121 reload logging config at runtime

Posted by cl...@apache.org.
ARTEMIS-2121 reload logging config at runtime

Many thanks to James Perkins who supplied the guts of the reload logic.

(cherry picked from commit cbace51d6ce067ab6fa745cd19ec8d14e1c80df1)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5cc6f7e9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5cc6f7e9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5cc6f7e9

Branch: refs/heads/2.6.x
Commit: 5cc6f7e9ed17b928fffc8170322483b575df351e
Parents: 6333c2d
Author: Justin Bertram <jb...@apache.org>
Authored: Fri Sep 28 21:37:58 2018 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Oct 11 11:28:46 2018 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/utils/UTF8Util.java |   7 +-
 .../artemis/jms/bridge/impl/JMSBridgeImpl.java  | 140 +++---
 .../artemis/ra/ActiveMQRABytesMessage.java      |  61 ++-
 .../ra/ActiveMQRAConnectionFactoryImpl.java     |  59 ++-
 .../artemis/ra/ActiveMQRAConnectionManager.java |  10 +-
 .../ra/ActiveMQRAConnectionMetaData.java        |  21 +-
 .../ra/ActiveMQRAConnectionRequestInfo.java     |  33 +-
 .../artemis/ra/ActiveMQRACredential.java        |  22 +-
 .../artemis/ra/ActiveMQRALocalTransaction.java  |  13 +-
 .../artemis/ra/ActiveMQRAMCFProperties.java     |  18 +-
 .../ra/ActiveMQRAManagedConnectionFactory.java  |  52 +--
 .../artemis/ra/ActiveMQRAMapMessage.java        |  57 ++-
 .../activemq/artemis/ra/ActiveMQRAMessage.java  | 111 +++--
 .../artemis/ra/ActiveMQRAMessageConsumer.java   |  33 +-
 .../artemis/ra/ActiveMQRAMessageListener.java   |   9 +-
 .../artemis/ra/ActiveMQRAMessageProducer.java   |  59 ++-
 .../activemq/artemis/ra/ActiveMQRAMetaData.java |  15 +-
 .../artemis/ra/ActiveMQRAObjectMessage.java     |  11 +-
 .../artemis/ra/ActiveMQRAProperties.java        |  19 +-
 .../artemis/ra/ActiveMQRAQueueReceiver.java     |   9 +-
 .../artemis/ra/ActiveMQRAQueueSender.java       |  17 +-
 .../activemq/artemis/ra/ActiveMQRASession.java  | 175 ++++----
 .../ra/ActiveMQRASessionFactoryImpl.java        |  75 ++--
 .../artemis/ra/ActiveMQRAStreamMessage.java     |  55 ++-
 .../artemis/ra/ActiveMQRATextMessage.java       |  11 +-
 .../artemis/ra/ActiveMQRATopicPublisher.java    |  25 +-
 .../artemis/ra/ActiveMQRATopicSubscriber.java   |  11 +-
 .../artemis/ra/ActiveMQRAXAResource.java        |  27 +-
 .../artemis/ra/ConnectionFactoryProperties.java | 133 +++---
 artemis-server/pom.xml                          |   1 -
 .../core/server/ActiveMQServerLogger.java       |  12 +-
 .../LoggingConfigurationFileReloader.java       |  86 ++++
 .../server/LoggingConfigurationUpdater.java     | 447 +++++++++++++++++++
 .../core/server/impl/ActiveMQServerImpl.java    |  11 +
 .../LoggingConfigurationFileReloaderTest.java   | 117 +++++
 .../test/resources/reload-logging-1.properties  |  21 +
 .../test/resources/reload-logging-2.properties  |  21 +
 .../xa/recovery/ActiveMQXAResourceRecovery.java |   4 +-
 38 files changed, 1295 insertions(+), 713 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
index afee81c..ec1c1b6 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
@@ -32,9 +32,6 @@ import org.apache.activemq.artemis.logs.ActiveMQUtilLogger;
  */
 public final class UTF8Util {
 
-
-   private static final boolean isTrace = ActiveMQUtilLogger.LOGGER.isTraceEnabled();
-
    private static final ThreadLocal<SoftReference<StringUtilBuffer>> currentBuffer = new ThreadLocal<>();
 
    private UTF8Util() {
@@ -88,7 +85,7 @@ public final class UTF8Util {
 
       final int stringLength = str.length();
 
-      if (UTF8Util.isTrace) {
+      if (ActiveMQUtilLogger.LOGGER.isTraceEnabled()) {
          // This message is too verbose for debug, that's why we are using trace here
          ActiveMQUtilLogger.LOGGER.trace("Saving string with utfSize=" + len + " stringSize=" + stringLength);
       }
@@ -186,7 +183,7 @@ public final class UTF8Util {
 
       final int size = input.readUnsignedShort();
 
-      if (UTF8Util.isTrace) {
+      if (ActiveMQUtilLogger.LOGGER.isTraceEnabled()) {
          // This message is too verbose for debug, that's why we are using trace here
          ActiveMQUtilLogger.LOGGER.trace("Reading string with utfSize=" + size);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
index 034af0e..da37079 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
@@ -75,8 +75,6 @@ public final class JMSBridgeImpl implements JMSBridge {
 
    private static final String[] RESOURCE_RECOVERY_CLASS_NAMES = new String[]{"org.jboss.as.messaging.jms.AS7RecoveryRegistry"};
 
-   private static boolean trace = ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled();
-
    private static final int TEN_YEARS = 60 * 60 * 24 * 365 * 10; // in ms
 
    private static final long DEFAULT_FAILOVER_TIMEOUT = 60 * 1000;
@@ -315,7 +313,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          }
       }
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Created " + this);
       }
    }
@@ -353,7 +351,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          return;
       }
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Starting " + this);
       }
 
@@ -416,7 +414,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       started = true;
 
       if (maxBatchTime != -1) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Starting time checker thread");
          }
 
@@ -425,14 +423,14 @@ public final class JMSBridgeImpl implements JMSBridge {
          executor.execute(timeChecker);
          batchExpiryTime = System.currentTimeMillis() + maxBatchTime;
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Started time checker thread");
          }
       }
 
       executor.execute(new SourceReceiver());
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Started " + this);
       }
    }
@@ -460,7 +458,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       }
 
       synchronized (this) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Stopping " + this);
          }
          if (!connectedSource && sourceConn != null) {
@@ -483,7 +481,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
          if (tx != null) {
             // Terminate any transaction
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Rolling back remaining tx");
             }
 
@@ -493,12 +491,12 @@ public final class JMSBridgeImpl implements JMSBridge {
                tx.rollback();
                abortedMessageCount += messages.size();
             } catch (Exception ignore) {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore);
                }
             }
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Rolled back remaining tx");
             }
          }
@@ -506,7 +504,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          try {
             sourceConn.close();
          } catch (Exception ignore) {
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close source conn", ignore);
             }
          }
@@ -515,13 +513,13 @@ public final class JMSBridgeImpl implements JMSBridge {
             try {
                targetConn.close();
             } catch (Exception ignore) {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close target conn", ignore);
                }
             }
          }
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Stopped " + this);
          }
       }
@@ -554,7 +552,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
    @Override
    public synchronized void pause() throws Exception {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Pausing " + this);
       }
 
@@ -564,14 +562,14 @@ public final class JMSBridgeImpl implements JMSBridge {
          sourceConn.stop();
       }
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Paused " + this);
       }
    }
 
    @Override
    public synchronized void resume() throws Exception {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Resuming " + this);
       }
 
@@ -581,7 +579,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          sourceConn.start();
       }
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Resumed " + this);
       }
    }
@@ -872,7 +870,7 @@ public final class JMSBridgeImpl implements JMSBridge {
    }
 
    private void enlistResources(final Transaction tx) throws Exception {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Enlisting resources in tx");
       }
 
@@ -884,13 +882,13 @@ public final class JMSBridgeImpl implements JMSBridge {
 
       tx.enlistResource(resDest);
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Enlisted resources in tx");
       }
    }
 
    private void delistResources(final Transaction tx) {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Delisting resources from tx");
       }
 
@@ -899,7 +897,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       try {
          tx.delistResource(resSource, XAResource.TMSUCCESS);
       } catch (Exception e) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist source resource", e);
          }
       }
@@ -909,18 +907,18 @@ public final class JMSBridgeImpl implements JMSBridge {
       try {
          tx.delistResource(resDest, XAResource.TMSUCCESS);
       } catch (Exception e) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist target resource", e);
          }
       }
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Delisted resources from tx");
       }
    }
 
    private Transaction startTx() throws Exception {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction");
       }
 
@@ -941,7 +939,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
       tm.suspend();
 
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Started JTA transaction");
       }
 
@@ -970,24 +968,24 @@ public final class JMSBridgeImpl implements JMSBridge {
 
          if (username == null) {
             if (isXA) {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating an XA connection");
                }
                conn = ((XAConnectionFactory) cf).createXAConnection();
             } else {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection");
                }
                conn = ((ConnectionFactory) cf).createConnection();
             }
          } else {
             if (isXA) {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating an XA connection");
                }
                conn = ((XAConnectionFactory) cf).createXAConnection(username, password);
             } else {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection");
                }
                conn = ((ConnectionFactory) cf).createConnection(username, password);
@@ -1092,14 +1090,14 @@ public final class JMSBridgeImpl implements JMSBridge {
             // QoS = ONCE_AND_ONLY_ONCE
             if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
                // Create an XASession for consuming from the source
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating XA source session");
                }
 
                sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff, clientID, true, true);
                sourceSession = ((XAConnection) sourceConn).createXASession();
             } else { // QoS = DUPLICATES_OK || AT_MOST_ONCE
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating non XA source session");
                }
 
@@ -1136,7 +1134,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          } else { // bridging across different servers
             // QoS = ONCE_AND_ONLY_ONCE
             if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating XA dest session");
                }
 
@@ -1146,7 +1144,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
                targetSession = ((XAConnection) targetConn).createXASession();
             } else { // QoS = DUPLICATES_OK || AT_MOST_ONCE
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Creating non XA dest session");
                }
 
@@ -1163,7 +1161,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          }
 
          if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction");
             }
 
@@ -1194,7 +1192,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       try {
          sourceConn.stop();
       } catch (Throwable ignore) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to stop source connection", ignore);
          }
       }
@@ -1203,7 +1201,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          try {
             delistResources(tx);
          } catch (Throwable ignore) {
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist resources", ignore);
             }
          }
@@ -1212,7 +1210,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             tx.rollback();
             abortedMessageCount += messages.size();
          } catch (Throwable ignore) {
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore);
             }
          }
@@ -1222,7 +1220,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       try {
          sourceConn.close();
       } catch (Throwable ignore) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close source connection", ignore);
          }
       }
@@ -1231,7 +1229,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             targetConn.close();
          }
       } catch (Throwable ignore) {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close target connection", ignore);
          }
       }
@@ -1248,7 +1246,7 @@ public final class JMSBridgeImpl implements JMSBridge {
    }
 
    private boolean setupJMSObjectsWithRetry() {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Setting up connections");
       }
 
@@ -1277,13 +1275,13 @@ public final class JMSBridgeImpl implements JMSBridge {
    }
 
    private void sendBatch() {
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Sending batch of " + messages.size() + " messages");
       }
 
       if (paused) {
          // Don't send now
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Paused, so not sending now");
          }
 
@@ -1304,13 +1302,13 @@ public final class JMSBridgeImpl implements JMSBridge {
          if (qualityOfServiceMode == QualityOfServiceMode.ONCE_AND_ONLY_ONCE || (qualityOfServiceMode == QualityOfServiceMode.AT_MOST_ONCE && maxBatchSize > 1)) {
             // We client ack before sending
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Client acking source session");
             }
 
             messages.getLast().acknowledge();
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Client acked source session");
             }
          }
@@ -1331,13 +1329,13 @@ public final class JMSBridgeImpl implements JMSBridge {
          if (maxBatchSize > 1) {
             // The sending session is transacted - we need to commit it
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Committing target session");
             }
 
             targetSession.commit();
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Committed target session");
             }
          }
@@ -1348,13 +1346,13 @@ public final class JMSBridgeImpl implements JMSBridge {
             // Note we could actually use Session.DUPS_OK_ACKNOWLEDGE here
             // For a slightly less strong delivery guarantee
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Client acking source session");
             }
 
             messages.getLast().acknowledge();
 
-            if (JMSBridgeImpl.trace) {
+            if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                ActiveMQJMSBridgeLogger.LOGGER.trace("Client acked source session");
             }
          }
@@ -1387,13 +1385,13 @@ public final class JMSBridgeImpl implements JMSBridge {
          // Commit the JTA transaction and start another
          delistResources(tx);
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Committing JTA transaction");
          }
 
          tx.commit();
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Committed JTA transaction");
          }
       } catch (Exception e) {
@@ -1431,13 +1429,13 @@ public final class JMSBridgeImpl implements JMSBridge {
       try {
          sendMessages();
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Committing source session");
          }
 
          sourceSession.commit();
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Committed source session");
          }
 
@@ -1471,7 +1469,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             addMessageIDInHeader(msg);
          }
 
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Sending message " + msg);
          }
 
@@ -1490,7 +1488,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          targetProducer.send(targetDestination, msg, msg.getJMSDeliveryMode(), msg.getJMSPriority(), timeToLive);
 
          messageCount++;
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Sent message " + msg);
          }
       }
@@ -1521,7 +1519,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       // Each bridge (if there are more than one) in the chain can concatenate the message id
       // So in the case of multiple bridges having routed the message this can be used in a multi-hop
       // distributed request/response
-      if (JMSBridgeImpl.trace) {
+      if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
          ActiveMQJMSBridgeLogger.LOGGER.trace("Adding old message id in Message header");
       }
 
@@ -1654,7 +1652,7 @@ public final class JMSBridgeImpl implements JMSBridge {
                      ((ActiveMQMessage) msg).checkBuffer();
                   }
                } catch (JMSException jmse) {
-                  if (JMSBridgeImpl.trace) {
+                  if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                      ActiveMQJMSBridgeLogger.LOGGER.trace(this + " exception while receiving a message", jmse);
                   }
                }
@@ -1663,7 +1661,7 @@ public final class JMSBridgeImpl implements JMSBridge {
                   try {
                      lock.wait(500);
                   } catch (InterruptedException e) {
-                     if (JMSBridgeImpl.trace) {
+                     if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                         ActiveMQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted");
                      }
                      if (stopping) {
@@ -1674,7 +1672,7 @@ public final class JMSBridgeImpl implements JMSBridge {
                   continue;
                }
 
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace(this + " received message " + msg);
                }
 
@@ -1682,18 +1680,18 @@ public final class JMSBridgeImpl implements JMSBridge {
 
                batchExpiryTime = System.currentTimeMillis() + maxBatchTime;
 
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace(this + " rescheduled batchExpiryTime to " + batchExpiryTime);
                }
 
                if (maxBatchSize != -1 && messages.size() >= maxBatchSize) {
-                  if (JMSBridgeImpl.trace) {
+                  if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                      ActiveMQJMSBridgeLogger.LOGGER.trace(this + " maxBatchSize has been reached so sending batch");
                   }
 
                   sendBatch();
 
-                  if (JMSBridgeImpl.trace) {
+                  if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                      ActiveMQJMSBridgeLogger.LOGGER.trace(this + " sent batch");
                   }
                }
@@ -1739,7 +1737,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
       @Override
       public void run() {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace("Failure handler running");
          }
 
@@ -1803,7 +1801,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
       @Override
       public void run() {
-         if (JMSBridgeImpl.trace) {
+         if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
             ActiveMQJMSBridgeLogger.LOGGER.trace(this + " running");
          }
 
@@ -1812,19 +1810,19 @@ public final class JMSBridgeImpl implements JMSBridge {
                long toWait = batchExpiryTime - System.currentTimeMillis();
 
                if (toWait <= 0) {
-                  if (JMSBridgeImpl.trace) {
+                  if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                      ActiveMQJMSBridgeLogger.LOGGER.trace(this + " waited enough");
                   }
 
                   synchronized (lock) {
                      if (!failed && !messages.isEmpty()) {
-                        if (JMSBridgeImpl.trace) {
+                        if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                            ActiveMQJMSBridgeLogger.LOGGER.trace(this + " got some messages so sending batch");
                         }
 
                         sendBatch();
 
-                        if (JMSBridgeImpl.trace) {
+                        if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                            ActiveMQJMSBridgeLogger.LOGGER.trace(this + " sent batch");
                         }
                      }
@@ -1833,17 +1831,17 @@ public final class JMSBridgeImpl implements JMSBridge {
                   batchExpiryTime = System.currentTimeMillis() + maxBatchTime;
                } else {
                   try {
-                     if (JMSBridgeImpl.trace) {
+                     if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                         ActiveMQJMSBridgeLogger.LOGGER.trace(this + " waiting for " + toWait);
                      }
 
                      lock.wait(toWait);
 
-                     if (JMSBridgeImpl.trace) {
+                     if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                         ActiveMQJMSBridgeLogger.LOGGER.trace(this + " woke up");
                      }
                   } catch (InterruptedException e) {
-                     if (JMSBridgeImpl.trace) {
+                     if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                         ActiveMQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted");
                      }
                      if (stopping) {
@@ -1888,7 +1886,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             }
             if (failed) {
                // The failure has already been detected and is being handled
-               if (JMSBridgeImpl.trace) {
+               if (ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled()) {
                   ActiveMQJMSBridgeLogger.LOGGER.trace("Failure recovery already in progress");
                }
             } else {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java
index 6e38088..f18e1fa 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java
@@ -26,11 +26,6 @@ import java.util.Arrays;
 public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMessage {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param message the message
@@ -39,7 +34,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
    public ActiveMQRABytesMessage(final BytesMessage message, final ActiveMQRASession session) {
       super(message, session);
 
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
    }
@@ -52,7 +47,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public long getBodyLength() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getBodyLength()");
       }
 
@@ -67,7 +62,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public boolean readBoolean() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readBoolean()");
       }
 
@@ -82,7 +77,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public byte readByte() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readByte()");
       }
 
@@ -99,7 +94,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public int readBytes(final byte[] value, final int length) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ", " + length + ")");
       }
 
@@ -115,7 +110,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public int readBytes(final byte[] value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")");
       }
 
@@ -130,7 +125,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public char readChar() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readChar()");
       }
 
@@ -145,7 +140,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public double readDouble() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readDouble()");
       }
 
@@ -160,7 +155,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public float readFloat() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readFloat()");
       }
 
@@ -175,7 +170,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public int readInt() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readInt()");
       }
 
@@ -190,7 +185,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public long readLong() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readLong()");
       }
 
@@ -205,7 +200,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public short readShort() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readShort()");
       }
 
@@ -220,7 +215,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public int readUnsignedByte() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readUnsignedByte()");
       }
 
@@ -235,7 +230,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public int readUnsignedShort() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readUnsignedShort()");
       }
 
@@ -250,7 +245,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public String readUTF() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readUTF()");
       }
 
@@ -264,7 +259,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void reset() throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("reset()");
       }
 
@@ -279,7 +274,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeBoolean(final boolean value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")");
       }
 
@@ -294,7 +289,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeByte(final byte value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")");
       }
 
@@ -311,7 +306,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")");
       }
 
@@ -326,7 +321,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeBytes(final byte[] value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")");
       }
 
@@ -341,7 +336,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeChar(final char value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")");
       }
 
@@ -356,7 +351,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeDouble(final double value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")");
       }
 
@@ -371,7 +366,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeFloat(final float value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")");
       }
 
@@ -386,7 +381,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeInt(final int value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")");
       }
 
@@ -401,7 +396,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeLong(final long value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")");
       }
 
@@ -416,7 +411,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeObject(final Object value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")");
       }
 
@@ -431,7 +426,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeShort(final short value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")");
       }
 
@@ -446,7 +441,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
     */
    @Override
    public void writeUTF(final String value) throws JMSException {
-      if (ActiveMQRABytesMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeUTF(" + value + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java
index e3c4c9d..00ac5a9 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java
@@ -47,7 +47,6 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     * Serial version UID
     */
    static final long serialVersionUID = 7981708919479859360L;
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
 
    /**
     * The managed connection factory
@@ -71,7 +70,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     * @param cm  The connection manager
     */
    public ActiveMQRAConnectionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm) {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ")");
       }
 
@@ -80,14 +79,14 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
       if (cm == null) {
          // This is standalone usage, no appserver
          this.cm = new ActiveMQRAConnectionManager();
-         if (ActiveMQRAConnectionFactoryImpl.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("Created new ConnectionManager=" + this.cm);
          }
       } else {
          this.cm = cm;
       }
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm);
       }
    }
@@ -99,7 +98,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public void setReference(final Reference reference) {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")");
       }
 
@@ -113,7 +112,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public Reference getReference() {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getReference()");
       }
       if (reference == null) {
@@ -136,13 +135,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public QueueConnection createQueueConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createQueueConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.QUEUE_CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s);
       }
 
@@ -159,7 +158,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public QueueConnection createQueueConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createQueueConnection(" + userName + ", ****)");
       }
 
@@ -169,7 +168,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
 
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s);
       }
 
@@ -184,13 +183,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public TopicConnection createTopicConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTopicConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.TOPIC_CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s);
       }
 
@@ -207,7 +206,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public TopicConnection createTopicConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTopicConnection(" + userName + ", ****)");
       }
 
@@ -216,7 +215,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
       s.setPassword(password);
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s);
       }
 
@@ -231,13 +230,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public Connection createConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created connection: " + s);
       }
 
@@ -254,7 +253,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public Connection createConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnection(" + userName + ", ****)");
       }
 
@@ -264,7 +263,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
 
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created connection: " + s);
       }
 
@@ -279,13 +278,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XAQueueConnection createXAQueueConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXAQueueConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s);
       }
 
@@ -302,7 +301,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XAQueueConnection createXAQueueConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXAQueueConnection(" + userName + ", ****)");
       }
 
@@ -311,7 +310,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
       s.setPassword(password);
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s);
       }
 
@@ -326,13 +325,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XATopicConnection createXATopicConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXATopicConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s);
       }
 
@@ -349,7 +348,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XATopicConnection createXATopicConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXATopicConnection(" + userName + ", ****)");
       }
 
@@ -358,7 +357,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
       s.setPassword(password);
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s);
       }
 
@@ -373,13 +372,13 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XAConnection createXAConnection() throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXAConnection()");
       }
 
       ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created connection: " + s);
       }
 
@@ -396,7 +395,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
     */
    @Override
    public XAConnection createXAConnection(final String userName, final String password) throws JMSException {
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXAConnection(" + userName + ", ****)");
       }
 
@@ -405,7 +404,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
       s.setPassword(password);
       validateUser(s);
 
-      if (ActiveMQRAConnectionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created connection: " + s);
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java
index bfdd0c9..b82c911 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java
@@ -33,16 +33,12 @@ public class ActiveMQRAConnectionManager implements ConnectionManager {
     * Serial version UID
     */
    static final long serialVersionUID = 4409118162975011014L;
-   /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
 
    /**
     * Constructor
     */
    public ActiveMQRAConnectionManager() {
-      if (ActiveMQRAConnectionManager.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
    }
@@ -60,14 +56,14 @@ public class ActiveMQRAConnectionManager implements ConnectionManager {
    @Override
    public Object allocateConnection(final ManagedConnectionFactory mcf,
                                     final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
-      if (ActiveMQRAConnectionManager.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")");
       }
 
       ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo);
       Object c = mc.getConnection(null, cxRequestInfo);
 
-      if (ActiveMQRAConnectionManager.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Allocated connection: " + c + ", with managed connection: " + mc);
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java
index 88da41c..901ecf4 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java
@@ -26,15 +26,10 @@ import java.util.Vector;
 public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Constructor
     */
    public ActiveMQRAConnectionMetaData() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
    }
@@ -46,7 +41,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public String getJMSVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSVersion()");
       }
 
@@ -60,7 +55,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public int getJMSMajorVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()");
       }
 
@@ -74,7 +69,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public int getJMSMinorVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()");
       }
 
@@ -88,7 +83,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public String getJMSProviderName() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSProviderName()");
       }
 
@@ -102,7 +97,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public String getProviderVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSProviderName()");
       }
 
@@ -116,7 +111,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public int getProviderMajorVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getProviderMajorVersion()");
       }
 
@@ -130,7 +125,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
     */
    @Override
    public int getProviderMinorVersion() {
-      if (ActiveMQRAConnectionMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getProviderMinorVersion()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionRequestInfo.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionRequestInfo.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionRequestInfo.java
index 29a4c2d..9ed7a45 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionRequestInfo.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionRequestInfo.java
@@ -25,11 +25,6 @@ import javax.resource.spi.ConnectionRequestInfo;
 public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The user name
     */
    private String userName;
@@ -66,7 +61,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param type The connection type
     */
    public ActiveMQRAConnectionRequestInfo(final ActiveMQRAProperties prop, final int type) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + prop + ")");
       }
 
@@ -86,7 +81,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param type            The connection type
     */
    public ActiveMQRAConnectionRequestInfo(final boolean transacted, final int acknowledgeMode, final int type) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + transacted +
                                           ", " +
                                           acknowledgeMode +
@@ -106,7 +101,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param prop The resource adapter properties
     */
    public void setDefaults(final ActiveMQRAProperties prop) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDefaults(" + prop + ")");
       }
 
@@ -127,7 +122,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return The value
     */
    public String getUserName() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUserName()");
       }
 
@@ -140,7 +135,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param userName The value
     */
    public void setUserName(final String userName) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")");
       }
 
@@ -153,7 +148,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return The value
     */
    public String getPassword() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getPassword()");
       }
 
@@ -166,7 +161,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param password The value
     */
    public void setPassword(final String password) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPassword(****)");
       }
 
@@ -179,7 +174,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return The value
     */
    public String getClientID() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getClientID()");
       }
 
@@ -192,7 +187,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @param clientID The value
     */
    public void setClientID(final String clientID) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setClientID(" + clientID + ")");
       }
 
@@ -205,7 +200,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return The type
     */
    public int getType() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getType()");
       }
 
@@ -218,7 +213,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return True if transacted; otherwise false
     */
    public boolean isTransacted() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isTransacted() " + transacted);
       }
 
@@ -231,7 +226,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     * @return The mode
     */
    public int getAcknowledgeMode() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()");
       }
 
@@ -246,7 +241,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     */
    @Override
    public boolean equals(final Object obj) {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")");
       }
 
@@ -273,7 +268,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
     */
    @Override
    public int hashCode() {
-      if (ActiveMQRAConnectionRequestInfo.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("hashCode()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java
index ee04949..f016d7a 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java
@@ -36,8 +36,6 @@ public class ActiveMQRACredential implements Serializable {
     */
    static final long serialVersionUID = 210476602237497193L;
 
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
    /**
     * The user name
     */
@@ -52,7 +50,7 @@ public class ActiveMQRACredential implements Serializable {
     * Private constructor
     */
    private ActiveMQRACredential() {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
    }
@@ -63,7 +61,7 @@ public class ActiveMQRACredential implements Serializable {
     * @return The value
     */
    public String getUserName() {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUserName()");
       }
 
@@ -76,7 +74,7 @@ public class ActiveMQRACredential implements Serializable {
     * @param userName The value
     */
    private void setUserName(final String userName) {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")");
       }
 
@@ -89,7 +87,7 @@ public class ActiveMQRACredential implements Serializable {
     * @return The value
     */
    public String getPassword() {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getPassword()");
       }
 
@@ -102,7 +100,7 @@ public class ActiveMQRACredential implements Serializable {
     * @param password The value
     */
    private void setPassword(final String password) {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPassword(****)");
       }
 
@@ -121,7 +119,7 @@ public class ActiveMQRACredential implements Serializable {
    public static ActiveMQRACredential getCredential(final ManagedConnectionFactory mcf,
                                                     final Subject subject,
                                                     final ConnectionRequestInfo info) throws SecurityException {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getCredential(" + mcf + ", " + subject + ", " + info + ")");
       }
 
@@ -152,7 +150,7 @@ public class ActiveMQRACredential implements Serializable {
     */
    @Override
    public String toString() {
-      if (ActiveMQRACredential.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("toString()");
       }
 
@@ -181,7 +179,7 @@ public class ActiveMQRACredential implements Serializable {
        * @param mcf     The managed connection factory
        */
       GetCredentialAction(final Subject subject, final ManagedConnectionFactory mcf) {
-         if (ActiveMQRACredential.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("constructor(" + subject + ", " + mcf + ")");
          }
 
@@ -196,7 +194,7 @@ public class ActiveMQRACredential implements Serializable {
        */
       @Override
       public PasswordCredential run() {
-         if (ActiveMQRACredential.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("run()");
          }
 
@@ -220,7 +218,7 @@ public class ActiveMQRACredential implements Serializable {
        * @return The credential
        */
       static PasswordCredential getCredential(final Subject subject, final ManagedConnectionFactory mcf) {
-         if (ActiveMQRACredential.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("getCredential(" + subject + ", " + mcf + ")");
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java
index 342a27f..ceab94a 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java
@@ -26,11 +26,6 @@ import javax.resource.spi.LocalTransaction;
 public class ActiveMQRALocalTransaction implements LocalTransaction {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The managed connection
     */
    private final ActiveMQRAManagedConnection mc;
@@ -41,7 +36,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
     * @param mc The managed connection
     */
    public ActiveMQRALocalTransaction(final ActiveMQRAManagedConnection mc) {
-      if (ActiveMQRALocalTransaction.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ")");
       }
 
@@ -55,7 +50,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
     */
    @Override
    public void begin() throws ResourceException {
-      if (ActiveMQRALocalTransaction.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("begin()");
       }
 
@@ -69,7 +64,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
     */
    @Override
    public void commit() throws ResourceException {
-      if (ActiveMQRALocalTransaction.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("commit()");
       }
 
@@ -93,7 +88,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
     */
    @Override
    public void rollback() throws ResourceException {
-      if (ActiveMQRALocalTransaction.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("rollback()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMCFProperties.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMCFProperties.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMCFProperties.java
index 30923fd..f6dc92b 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMCFProperties.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMCFProperties.java
@@ -29,10 +29,6 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * Serial version UID
     */
    static final long serialVersionUID = -5951352236582886862L;
-   /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
 
    /**
     * The queue type
@@ -63,7 +59,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * Constructor
     */
    public ActiveMQRAMCFProperties() {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
 
@@ -76,7 +72,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * @return The type
     */
    public int getType() {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getType()");
       }
 
@@ -88,7 +84,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
    }
 
    public void setConnectorClassName(final String connectorClassName) {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setConnectorClassName(" + connectorClassName + ")");
       }
 
@@ -115,7 +111,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * @param defaultType either javax.jms.Topic or javax.jms.Queue
     */
    public void setSessionDefaultType(final String defaultType) {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")");
       }
 
@@ -134,7 +130,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * @return The default session type
     */
    public String getSessionDefaultType() {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getSessionDefaultType()");
       }
 
@@ -153,7 +149,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * @return the useTryLock.
     */
    public Integer getUseTryLock() {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUseTryLock()");
       }
 
@@ -166,7 +162,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
     * @param useTryLock the useTryLock.
     */
    public void setUseTryLock(final Integer useTryLock) {
-      if (ActiveMQRAMCFProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java
index af3dcfb..a93965c 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java
@@ -42,10 +42,6 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * Serial version UID
     */
    static final long serialVersionUID = -1452379518562456741L;
-   /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
 
    /**
     * The resource adapter
@@ -76,7 +72,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * Constructor
     */
    public ActiveMQRAManagedConnectionFactory() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
 
@@ -93,7 +89,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public Object createConnectionFactory() throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.debug("createConnectionFactory()");
       }
 
@@ -109,7 +105,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public Object createConnectionFactory(final ConnectionManager cxManager) throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionFactory(" + cxManager + ")");
       }
 
@@ -117,7 +113,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
 
       ActiveMQRAConnectionFactory cf = new ActiveMQRAConnectionFactoryImpl(this, cm);
 
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Created connection factory: " + cf +
                                           ", using connection manager: " +
                                           cm);
@@ -136,7 +132,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
    @Override
    public ManagedConnection createManagedConnection(final Subject subject,
                                                     final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")");
       }
 
@@ -144,13 +140,13 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
 
       ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri);
 
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("jms credential: " + credential);
       }
 
       ActiveMQRAManagedConnection mc = new ActiveMQRAManagedConnection(this, cri, ra, credential.getUserName(), credential.getPassword());
 
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("created new managed connection: " + mc);
       }
 
@@ -186,7 +182,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
    public ManagedConnection matchManagedConnections(final Set connectionSet,
                                                     final Subject subject,
                                                     final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("matchManagedConnections(" + connectionSet +
                                           ", " +
                                           subject +
@@ -198,7 +194,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
       ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo);
       ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri);
 
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("Looking for connection matching credentials: " + credential);
       }
 
@@ -209,7 +205,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
 
             if ((mc.getUserName() == null || mc.getUserName() != null && mc.getUserName().equals(credential.getUserName())) && mcf.equals(this)) {
                if (cri.equals(mc.getCRI())) {
-                  if (ActiveMQRAManagedConnectionFactory.trace) {
+                  if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
                      ActiveMQRALogger.LOGGER.trace("Found matching connection: " + mc);
                   }
 
@@ -219,7 +215,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
          }
       }
 
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("No matching connection was found");
       }
 
@@ -234,7 +230,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public void setLogWriter(final PrintWriter out) throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setLogWriter(" + out + ")");
       }
    }
@@ -247,7 +243,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public PrintWriter getLogWriter() throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getLogWriter()");
       }
 
@@ -261,7 +257,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public ResourceAdapter getResourceAdapter() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getResourceAdapter()");
       }
 
@@ -282,7 +278,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")");
       }
 
@@ -302,7 +298,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public boolean equals(final Object obj) {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")");
       }
 
@@ -326,7 +322,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     */
    @Override
    public int hashCode() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("hashCode()");
       }
 
@@ -342,7 +338,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @return The value
     */
    public String getSessionDefaultType() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getSessionDefaultType()");
       }
 
@@ -355,7 +351,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @param type either javax.jms.Topic or javax.jms.Queue
     */
    public void setSessionDefaultType(final String type) {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")");
       }
 
@@ -639,7 +635,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @return the useTryLock.
     */
    public Integer getUseTryLock() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUseTryLock()");
       }
 
@@ -652,7 +648,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @param useTryLock the useTryLock.
     */
    public void setUseTryLock(final Integer useTryLock) {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")");
       }
 
@@ -665,7 +661,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @return The metadata
     */
    public ConnectionMetaData getMetaData() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMetadata()");
       }
 
@@ -678,7 +674,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @return The properties
     */
    protected ActiveMQRAMCFProperties getProperties() {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getProperties()");
       }
 
@@ -692,7 +688,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
     * @return The instance
     */
    private ActiveMQRAConnectionRequestInfo getCRI(final ActiveMQRAConnectionRequestInfo info) {
-      if (ActiveMQRAManagedConnectionFactory.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getCRI(" + info + ")");
       }
 


[3/4] activemq-artemis git commit: ARTEMIS-2121 reload logging config at runtime

Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java
index 70e5005..f70385a 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java
@@ -27,11 +27,6 @@ import java.util.Enumeration;
 public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessage {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param message the message
@@ -40,7 +35,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
    public ActiveMQRAMapMessage(final MapMessage message, final ActiveMQRASession session) {
       super(message, session);
 
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
    }
@@ -54,7 +49,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public boolean getBoolean(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getBoolean(" + name + ")");
       }
 
@@ -70,7 +65,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public byte getByte(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getByte(" + name + ")");
       }
 
@@ -86,7 +81,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public byte[] getBytes(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getBytes(" + name + ")");
       }
 
@@ -102,7 +97,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public char getChar(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getChar(" + name + ")");
       }
 
@@ -118,7 +113,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public double getDouble(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDouble(" + name + ")");
       }
 
@@ -134,7 +129,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public float getFloat(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getFloat(" + name + ")");
       }
 
@@ -150,7 +145,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public int getInt(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getInt(" + name + ")");
       }
 
@@ -166,7 +161,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public long getLong(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getLong(" + name + ")");
       }
 
@@ -181,7 +176,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public Enumeration getMapNames() throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMapNames()");
       }
 
@@ -197,7 +192,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public Object getObject(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getObject(" + name + ")");
       }
 
@@ -213,7 +208,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public short getShort(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getShort(" + name + ")");
       }
 
@@ -229,7 +224,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public String getString(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getString(" + name + ")");
       }
 
@@ -245,7 +240,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public boolean itemExists(final String name) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("itemExists(" + name + ")");
       }
 
@@ -261,7 +256,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setBoolean(final String name, final boolean value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBoolean(" + name + ", " + value + ")");
       }
 
@@ -277,7 +272,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setByte(final String name, final byte value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setByte(" + name + ", " + value + ")");
       }
 
@@ -295,7 +290,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ", " + offset + ", " +
                                           length + ")");
       }
@@ -312,7 +307,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setBytes(final String name, final byte[] value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ")");
       }
 
@@ -328,7 +323,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setChar(final String name, final char value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setChar(" + name + ", " + value + ")");
       }
 
@@ -344,7 +339,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setDouble(final String name, final double value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDouble(" + name + ", " + value + ")");
       }
 
@@ -360,7 +355,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setFloat(final String name, final float value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setFloat(" + name + ", " + value + ")");
       }
 
@@ -376,7 +371,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setInt(final String name, final int value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setInt(" + name + ", " + value + ")");
       }
 
@@ -392,7 +387,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setLong(final String name, final long value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setLong(" + name + ", " + value + ")");
       }
 
@@ -408,7 +403,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setObject(final String name, final Object value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setObject(" + name + ", " + value + ")");
       }
 
@@ -424,7 +419,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setShort(final String name, final short value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setShort(" + name + ", " + value + ")");
       }
 
@@ -440,7 +435,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
     */
    @Override
    public void setString(final String name, final String value) throws JMSException {
-      if (ActiveMQRAMapMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setString(" + name + ", " + value + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java
index 9b49466..39d9fa9 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java
@@ -28,11 +28,6 @@ import java.util.Enumeration;
 public class ActiveMQRAMessage implements Message {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The message
     */
    protected Message message;
@@ -49,7 +44,7 @@ public class ActiveMQRAMessage implements Message {
     * @param session the session
     */
    public ActiveMQRAMessage(final Message message, final ActiveMQRASession session) {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
 
@@ -64,7 +59,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void acknowledge() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("acknowledge()");
       }
 
@@ -79,7 +74,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void clearBody() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("clearBody()");
       }
 
@@ -93,7 +88,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void clearProperties() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("clearProperties()");
       }
 
@@ -109,7 +104,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public boolean getBooleanProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getBooleanProperty(" + name + ")");
       }
 
@@ -125,7 +120,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public byte getByteProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getByteProperty(" + name + ")");
       }
 
@@ -141,7 +136,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public double getDoubleProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDoubleProperty(" + name + ")");
       }
 
@@ -157,7 +152,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public float getFloatProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getFloatProperty(" + name + ")");
       }
 
@@ -173,7 +168,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public int getIntProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getIntProperty(" + name + ")");
       }
 
@@ -188,7 +183,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public String getJMSCorrelationID() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSCorrelationID()");
       }
 
@@ -203,7 +198,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSCorrelationIDAsBytes()");
       }
 
@@ -218,7 +213,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public int getJMSDeliveryMode() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSDeliveryMode()");
       }
 
@@ -233,7 +228,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public Destination getJMSDestination() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSDestination()");
       }
 
@@ -248,7 +243,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public long getJMSExpiration() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSExpiration()");
       }
 
@@ -263,7 +258,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public String getJMSMessageID() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSMessageID()");
       }
 
@@ -278,7 +273,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public int getJMSPriority() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSPriority()");
       }
 
@@ -293,7 +288,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public boolean getJMSRedelivered() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSRedelivered()");
       }
 
@@ -308,7 +303,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public Destination getJMSReplyTo() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSReplyTo()");
       }
 
@@ -323,7 +318,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public long getJMSTimestamp() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSTimestamp()");
       }
 
@@ -338,7 +333,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public String getJMSType() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSType()");
       }
 
@@ -354,7 +349,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public long getLongProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getLongProperty(" + name + ")");
       }
 
@@ -370,7 +365,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public Object getObjectProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getObjectProperty(" + name + ")");
       }
 
@@ -385,7 +380,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public Enumeration getPropertyNames() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getPropertyNames()");
       }
 
@@ -401,7 +396,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public short getShortProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getShortProperty(" + name + ")");
       }
 
@@ -417,7 +412,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public String getStringProperty(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getStringProperty(" + name + ")");
       }
 
@@ -433,7 +428,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public boolean propertyExists(final String name) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("propertyExists(" + name + ")");
       }
 
@@ -449,7 +444,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setBooleanProperty(final String name, final boolean value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setBooleanProperty(" + name + ", " + value + ")");
       }
 
@@ -465,7 +460,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setByteProperty(final String name, final byte value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setByteProperty(" + name + ", " + value + ")");
       }
 
@@ -481,7 +476,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setDoubleProperty(final String name, final double value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDoubleProperty(" + name + ", " + value + ")");
       }
 
@@ -497,7 +492,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setFloatProperty(final String name, final float value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setFloatProperty(" + name + ", " + value + ")");
       }
 
@@ -513,7 +508,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setIntProperty(final String name, final int value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setIntProperty(" + name + ", " + value + ")");
       }
 
@@ -528,7 +523,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSCorrelationID(final String correlationID) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSCorrelationID(" + correlationID + ")");
       }
 
@@ -543,7 +538,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSCorrelationIDAsBytes(" + Arrays.toString(correlationID) + ")");
       }
 
@@ -558,7 +553,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSDeliveryMode(final int deliveryMode) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSDeliveryMode(" + deliveryMode + ")");
       }
 
@@ -573,7 +568,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSDestination(final Destination destination) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSDestination(" + destination + ")");
       }
 
@@ -588,7 +583,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSExpiration(final long expiration) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSExpiration(" + expiration + ")");
       }
 
@@ -603,7 +598,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSMessageID(final String id) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSMessageID(" + id + ")");
       }
 
@@ -618,7 +613,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSPriority(final int priority) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSPriority(" + priority + ")");
       }
 
@@ -633,7 +628,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSRedelivered(final boolean redelivered) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")");
       }
 
@@ -648,7 +643,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSReplyTo(final Destination replyTo) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSReplyTo(" + replyTo + ")");
       }
 
@@ -663,7 +658,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSTimestamp(final long timestamp) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSTimestamp(" + timestamp + ")");
       }
 
@@ -678,7 +673,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setJMSType(final String type) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSType(" + type + ")");
       }
 
@@ -694,7 +689,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setLongProperty(final String name, final long value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setLongProperty(" + name + ", " + value + ")");
       }
 
@@ -710,7 +705,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setObjectProperty(final String name, final Object value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setObjectProperty(" + name + ", " + value + ")");
       }
 
@@ -726,7 +721,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setShortProperty(final String name, final short value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setShortProperty(" + name + ", " + value + ")");
       }
 
@@ -742,7 +737,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public void setStringProperty(final String name, final String value) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setStringProperty(" + name + ", " + value + ")");
       }
 
@@ -751,7 +746,7 @@ public class ActiveMQRAMessage implements Message {
 
    @Override
    public long getJMSDeliveryTime() throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getJMSDeliveryTime()");
       }
       return message.getJMSDeliveryTime();
@@ -760,7 +755,7 @@ public class ActiveMQRAMessage implements Message {
    @Override
    public void setJMSDeliveryTime(long deliveryTime) throws JMSException {
 
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setJMSDeliveryTime(" + deliveryTime + ")");
       }
       message.setJMSDeliveryTime(deliveryTime);
@@ -768,7 +763,7 @@ public class ActiveMQRAMessage implements Message {
 
    @Override
    public <T> T getBody(Class<T> c) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getBody(" + c + ")");
       }
       return message.getBody(c);
@@ -776,7 +771,7 @@ public class ActiveMQRAMessage implements Message {
 
    @Override
    public boolean isBodyAssignableTo(Class c) throws JMSException {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isBodyAssignableTo(" + c + ")");
       }
       return message.isBodyAssignableTo(c);
@@ -789,7 +784,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public int hashCode() {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("hashCode()");
       }
 
@@ -804,7 +799,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public boolean equals(final Object object) {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("equals(" + object + ")");
       }
 
@@ -822,7 +817,7 @@ public class ActiveMQRAMessage implements Message {
     */
    @Override
    public String toString() {
-      if (ActiveMQRAMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("toString()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java
index 0e156aa..d4cafbf 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java
@@ -32,11 +32,6 @@ import javax.jms.TextMessage;
 public class ActiveMQRAMessageConsumer implements MessageConsumer {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The wrapped message consumer
     */
    protected MessageConsumer consumer;
@@ -56,7 +51,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
       this.consumer = consumer;
       this.session = session;
 
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("new ActiveMQMessageConsumer " + this +
                                           " consumer=" +
                                           consumer +
@@ -72,7 +67,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     */
    @Override
    public void close() throws JMSException {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("close " + this);
       }
       try {
@@ -88,7 +83,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     * @throws JMSException Thrown if an error occurs
     */
    void checkState() throws JMSException {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("checkState()");
       }
       session.checkState();
@@ -102,7 +97,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     */
    @Override
    public MessageListener getMessageListener() throws JMSException {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMessageListener()");
       }
 
@@ -141,7 +136,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     */
    @Override
    public String getMessageSelector() throws JMSException {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMessageSelector()");
       }
 
@@ -159,14 +154,14 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
    public Message receive() throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("receive " + this);
          }
 
          checkState();
          Message message = consumer.receive();
 
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message);
          }
 
@@ -191,14 +186,14 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
    public Message receive(final long timeout) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("receive " + this + " timeout=" + timeout);
          }
 
          checkState();
          Message message = consumer.receive(timeout);
 
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message);
          }
 
@@ -222,14 +217,14 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
    public Message receiveNoWait() throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("receiveNoWait " + this);
          }
 
          checkState();
          Message message = consumer.receiveNoWait();
 
-         if (ActiveMQRAMessageConsumer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message);
          }
 
@@ -249,7 +244,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     * @throws JMSException Thrown if an error occurs
     */
    void closeConsumer() throws JMSException {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("closeConsumer()");
       }
 
@@ -263,7 +258,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     * @return The wrapped message
     */
    Message wrapMessage(final Message message) {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("wrapMessage(" + message + ")");
       }
 
@@ -288,7 +283,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
     * @return The wrapped listener
     */
    MessageListener wrapMessageListener(final MessageListener listener) {
-      if (ActiveMQRAMessageConsumer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMessageSelector()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java
index 8ad0736..1663938 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java
@@ -25,11 +25,6 @@ import javax.jms.MessageListener;
 public class ActiveMQRAMessageListener implements MessageListener {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The message listener
     */
    private final MessageListener listener;
@@ -46,7 +41,7 @@ public class ActiveMQRAMessageListener implements MessageListener {
     * @param consumer the consumer
     */
    public ActiveMQRAMessageListener(final MessageListener listener, final ActiveMQRAMessageConsumer consumer) {
-      if (ActiveMQRAMessageListener.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + listener + ", " + consumer + ")");
       }
 
@@ -61,7 +56,7 @@ public class ActiveMQRAMessageListener implements MessageListener {
     */
    @Override
    public void onMessage(Message message) {
-      if (ActiveMQRAMessageListener.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("onMessage(" + message + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java
index 447c824..12ece05 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java
@@ -28,11 +28,6 @@ import javax.jms.MessageProducer;
 public class ActiveMQRAMessageProducer implements MessageProducer {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The wrapped message producer
     */
    protected MessageProducer producer;
@@ -52,7 +47,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
       this.producer = producer;
       this.session = session;
 
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("new ActiveMQMessageProducer " + this +
                                           " producer=" +
                                           producer +
@@ -68,7 +63,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void close() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("close " + this);
       }
       try {
@@ -96,7 +91,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
                     final long timeToLive) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this +
                                              " destination=" +
                                              destination +
@@ -114,7 +109,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
          producer.send(destination, message, deliveryMode, priority, timeToLive);
 
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -133,7 +128,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
    public void send(final Destination destination, final Message message) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message);
          }
 
@@ -141,7 +136,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
          producer.send(destination, message);
 
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -165,7 +160,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
                     final long timeToLive) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this +
                                              " message=" +
                                              message +
@@ -181,7 +176,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
          producer.send(message, deliveryMode, priority, timeToLive);
 
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -199,7 +194,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
    public void send(final Message message) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message);
          }
 
@@ -207,7 +202,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
          producer.send(message);
 
-         if (ActiveMQRAMessageProducer.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -223,7 +218,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public int getDeliveryMode() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getRoutingType()");
       }
 
@@ -238,7 +233,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public Destination getDestination() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDestination()");
       }
 
@@ -253,7 +248,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public boolean getDisableMessageID() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDisableMessageID()");
       }
 
@@ -268,7 +263,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public boolean getDisableMessageTimestamp() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDisableMessageTimestamp()");
       }
 
@@ -283,7 +278,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public int getPriority() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getPriority()");
       }
 
@@ -298,7 +293,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public long getTimeToLive() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTimeToLive()");
       }
 
@@ -313,7 +308,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void setDeliveryMode(final int deliveryMode) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setRoutingType(" + deliveryMode + ")");
       }
 
@@ -328,7 +323,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void setDisableMessageID(final boolean value) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDisableMessageID(" + value + ")");
       }
 
@@ -343,7 +338,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void setDisableMessageTimestamp(final boolean value) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDisableMessageTimestamp(" + value + ")");
       }
 
@@ -358,7 +353,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void setPriority(final int defaultPriority) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPriority(" + defaultPriority + ")");
       }
 
@@ -373,7 +368,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
     */
    @Override
    public void setTimeToLive(final long timeToLive) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setTimeToLive(" + timeToLive + ")");
       }
 
@@ -382,7 +377,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
    @Override
    public void setDeliveryDelay(long deliveryDelay) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setDeliveryDelay(" + deliveryDelay + ")");
       }
       producer.setDeliveryDelay(deliveryDelay);
@@ -390,7 +385,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
    @Override
    public long getDeliveryDelay() throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getDeliveryDelay()");
       }
       return producer.getDeliveryDelay();
@@ -398,7 +393,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
 
    @Override
    public void send(Message message, CompletionListener completionListener) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("send(" + message + ", " + completionListener + ")");
       }
       producer.send(message, completionListener);
@@ -410,7 +405,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
                     int priority,
                     long timeToLive,
                     CompletionListener completionListener) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("send(" + message + ", " + deliveryMode + ", " + priority + ", " + timeToLive +
                                           ", " + completionListener + ")");
       }
@@ -421,7 +416,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
    public void send(Destination destination,
                     Message message,
                     CompletionListener completionListener) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + completionListener + ")");
       }
       producer.send(destination, message, completionListener);
@@ -434,7 +429,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
                     int priority,
                     long timeToLive,
                     CompletionListener completionListener) throws JMSException {
-      if (ActiveMQRAMessageProducer.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + deliveryMode + ", " + priority +
                                           ", " + timeToLive + ", " + completionListener + ")");
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java
index 387b886..b0cf96a 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java
@@ -25,11 +25,6 @@ import javax.resource.spi.ManagedConnectionMetaData;
 public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The managed connection
     */
    private final ActiveMQRAManagedConnection mc;
@@ -40,7 +35,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
     * @param mc The managed connection
     */
    public ActiveMQRAMetaData(final ActiveMQRAManagedConnection mc) {
-      if (ActiveMQRAMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ")");
       }
 
@@ -55,7 +50,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
     */
    @Override
    public String getEISProductName() throws ResourceException {
-      if (ActiveMQRAMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getEISProductName()");
       }
 
@@ -70,7 +65,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
     */
    @Override
    public String getEISProductVersion() throws ResourceException {
-      if (ActiveMQRAMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getEISProductVersion()");
       }
 
@@ -85,7 +80,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
     */
    @Override
    public String getUserName() throws ResourceException {
-      if (ActiveMQRAMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUserName()");
       }
 
@@ -100,7 +95,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
     */
    @Override
    public int getMaxConnections() throws ResourceException {
-      if (ActiveMQRAMetaData.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMaxConnections()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java
index a01575c..d12baac 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java
@@ -26,11 +26,6 @@ import java.io.Serializable;
 public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements ObjectMessage {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param message the message
@@ -39,7 +34,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
    public ActiveMQRAObjectMessage(final ObjectMessage message, final ActiveMQRASession session) {
       super(message, session);
 
-      if (ActiveMQRAObjectMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
    }
@@ -52,7 +47,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
     */
    @Override
    public Serializable getObject() throws JMSException {
-      if (ActiveMQRAObjectMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getObject()");
       }
 
@@ -67,7 +62,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
     */
    @Override
    public void setObject(final Serializable object) throws JMSException {
-      if (ActiveMQRAObjectMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setObject(" + object + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAProperties.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAProperties.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAProperties.java
index 10b281d..7543174 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAProperties.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAProperties.java
@@ -32,10 +32,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * Serial version UID
     */
    static final long serialVersionUID = -2772367477755473248L;
-   /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
+
    protected boolean allowLocalTransactions;
 
    protected boolean useTopologyForLoadBalancing = ActiveMQClient.DEFAULT_USE_TOPOLOGY_FOR_LOADBALANCING;
@@ -87,7 +84,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * Constructor
     */
    public ActiveMQRAProperties() {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor()");
       }
    }
@@ -98,7 +95,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @return The value
     */
    public String getUserName() {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUserName()");
       }
 
@@ -111,7 +108,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @param userName The value
     */
    public void setUserName(final String userName) {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")");
       }
 
@@ -124,7 +121,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @return The value
     */
    public String getPassword() {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getPassword()");
       }
 
@@ -142,7 +139,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @param password The value
     */
    public void setPassword(final String password) {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPassword(****)");
       }
 
@@ -180,7 +177,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @return The value
     */
    public Boolean getUseLocalTx() {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getUseLocalTx()");
       }
 
@@ -193,7 +190,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
     * @param localTx The value
     */
    public void setUseLocalTx(final Boolean localTx) {
-      if (ActiveMQRAProperties.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUseLocalTx(" + localTx + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java
index bfd8227..e3cbe82 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java
@@ -26,11 +26,6 @@ import javax.jms.QueueReceiver;
 public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implements QueueReceiver {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param consumer the queue receiver
@@ -39,7 +34,7 @@ public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implement
    public ActiveMQRAQueueReceiver(final QueueReceiver consumer, final ActiveMQRASession session) {
       super(consumer, session);
 
-      if (ActiveMQRAQueueReceiver.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")");
       }
    }
@@ -52,7 +47,7 @@ public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implement
     */
    @Override
    public Queue getQueue() throws JMSException {
-      if (ActiveMQRAQueueReceiver.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getQueue()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java
index 47a7acb..2753d3d 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java
@@ -27,11 +27,6 @@ import javax.jms.QueueSender;
 public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements QueueSender {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param producer the producer
@@ -40,7 +35,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
    public ActiveMQRAQueueSender(final QueueSender producer, final ActiveMQRASession session) {
       super(producer, session);
 
-      if (ActiveMQRAQueueSender.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")");
       }
    }
@@ -53,7 +48,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
     */
    @Override
    public Queue getQueue() throws JMSException {
-      if (ActiveMQRAQueueSender.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getQueue()");
       }
 
@@ -78,7 +73,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
                     final long timeToLive) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAQueueSender.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this +
                                              " destination=" +
                                              destination +
@@ -95,7 +90,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
          checkState();
          producer.send(destination, message, deliveryMode, priority, timeToLive);
 
-         if (ActiveMQRAQueueSender.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -114,14 +109,14 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
    public void send(final Queue destination, final Message message) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRAQueueSender.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message);
          }
 
          checkState();
          producer.send(destination, message);
 
-         if (ActiveMQRAQueueSender.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {


[2/4] activemq-artemis git commit: ARTEMIS-2121 reload logging config at runtime

Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java
index ac14c00..8ac9c36 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java
@@ -62,11 +62,6 @@ import org.apache.activemq.artemis.jms.client.ActiveMQSession;
 public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSession, XATopicSession {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The managed connection
     */
    private ActiveMQRAManagedConnection mc;
@@ -98,7 +93,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param cri The connection request info
     */
    public ActiveMQRASession(final ActiveMQRAManagedConnection mc, final ActiveMQRAConnectionRequestInfo cri) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ", " + cri + ")");
       }
 
@@ -115,7 +110,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param sf The session factory
     */
    public void setActiveMQSessionFactory(final ActiveMQRASessionFactory sf) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setActiveMQSessionFactory(" + sf + ")");
       }
 
@@ -129,7 +124,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @throws IllegalStateException The session is closed
     */
    protected void lock() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("lock()");
       }
 
@@ -145,7 +140,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * Unlock
     */
    protected void unlock() {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("unlock()");
       }
 
@@ -168,7 +163,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public BytesMessage createBytesMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createBytesMessage" + session);
       }
 
@@ -185,7 +180,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public MapMessage createMapMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createMapMessage(), " + session);
       }
 
@@ -202,7 +197,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public Message createMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createMessage" + session);
       }
 
@@ -219,7 +214,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public ObjectMessage createObjectMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createObjectMessage" + session);
       }
 
@@ -237,7 +232,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public ObjectMessage createObjectMessage(final Serializable object) throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createObjectMessage(" + object + ")" + session);
       }
 
@@ -254,7 +249,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public StreamMessage createStreamMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createStreamMessage" + session);
       }
 
@@ -271,7 +266,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public TextMessage createTextMessage() throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTextMessage" + session);
       }
 
@@ -289,7 +284,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
    public TextMessage createTextMessage(final String string) throws JMSException {
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTextMessage(" + string + ")" + session);
       }
 
@@ -304,7 +299,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public boolean getTransacted() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTransacted()");
       }
 
@@ -320,7 +315,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public MessageListener getMessageListener() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMessageListener()");
       }
 
@@ -335,7 +330,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public void setMessageListener(final MessageListener listener) throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setMessageListener(" + listener + ")");
       }
 
@@ -349,7 +344,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public void run() {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("run()");
       }
 
@@ -364,7 +359,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public void close() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("close()");
       }
 
@@ -392,7 +387,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
             throw new IllegalStateException("Session is not transacted");
          }
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("Commit session " + this);
          }
 
@@ -422,7 +417,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
             throw new IllegalStateException("Session is not transacted");
          }
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("Rollback session " + this);
          }
 
@@ -447,7 +442,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
             throw new IllegalStateException("Session is transacted");
          }
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("Recover session " + this);
          }
 
@@ -472,13 +467,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
 
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTopic " + session + " topicName=" + topicName);
       }
 
       Topic result = session.createTopic(topicName);
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createdTopic " + session + " topic=" + result);
       }
 
@@ -498,14 +493,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          TopicSession session = getTopicSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSubscriber " + session + " topic=" + topic);
          }
 
          TopicSubscriber result = session.createSubscriber(topic);
          result = new ActiveMQRATopicSubscriber(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
          }
 
@@ -534,7 +529,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          TopicSession session = getTopicSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSubscriber " + session +
                                              " topic=" +
                                              topic +
@@ -547,7 +542,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          TopicSubscriber result = session.createSubscriber(topic, messageSelector, noLocal);
          result = new ActiveMQRATopicSubscriber(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
          }
 
@@ -577,14 +572,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createDurableSubscriber " + session + " topic=" + topic + " name=" + name);
          }
 
          TopicSubscriber result = session.createDurableSubscriber(topic, name);
          result = new ActiveMQRATopicSubscriber(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
          }
 
@@ -615,7 +610,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createDurableSubscriber " + session +
                                              " topic=" +
                                              topic +
@@ -630,7 +625,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          TopicSubscriber result = session.createDurableSubscriber(topic, name, messageSelector, noLocal);
          result = new ActiveMQRATopicSubscriber(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
          }
 
@@ -655,14 +650,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          TopicSession session = getTopicSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createPublisher " + session + " topic=" + topic);
          }
 
          TopicPublisher result = session.createPublisher(topic);
          result = new ActiveMQRATopicPublisher(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdPublisher " + session + " publisher=" + result);
          }
 
@@ -690,13 +685,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createTemporaryTopic " + session);
          }
 
          TemporaryTopic temp = session.createTemporaryTopic();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdTemporaryTopic " + session + " temp=" + temp);
          }
 
@@ -724,7 +719,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("unsubscribe " + session + " name=" + name);
          }
 
@@ -749,13 +744,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
 
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue);
       }
 
       QueueBrowser result = session.createBrowser(queue);
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result);
       }
 
@@ -778,13 +773,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
 
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue + " selector=" + messageSelector);
       }
 
       QueueBrowser result = session.createBrowser(queue, messageSelector);
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result);
       }
 
@@ -806,13 +801,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
 
       Session session = getSessionInternal();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createQueue " + session + " queueName=" + queueName);
       }
 
       Queue result = session.createQueue(queueName);
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createdQueue " + session + " queue=" + result);
       }
 
@@ -832,14 +827,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          QueueSession session = getQueueSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue);
          }
 
          QueueReceiver result = session.createReceiver(queue);
          result = new ActiveMQRAQueueReceiver(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result);
          }
 
@@ -865,14 +860,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          QueueSession session = getQueueSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue + " selector=" + messageSelector);
          }
 
          QueueReceiver result = session.createReceiver(queue, messageSelector);
          result = new ActiveMQRAQueueReceiver(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result);
          }
 
@@ -897,14 +892,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          QueueSession session = getQueueSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSender " + session + " queue=" + queue);
          }
 
          QueueSender result = session.createSender(queue);
          result = new ActiveMQRAQueueSender(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdSender " + session + " sender=" + result);
          }
 
@@ -932,13 +927,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createTemporaryQueue " + session);
          }
 
          TemporaryQueue temp = session.createTemporaryQueue();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdTemporaryQueue " + session + " temp=" + temp);
          }
 
@@ -963,14 +958,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createConsumer " + session + " dest=" + destination);
          }
 
          MessageConsumer result = session.createConsumer(destination);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -997,7 +992,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createConsumer " + session +
                                              " dest=" +
                                              destination +
@@ -1008,7 +1003,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createConsumer(destination, messageSelector);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1037,7 +1032,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createConsumer " + session +
                                              " dest=" +
                                              destination +
@@ -1050,7 +1045,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createConsumer(destination, messageSelector, noLocal);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1075,14 +1070,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createProducer " + session + " dest=" + destination);
          }
 
          MessageProducer result = session.createProducer(destination);
          result = new ActiveMQRAMessageProducer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdProducer " + session + " producer=" + result);
          }
 
@@ -1102,7 +1097,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public int getAcknowledgeMode() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()");
       }
 
@@ -1115,7 +1110,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public XAResource getXAResource() {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getXAResource()");
       }
 
@@ -1154,7 +1149,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public Session getSession() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getNonXAsession()");
       }
 
@@ -1179,7 +1174,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public QueueSession getQueueSession() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getQueueSession()");
       }
 
@@ -1204,7 +1199,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     */
    @Override
    public TopicSession getTopicSession() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTopicSession()");
       }
 
@@ -1228,14 +1223,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", sharedSubscriptionName=" + sharedSubscriptionName);
          }
 
          MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1255,7 +1250,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic +
                                              ", sharedSubscriptionName=" + sharedSubscriptionName + ", messageSelector=" + messageSelector);
          }
@@ -1263,7 +1258,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1281,14 +1276,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", name=" + name);
          }
 
          MessageConsumer result = session.createDurableConsumer(topic, name);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1309,7 +1304,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createDurableConsumer " + session + " topic=" + topic + ", name=" + name +
                                              ", messageSelector=" + messageSelector + ", noLocal=" + noLocal);
          }
@@ -1317,7 +1312,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createDurableConsumer(topic, name, messageSelector, noLocal);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1335,7 +1330,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" +
                                              name);
          }
@@ -1343,7 +1338,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createSharedDurableConsumer(topic, name);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1363,7 +1358,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          Session session = getSessionInternal();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" +
                                              name + ", messageSelector=" + messageSelector);
          }
@@ -1371,7 +1366,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
          MessageConsumer result = session.createSharedDurableConsumer(topic, name, messageSelector);
          result = new ActiveMQRAMessageConsumer(result, this);
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result);
          }
 
@@ -1389,7 +1384,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param managedConnection The managed connection
     */
    void setManagedConnection(final ActiveMQRAManagedConnection managedConnection) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setManagedConnection(" + managedConnection + ")");
       }
 
@@ -1411,7 +1406,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * Destroy
     */
    void destroy() {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("destroy()");
       }
 
@@ -1424,7 +1419,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @throws JMSException Thrown if an error occurs
     */
    void start() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("start()");
       }
 
@@ -1439,7 +1434,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @throws JMSException Thrown if an error occurs
     */
    void stop() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("stop()");
       }
 
@@ -1454,7 +1449,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @throws JMSException Thrown if an error occurs
     */
    void checkStrict() throws JMSException {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("checkStrict()");
       }
 
@@ -1516,7 +1511,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param consumer The consumer
     */
    void addConsumer(final MessageConsumer consumer) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("addConsumer(" + consumer + ")");
       }
 
@@ -1531,7 +1526,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param consumer The consumer
     */
    void removeConsumer(final MessageConsumer consumer) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("removeConsumer(" + consumer + ")");
       }
 
@@ -1546,7 +1541,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param producer The producer
     */
    void addProducer(final MessageProducer producer) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("addProducer(" + producer + ")");
       }
 
@@ -1561,7 +1556,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
     * @param producer The producer
     */
    void removeProducer(final MessageProducer producer) {
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("removeProducer(" + producer + ")");
       }
 
@@ -1584,7 +1579,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
 
       Session session = mc.getSession();
 
-      if (ActiveMQRASession.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getSessionInternal " + session + " for " + this);
       }
 
@@ -1606,7 +1601,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
       try {
          XAResource xares = mc.getXAResource();
 
-         if (ActiveMQRASession.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("getXAResourceInternal " + xares + " for " + this);
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
index 0716bac..4073438 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
@@ -55,11 +55,6 @@ import org.apache.activemq.artemis.jms.client.ActiveMQConnectionForContextImpl;
 public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForContextImpl implements ActiveMQRASessionFactory, ActiveMQConnectionForContext, Referenceable {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Are we closed?
     */
    private boolean closed = false;
@@ -145,7 +140,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
 
       this.type = type;
 
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ", " + type);
       }
    }
@@ -196,7 +191,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void setReference(final Reference reference) {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")");
       }
 
@@ -210,7 +205,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public Reference getReference() {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getReference()");
       }
 
@@ -223,7 +218,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     * @param name The user name
     */
    public void setUserName(final String name) {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setUserName(" + name + ")");
       }
 
@@ -236,7 +231,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     * @param password The password
     */
    public void setPassword(final String password) {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setPassword(****)");
       }
 
@@ -251,7 +246,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public String getClientID() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getClientID()");
       }
 
@@ -272,7 +267,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void setClientID(final String cID) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setClientID(" + cID + ")");
       }
 
@@ -289,7 +284,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")");
       }
 
@@ -310,7 +305,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public XAQueueSession createXAQueueSession() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXAQueueSession()");
       }
 
@@ -339,7 +334,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                       final String messageSelector,
                                                       final ServerSessionPool sessionPool,
                                                       final int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + queue +
                                           ", " +
                                           messageSelector +
@@ -363,7 +358,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")");
       }
 
@@ -384,7 +379,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public XATopicSession createXATopicSession() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXATopicSession()");
       }
 
@@ -413,7 +408,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                       final String messageSelector,
                                                       final ServerSessionPool sessionPool,
                                                       final int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic +
                                           ", " +
                                           messageSelector +
@@ -444,7 +439,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                              final String messageSelector,
                                                              final ServerSessionPool sessionPool,
                                                              final int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic +
                                           ", " +
                                           subscriptionName +
@@ -472,7 +467,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
    public ConnectionConsumer createConnectionConsumer(final Destination destination,
                                                       final ServerSessionPool pool,
                                                       final int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination +
                                           ", " +
                                           pool +
@@ -499,7 +494,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                       final String name,
                                                       final ServerSessionPool pool,
                                                       final int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination +
                                           ", " +
                                           name +
@@ -523,7 +518,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createSession(" + transacted + ", " + acknowledgeMode + ")");
       }
 
@@ -539,7 +534,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public XASession createXASession() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createXASession()");
       }
 
@@ -555,7 +550,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public ConnectionMetaData getMetaData() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getMetaData()");
       }
 
@@ -571,7 +566,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public ExceptionListener getExceptionListener() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getExceptionListener()");
       }
 
@@ -586,7 +581,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void setExceptionListener(final ExceptionListener listener) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setExceptionListener(" + listener + ")");
       }
 
@@ -602,7 +597,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
    public void start() throws JMSException {
       checkClosed();
 
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("start() " + this);
       }
 
@@ -625,7 +620,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void stop() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("stop() " + this);
       }
 
@@ -639,7 +634,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void close() throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("close() " + this);
       }
 
@@ -665,7 +660,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
          for (Iterator<TemporaryQueue> i = tempQueues.iterator(); i.hasNext(); ) {
             TemporaryQueue temp = i.next();
             try {
-               if (ActiveMQRASessionFactoryImpl.trace) {
+               if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
                   ActiveMQRALogger.LOGGER.trace("Closing temporary queue " + temp + " for " + this);
                }
                temp.delete();
@@ -680,7 +675,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
          for (Iterator<TemporaryTopic> i = tempTopics.iterator(); i.hasNext(); ) {
             TemporaryTopic temp = i.next();
             try {
-               if (ActiveMQRASessionFactoryImpl.trace) {
+               if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
                   ActiveMQRALogger.LOGGER.trace("Closing temporary topic " + temp + " for " + this);
                }
                temp.delete();
@@ -700,7 +695,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void closeSession(final ActiveMQRASession session) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("closeSession(" + session + ")");
       }
 
@@ -716,7 +711,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void addTemporaryQueue(final TemporaryQueue temp) {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("addTemporaryQueue(" + temp + ")");
       }
 
@@ -732,7 +727,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     */
    @Override
    public void addTemporaryTopic(final TemporaryTopic temp) {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("addTemporaryTopic(" + temp + ")");
       }
 
@@ -757,7 +752,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                             String messageSelector,
                                                             ServerSessionPool sessionPool,
                                                             int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createSharedConnectionConsumer(" + topic + ", " + subscriptionName + ", " +
                                           messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
       }
@@ -771,7 +766,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
                                                                    String messageSelector,
                                                                    ServerSessionPool sessionPool,
                                                                    int maxMessages) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("createSharedDurableConnectionConsumer(" + topic + ", " + subscriptionName +
                                           ", " + messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
       }
@@ -802,7 +797,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
    protected ActiveMQRASession allocateConnection(boolean transacted,
                                                   int acknowledgeMode,
                                                   final int sessionType) throws JMSException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("allocateConnection(" + transacted +
                                           ", " +
                                           acknowledgeMode +
@@ -865,14 +860,14 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
             info.setClientID(clientID);
             info.setDefaults(((ActiveMQResourceAdapter) mcf.getResourceAdapter()).getProperties());
 
-            if (ActiveMQRASessionFactoryImpl.trace) {
+            if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
                ActiveMQRALogger.LOGGER.trace("Allocating session for " + this + " with request info=" + info);
             }
 
             ActiveMQRASession session = (ActiveMQRASession) cm.allocateConnection(mcf, info);
 
             try {
-               if (ActiveMQRASessionFactoryImpl.trace) {
+               if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
                   ActiveMQRALogger.LOGGER.trace("Allocated  " + this + " session=" + session);
                }
 
@@ -920,7 +915,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
     * @throws IllegalStateException Thrown if closed
     */
    protected void checkClosed() throws IllegalStateException {
-      if (ActiveMQRASessionFactoryImpl.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("checkClosed()" + this);
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java
index ede85ee..d364bae 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java
@@ -26,11 +26,6 @@ import java.util.Arrays;
 public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements StreamMessage {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param message the message
@@ -39,7 +34,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
    public ActiveMQRAStreamMessage(final StreamMessage message, final ActiveMQRASession session) {
       super(message, session);
 
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
    }
@@ -52,7 +47,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public boolean readBoolean() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readBoolean()");
       }
 
@@ -67,7 +62,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public byte readByte() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readByte()");
       }
 
@@ -83,7 +78,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public int readBytes(final byte[] value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")");
       }
 
@@ -98,7 +93,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public char readChar() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readChar()");
       }
 
@@ -113,7 +108,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public double readDouble() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readDouble()");
       }
 
@@ -128,7 +123,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public float readFloat() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readFloat()");
       }
 
@@ -143,7 +138,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public int readInt() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readInt()");
       }
 
@@ -158,7 +153,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public long readLong() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readLong()");
       }
 
@@ -173,7 +168,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public Object readObject() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readObject()");
       }
 
@@ -188,7 +183,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public short readShort() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readShort()");
       }
 
@@ -203,7 +198,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public String readString() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("readString()");
       }
 
@@ -217,7 +212,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void reset() throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("reset()");
       }
 
@@ -232,7 +227,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeBoolean(final boolean value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")");
       }
 
@@ -247,7 +242,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeByte(final byte value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")");
       }
 
@@ -264,7 +259,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")");
       }
 
@@ -279,7 +274,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeBytes(final byte[] value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")");
       }
 
@@ -294,7 +289,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeChar(final char value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")");
       }
 
@@ -309,7 +304,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeDouble(final double value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")");
       }
 
@@ -324,7 +319,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeFloat(final float value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")");
       }
 
@@ -339,7 +334,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeInt(final int value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")");
       }
 
@@ -354,7 +349,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeLong(final long value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")");
       }
 
@@ -369,7 +364,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeObject(final Object value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")");
       }
 
@@ -384,7 +379,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeShort(final short value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")");
       }
 
@@ -399,7 +394,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
     */
    @Override
    public void writeString(final String value) throws JMSException {
-      if (ActiveMQRAStreamMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("writeString(" + value + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java
index d4c3c07..ec27eb2 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java
@@ -25,11 +25,6 @@ import javax.jms.TextMessage;
 public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMessage {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param message the message
@@ -38,7 +33,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
    public ActiveMQRATextMessage(final TextMessage message, final ActiveMQRASession session) {
       super(message, session);
 
-      if (ActiveMQRATextMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")");
       }
    }
@@ -51,7 +46,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
     */
    @Override
    public String getText() throws JMSException {
-      if (ActiveMQRATextMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getText()");
       }
 
@@ -66,7 +61,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
     */
    @Override
    public void setText(final String string) throws JMSException {
-      if (ActiveMQRATextMessage.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setText(" + string + ")");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java
index ee40f72..e86e4ab 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java
@@ -27,11 +27,6 @@ import javax.jms.TopicPublisher;
 public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implements TopicPublisher {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param producer the producer
@@ -40,7 +35,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
    public ActiveMQRATopicPublisher(final TopicPublisher producer, final ActiveMQRASession session) {
       super(producer, session);
 
-      if (ActiveMQRATopicPublisher.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")");
       }
    }
@@ -53,7 +48,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
     */
    @Override
    public Topic getTopic() throws JMSException {
-      if (ActiveMQRATopicPublisher.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTopic()");
       }
 
@@ -76,7 +71,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
                        final long timeToLive) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this +
                                              " message=" +
                                              message +
@@ -92,7 +87,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
 
          ((TopicPublisher) producer).publish(message, deliveryMode, priority, timeToLive);
 
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -110,7 +105,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
    public void publish(final Message message) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message);
          }
 
@@ -118,7 +113,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
 
          ((TopicPublisher) producer).publish(message);
 
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -144,7 +139,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
                        final long timeToLive) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this +
                                              " destination=" +
                                              destination +
@@ -162,7 +157,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
 
          ((TopicPublisher) producer).publish(destination, message, deliveryMode, priority, timeToLive);
 
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {
@@ -181,7 +176,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
    public void publish(final Topic destination, final Message message) throws JMSException {
       session.lock();
       try {
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message);
          }
 
@@ -189,7 +184,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
 
          ((TopicPublisher) producer).publish(destination, message);
 
-         if (ActiveMQRATopicPublisher.trace) {
+         if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
             ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message);
          }
       } finally {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java
index 7c9115b..ff12d9c 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java
@@ -26,11 +26,6 @@ import javax.jms.TopicSubscriber;
 public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer implements TopicSubscriber {
 
    /**
-    * Whether trace is enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * Create a new wrapper
     *
     * @param consumer the topic subscriber
@@ -39,7 +34,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
    public ActiveMQRATopicSubscriber(final TopicSubscriber consumer, final ActiveMQRASession session) {
       super(consumer, session);
 
-      if (ActiveMQRATopicSubscriber.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")");
       }
    }
@@ -52,7 +47,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
     */
    @Override
    public boolean getNoLocal() throws JMSException {
-      if (ActiveMQRATopicSubscriber.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getNoLocal()");
       }
 
@@ -68,7 +63,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
     */
    @Override
    public Topic getTopic() throws JMSException {
-      if (ActiveMQRATopicSubscriber.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTopic()");
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5cc6f7e9/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java
index 3f908c4..d6d246e 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java
@@ -30,11 +30,6 @@ import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 public class ActiveMQRAXAResource implements ActiveMQXAResource {
 
    /**
-    * Trace enabled
-    */
-   private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled();
-
-   /**
     * The managed connection
     */
    private final ActiveMQRAManagedConnection managedConnection;
@@ -51,7 +46,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     * @param xaResource        the xa resource
     */
    public ActiveMQRAXAResource(final ActiveMQRAManagedConnection managedConnection, final XAResource xaResource) {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("constructor(" + managedConnection + ", " + xaResource + ")");
       }
 
@@ -68,7 +63,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public void start(final Xid xid, final int flags) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("start(" + xid + ", " + flags + ")");
       }
 
@@ -103,7 +98,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public void end(final Xid xid, final int flags) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("end(" + xid + ", " + flags + ")");
       }
 
@@ -125,7 +120,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public int prepare(final Xid xid) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("prepare(" + xid + ")");
       }
 
@@ -141,7 +136,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public void commit(final Xid xid, final boolean onePhase) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("commit(" + xid + ", " + onePhase + ")");
       }
 
@@ -156,7 +151,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public void rollback(final Xid xid) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("rollback(" + xid + ")");
       }
 
@@ -171,7 +166,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public void forget(final Xid xid) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("forget(" + xid + ")");
       }
 
@@ -194,7 +189,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public boolean isSameRM(final XAResource xaRes) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("isSameRM(" + xaRes + ")");
       }
 
@@ -210,7 +205,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public Xid[] recover(final int flag) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("recover(" + flag + ")");
       }
 
@@ -225,7 +220,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public int getTransactionTimeout() throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("getTransactionTimeout()");
       }
 
@@ -241,7 +236,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
     */
    @Override
    public boolean setTransactionTimeout(final int seconds) throws XAException {
-      if (ActiveMQRAXAResource.trace) {
+      if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
          ActiveMQRALogger.LOGGER.trace("setTransactionTimeout(" + seconds + ")");
       }