Skip to content

jpro.onJVMShutdown - shutdown hook from jpro.conf never gets called #206

Description

@hw-hass23

The JVM shutdown hook of jpro.onJVMShutdown, configured in jpro.conf, never gets called. The configured class doesn't event get loaded.
JPro does process the JVM shutdown properly, from
May 11, 2026 11:23:52 PM io.helidon.Main shutdown
INFO: Shutdown requested by JVM shutting down
down to
May 11, 2026 11:23:52 PM io.helidon.Main shutdown
INFO: Shutdown finished
when triggered either from my IDE or with System.exit from within the application. So the JPro shutdown mechanism seems to work, but it does not honor jpro.onJVMShutdown.
Maven jpro:stop is worse - this plainly kills the JVM without any shutdown sequence being run.

Expected behavior:
Upon proper JVM exit (no hard kill), JPro shutdown will load and execute the class configuried with jpro.onJVMShutdown, waiting for its main function to return before finally allowing the JVM to terminate.

Actual behavior:
JPro/Helidon shutdown commences in parallel with other JVM shutdown hooks registered via Runtime.getRuntime().addShutdownHook(...), but kills the JVM before those other shutdown hooks have completed their work.
This is very bad behavior as my application is not able to properly store overall server side application state.

My jpro.conf setup is identical to https://github.com/JPro-one/JPro-Samples/blob/main/logging/src/main/resources/jpro.conf, even with the otherwise undocumented "jpro.forceShutdown = false".
The jpro.onJVMStartup and jpro.onFXStartup work just fine - those classes get instantiated and their main methods called.

INFO: OS: Windows 11
INFO: JPro: 2026.1.1
INFO: Java version: 25.0.2
INFO: JVM: 25.0.2 Azul Systems, Inc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions