Skip to content

Commit

Permalink
Improve failed startup follow-up exceptions and back to OWB snapshot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tandraschko authored Jan 16, 2024
1 parent be59561 commit 728aab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
<version.johnzon>2.0.0</version.johnzon>
<version.myfaces>4.0.1</version.myfaces>
<version.openjpa>4.0.0-SNAPSHOT</version.openjpa>
<version.openwebbeans>4.0.1</version.openwebbeans>
<version.openwebbeans>4.0.2-SNAPSHOT</version.openwebbeans>
<!-- org.eclipse -->
<version.eclipselink>3.0.4</version.eclipselink>
<!-- org.glassfish -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ private void addHealthChecks(
* Remove all the instances of {@link HealthCheck} from the {@link MicroProfileHealthReporter}.
*/
public void beforeShutdown(@Observes final BeforeShutdown bs) {
// in case when CDI startup failed
if (reporter == null)
{
return;
}
removeHealthCheck(livenessChecks, reporter::removeLivenessCheck);
removeHealthCheck(readinessChecks, reporter::removeReadinessCheck);
removeHealthCheck(startupChecks, reporter::removeStartupCheck);
Expand Down Expand Up @@ -182,4 +187,4 @@ public HealthCheckResponse call() {
.build();
}
}
}
}

0 comments on commit 728aab6

Please sign in to comment.