diff --git a/appserver/payara-appserver-modules/jmx-monitoring-service/src/main/java/fish/payara/jmx/monitoring/MonitoringService.java b/appserver/payara-appserver-modules/jmx-monitoring-service/src/main/java/fish/payara/jmx/monitoring/MonitoringService.java index c4185ade0fb..2ef98d541b2 100644 --- a/appserver/payara-appserver-modules/jmx-monitoring-service/src/main/java/fish/payara/jmx/monitoring/MonitoringService.java +++ b/appserver/payara-appserver-modules/jmx-monitoring-service/src/main/java/fish/payara/jmx/monitoring/MonitoringService.java @@ -153,7 +153,7 @@ public void event(Event event) { * if enabled in the configuration. */ public void bootstrapMonitoringService() { - if (configuration != null) { + if (configuration != null && configuration.getEnabled().equalsIgnoreCase("true")) { shutdownMonitoringService();//To make sure that there aren't multiple monitoring services running executor = Executors.newScheduledThreadPool(1, new ThreadFactory() { diff --git a/nucleus/payara-modules/notification-core/src/main/java/fish/payara/nucleus/notification/log/LogNotificationEventFactory.java b/nucleus/payara-modules/notification-core/src/main/java/fish/payara/nucleus/notification/log/LogNotificationEventFactory.java index 8ba3b884859..95dda7f759f 100644 --- a/nucleus/payara-modules/notification-core/src/main/java/fish/payara/nucleus/notification/log/LogNotificationEventFactory.java +++ b/nucleus/payara-modules/notification-core/src/main/java/fish/payara/nucleus/notification/log/LogNotificationEventFactory.java @@ -41,7 +41,6 @@ import fish.payara.notification.healthcheck.HealthCheckResultEntry; import fish.payara.notification.requesttracing.RequestTrace; import fish.payara.nucleus.notification.configuration.NotifierType; -import fish.payara.nucleus.notification.domain.EventSource; import fish.payara.nucleus.notification.domain.NotificationEventFactory; import org.glassfish.api.StartupRunLevel; import org.glassfish.hk2.runlevel.RunLevel; @@ -52,6 +51,7 @@ import java.util.logging.Level; /** + * Factory to build events for {@link LogNotifier} * @author mertcaliskan */ @Service @@ -63,7 +63,6 @@ void postConstruct() { registerEventFactory(NotifierType.LOG, this); } - @Override protected LogNotificationEvent createEventInstance() { return new LogNotificationEvent(); @@ -90,4 +89,11 @@ public LogNotificationEvent buildNotificationEvent(String name, List