diff --git a/pom.xml b/pom.xml
index be99c69..6b7ee9e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
- 2.21.0
+ 2.29.0
7.6.1.Final
@@ -44,12 +44,17 @@
jboss-logging
3.5.0.Final
-
org.jboss.logmanager
jboss-logmanager
2.1.19.Final
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.36
+
org.apache.activemq
artemis-jakarta-service-extensions
@@ -103,6 +108,11 @@
${artemis.version}
test-jar
+
+ org.apache.activemq
+ artemis-log-annotation-processor
+ ${artemis.version}
+
org.apache.activemq.tests
unit-tests
@@ -114,6 +124,11 @@
integration-tests
${artemis.version}
+
+ org.apache.activemq
+ artemis-unit-test-support
+ ${artemis.version}
+
org.apache.activemq.tests
integration-tests
@@ -170,6 +185,11 @@
+
+ org.apache.activemq
+ artemis-log-annotation-processor
+ provided
+
org.jboss.logging
jboss-logging-processor
@@ -242,13 +262,23 @@
jbossjts-jacorb
provided
+
+ org.apache.activemq
+ artemis-unit-test-support
+ test
+
+
+ org.slf4j
+ slf4j-api
+ provided
+
org.apache.maven.plugins
maven-compiler-plugin
- 3.10.1
+ 3.11.0
11
diff --git a/src/main/java/org/jboss/activemq/artemis/wildfly/ActiveMQJBossLogger.java b/src/main/java/org/jboss/activemq/artemis/wildfly/ActiveMQJBossLogger.java
index b4dff56..1c99307 100644
--- a/src/main/java/org/jboss/activemq/artemis/wildfly/ActiveMQJBossLogger.java
+++ b/src/main/java/org/jboss/activemq/artemis/wildfly/ActiveMQJBossLogger.java
@@ -21,16 +21,10 @@
*/
package org.jboss.activemq.artemis.wildfly;
-import static org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory.log;
-
import javax.security.auth.Subject;
-
-import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Logger;
-import org.jboss.logging.annotations.Cause;
-import org.jboss.logging.annotations.LogMessage;
-import org.jboss.logging.annotations.Message;
-import org.jboss.logging.annotations.MessageLogger;
+import org.apache.activemq.artemis.logs.BundleFactory;
+import org.apache.activemq.artemis.logs.annotation.LogBundle;
+import org.apache.activemq.artemis.logs.annotation.LogMessage;
/**
* @author Andy Taylor
@@ -49,21 +43,18 @@
*
* so an INFO message would be 131000 to 131999
*/
-@MessageLogger(projectCode = "AMQ")
-public interface ActiveMQJBossLogger extends BasicLogger {
+
+@LogBundle(projectCode = "AMQ", regexID = "13[0-9]{4}")
+public interface ActiveMQJBossLogger {
/**
* The jboss integration logger.
*/
- ActiveMQJBossLogger LOGGER = Logger.getMessageLogger(ActiveMQJBossLogger.class, ActiveMQJBossLogger.class.getPackage().getName());
+ ActiveMQJBossLogger LOGGER = BundleFactory.newBundle(ActiveMQJBossLogger.class, ActiveMQJBossLogger.class.getPackage().getName());
- @LogMessage(level = Logger.Level.INFO)
- @Message(id = 131001, value = "Security Context Setting Subject = {0}",
- format = Message.Format.MESSAGE_FORMAT)
+ @LogMessage(id = 131001, value = "Security Context Setting Subject = {}", level = LogMessage.Level.INFO)
void settingSecuritySubject(Subject subject);
- @LogMessage(level = Logger.Level.WARN)
- @Message(id = 132001, value = "An error happened while setting the context",
- format = Message.Format.MESSAGE_FORMAT)
- void errorSettingSecurityContext(@Cause Throwable Throwable);
+ @LogMessage(id = 132001, value = "An error happened while setting the context", level = LogMessage.Level.WARN)
+ void errorSettingSecurityContext(Throwable Throwable);
}
diff --git a/src/main/java/org/jboss/activemq/artemis/wildfly/integration/WildFlySSLContextFactory.java b/src/main/java/org/jboss/activemq/artemis/wildfly/integration/WildFlySSLContextFactory.java
index 6a4a413..019c3f1 100644
--- a/src/main/java/org/jboss/activemq/artemis/wildfly/integration/WildFlySSLContextFactory.java
+++ b/src/main/java/org/jboss/activemq/artemis/wildfly/integration/WildFlySSLContextFactory.java
@@ -15,8 +15,8 @@
*/
package org.jboss.activemq.artemis.wildfly.integration;
-import static org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory.log;
+import java.lang.invoke.MethodHandles;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -25,6 +25,8 @@
import org.apache.activemq.artemis.core.remoting.impl.ssl.DefaultSSLContextFactory;
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextConfig;
import org.apache.activemq.artemis.utils.ConfigurationHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of the SSLContextFactory enabling WildFly to register and unregister SSLContext that it created.
@@ -33,7 +35,8 @@
*/
public class WildFlySSLContextFactory extends DefaultSSLContextFactory {
- private static final Map SSL_CONTEXTS = Collections.synchronizedMap(new HashMap());
+ private static final Map SSL_CONTEXTS = Collections.synchronizedMap(new HashMap<>());
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
/**
* Register a WildFly SSLContext.
@@ -43,7 +46,7 @@ public class WildFlySSLContextFactory extends DefaultSSLContextFactory {
*/
public static void registerSSLContext(String name, SSLContext context) {
SSL_CONTEXTS.put(name, context);
- log.warnf("Injecting Elytron SSLContext %s", name);
+ log.warn("Injecting Elytron SSLContext " + name);
}
/**
@@ -68,9 +71,9 @@ public SSLContext getSSLContext(final SSLContextConfig config, final Map