diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java index 32316f0df6..4da4b6ceaf 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java @@ -77,6 +77,10 @@ public interface ActiveMQRALogger extends BasicLogger { @Message(id = 151006, value = "Cluster topology change detected. Re-balancing connections on even {0}.", format = Message.Format.MESSAGE_FORMAT) void rebalancingConnections(String event); + @LogMessage(level = Logger.Level.INFO) + @Message(id = 151007, value = "Resource adaptor started", format = Message.Format.MESSAGE_FORMAT) + void resourceAdaptorStarted(); + @LogMessage(level = Logger.Level.WARN) @Message(id = 152001, value = "problem resetting xa session after failure", format = Message.Format.MESSAGE_FORMAT) void problemResettingXASession(@Cause Throwable t); @@ -113,6 +117,14 @@ public interface ActiveMQRALogger extends BasicLogger { @Message(id = 152009, value = "Unable to validate properties", format = Message.Format.MESSAGE_FORMAT) void unableToValidateProperties(@Cause Exception e); + @LogMessage(level = Logger.Level.WARN) + @Message(id = 152010, value = "Unable to clear the transaction", format = Message.Format.MESSAGE_FORMAT) + void unableToClearTheTransaction(@Cause Exception e); + + @LogMessage(level = Logger.Level.WARN) + @Message(id = 152011, value = "Unable to close the factory", format = Message.Format.MESSAGE_FORMAT) + void unableToCloseFactory(@Cause Throwable e); + @LogMessage(level = Logger.Level.ERROR) @Message(id = 154000, value = "Error while creating object Reference.", format = Message.Format.MESSAGE_FORMAT) void errorCreatingReference(@Cause Exception e); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java index 36eabeb85c..a85234e489 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java @@ -251,7 +251,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { } } - ActiveMQRALogger.LOGGER.info("Resource adaptor started"); + ActiveMQRALogger.LOGGER.resourceAdaptorStarted(); } /** diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java index 2c42779b70..cb8472a126 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java @@ -421,7 +421,7 @@ public class ActiveMQActivation { // closing the factory will help making sure pending threads are closed factory.close(); } catch (Throwable e) { - ActiveMQRALogger.LOGGER.warn(e); + ActiveMQRALogger.LOGGER.unableToCloseFactory(e); } factory = null; diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java index 018206c3fa..4ff63571ed 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java @@ -342,7 +342,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList tx.setRollbackOnly(); } } catch (Exception e1) { - ActiveMQRALogger.LOGGER.warn("unable to clear the transaction", e1); + ActiveMQRALogger.LOGGER.unableToClearTheTransaction(e1); } }