Skip to content

Conversation

@OndroMih
Copy link
Contributor

  • stop automatically on error when executing commands
  • print Welcome message at the beginning
  • print message after shutdown, as the last message. Either OK message or error message.

@OndroMih OndroMih force-pushed the ondromih-runnable-embedded-improvements branch from 6cb3e42 to 15d0fe1 Compare October 22, 2025 13:43
@OndroMih OndroMih requested a review from dmatej October 31, 2025 02:13
Copy link
Contributor

@dmatej dmatej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shutdown hooks are there to do the cleanup. When they stop logging, all output properly closed, going against the stream is wrong. In extreme it can cause some damage.

If I remember well, the last message is already written by the shutdown hook, if it is not, we can fix it, but this is really a bad hack.

Handlers are also closeable (but don't implement Closeable), so they should not be used after the logging system was stopped.

I will take a look later ... embedded is bit different than Server, ie. shutdown hooks might not be executed as embedded was started inside existing JVM ... so perhaps something really has to be done, but not this way.

OndroMih and others added 3 commits October 31, 2025 19:18
* stop automatically on error when executing commands
* print Welcome message at the beginning
* print message after shutdown, as the last message. Either OK message or error message.
Signed-off-by: David Matějček <[email protected]>
@dmatej dmatej force-pushed the ondromih-runnable-embedded-improvements branch from a1597d1 to 9e48bb0 Compare November 1, 2025 01:18
dmatej and others added 2 commits November 1, 2025 02:32
- Better handling of System.exit and the goodbye message
- Processing errors to error codes (TODO: extend)
- enums processed completely
- Using System.console instead of STDIN for prompt
- Minimalized shutdown hook
- UberMain is now AutoCloseable, however main doesn't stop it - its purpose is
  to start it and return.
- goodbye message can be null - anything can initiate exit for any reason.

Signed-off-by: David Matějček <[email protected]>
@OndroMih OndroMih requested review from a team, dmatej and pzygielo November 1, 2025 08:34
@dmatej dmatej added this to the 7.1.0 milestone Nov 1, 2025
@dmatej dmatej added enhancement New feature or request code cleaning labels Nov 1, 2025
@dmatej dmatej merged commit d16b2c4 into eclipse-ee4j:master Nov 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code cleaning enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants