Skip to content

Commit 29ed702

Browse files
committed
Fjerner overflødige helsesjekker
1 parent 8fd917e commit 29ed702

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

servicebuilder-mq-activemq/src/main/java/no/obos/util/servicebuilder/addon/ActiveMqAddon.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ public void addToJettyServer(JettyServer jettyServer) {
121121
String queueError = handlerDescription.messageDescription.getErrorQueueName();
122122
ObosHealthCheckRegistry.registerActiveMqCheck("Input queue: " + queueInput + " on " + url, url, queueInput, handlerDescription.healthCheckEntriesMax, handlerDescription.healthCheckEntriesGrace, user, password);
123123
ObosHealthCheckRegistry.registerActiveMqCheck("Error queue: " + queueError + " on " + url, url, queueError, 1, 1, user, password);
124-
ObosHealthCheckRegistry.registerCustomCheck("ActiveMqListener active", () ->
125-
listener.isListenerActive()
126-
? ObosHealthCheckResult.ok()
127-
: ObosHealthCheckResult.error("ActiveMqListener not active")
128-
);
129124
});
125+
ObosHealthCheckRegistry.registerCustomCheck("ActiveMqListener active", () ->
126+
listener.isListenerActive()
127+
? ObosHealthCheckResult.ok()
128+
: ObosHealthCheckResult.error("ActiveMqListener not active")
129+
);
130130
}
131131

132132
@Override

servicebuilder-mq-activemq/src/main/java/no/obos/util/servicebuilder/mq/activemq/ActiveMqListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public void startListener(ImmutableSet<MqHandlerImpl<?>> handlers) {
3535
if (listenerActive) {
3636
throw new RuntimeException("Multiple active sessions in same listener. Check if starting connection threw exception and ActiveMQ ActiveMQConnection.setExceptionListener() failed at the same time.");
3737
}
38+
listenerActive = true;
3839
threadIsInterrupted = false;
3940
try {
4041
activeMqConnectionProvider.startListenerSession((connection, session) -> {
@@ -48,7 +49,6 @@ public void startListener(ImmutableSet<MqHandlerImpl<?>> handlers) {
4849
.mqHandlerForwarder(mqHandlerForwarder)
4950
.build();
5051
activeMqListener.startListener();
51-
listenerActive = true;
5252
} catch (JMSException ex) {
5353
throw new RuntimeException(ex);
5454
}

0 commit comments

Comments
 (0)