• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aspectran / aspectran / #4665

18 Oct 2025 06:57AM UTC coverage: 36.302% (-0.02%) from 36.322%
#4665

push

github

topframe
Fix(jetty): Prevent Logback context shutdown on restart

When running in the Aspectran Shell, restarting the service via the `restart` command would cause all Logback logging to cease.

This was caused by Jetty's `WebAppContext` automatically discovering and running Logback's `LogbackServletContainerInitializer`. This initializer registers a `LogbackServletContextListener` that, upon the web application's context destruction during the restart, would shut down the entire shared, JVM-wide `LoggerContext`.

This commit fixes the issue by preventing the `LogbackServletContainerInitializer` from running. It achieves this by programmatically setting the standard Logback context parameter `logbackDisableServletContainerInitializer` to `true` for every `JettyWebAppContext` instance.

The implementation is:
- Located in `JettyServer.handleDeferredInitialize()` to ensure it covers all web applications managed by the server.
- Defensive: It uses reflection to confirm that Logback is the active SLF4J implementation before applying the fix, thus avoiding a hard dependency.

10 of 11 new or added lines in 1 file covered. (90.91%)

562 existing lines in 19 files now uncovered.

15038 of 41425 relevant lines covered (36.3%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.71
/core/src/main/java/com/aspectran/core/component/session/SessionIdGenerator.java


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc