Skip to content

[refactor] Simplify startup code #5701

Merged
duncdrum merged 20 commits into
eXist-db:developfrom
dizzzz:feature/simplify_startup
Jul 23, 2025
Merged

[refactor] Simplify startup code #5701
duncdrum merged 20 commits into
eXist-db:developfrom
dizzzz:feature/simplify_startup

Conversation

@dizzzz

@dizzzz dizzzz commented Apr 13, 2025

Copy link
Copy Markdown
Member

It started with the idea to remove all old code code from jetty, as the classpath is now constructed in a different way.

The PR evolved into a significant rewrite refactoring and cleanup of the original code; Move methods to locations where used, combine functionality in a new Class, split-up the "doIt" method, with readable methods.

Summary

  • classloader code is moved to org.exist.start.classloader.
  • LatestFileResolver is now moved to the webstart code in org.exist.webstart
  • LatestFileResolver has been cleaned up, uses a logger, made code more readable.
  • Main
  • rename runEx(runArgs) to 'startExistdb(runArgs)` - characters are free these days
  • revised CompatibleJavaVersionCheck as the buggy Java15's are not relevant anymore - code remains for future usage.
  • made CompatibleJavaVersionCheck code more readable
  • significant rewrite of org/exist/start/Main.java to make it more readable, less error prone to see the flow etc.

@dizzzz dizzzz requested a review from a team as a code owner April 13, 2025 21:45
Comment thread exist-distribution/pom.xml
@dizzzz dizzzz marked this pull request as draft April 13, 2025 21:47

@duncdrum duncdrum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Javadoc of all things is failing

@line-o line-o left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks amazing 🤩
Could you walk us through the changes tonight?

@dizzzz

dizzzz commented Apr 14, 2025

Copy link
Copy Markdown
Member Author

The open questions I have

  • shall I make this module start.jar compatible with Java8 ?
    • pro: decent handling of old java versions, with good error message
    • con: bin/startup.sh contains parameters that will stop java8 anyway.
  • start.jar has no external dependencies
  • OK to remove all all old jetty-codebase references?
    • all has been removed/refactored and is eXist-db specific

@dizzzz

dizzzz commented Apr 14, 2025

Copy link
Copy Markdown
Member Author

I tried to simplify the startup of appbundler by removing these xml files

  • (old) maven plugin crashes with NPE, cant find reason, is under documented
    • great work of Adam understanding the plugin config
  • idea is to create a (python)script/java module that can update the appbundler xml files
    • this enables updating/changing jar files after release

Comment thread exist-start/src/main/java/org/exist/start/Main.java Outdated
@duncdrum

Copy link
Copy Markdown
Contributor

@dizzzz

  • I don't see much of a point in J8 in this instance, it ll will error one way or the other
  • My guess for relevance of 0 deps would be yes, but @wolfgangmm knows more
  • uhmm yes please, its a new dawn ;-)

Comment thread exist-start/src/main/java/org/exist/start/classloader/Classpath.java Outdated
@dizzzz dizzzz requested a review from reinhapa April 15, 2025 19:48
Comment thread exist-core/src/main/java/org/exist/webstart/LatestFileResolver.java Outdated
@dizzzz dizzzz force-pushed the feature/simplify_startup branch from c9eeab3 to 0508daa Compare July 16, 2025 20:12
@dizzzz dizzzz force-pushed the feature/simplify_startup branch from 2ea4525 to 06e9b99 Compare July 16, 2025 20:17
@dizzzz dizzzz force-pushed the feature/simplify_startup branch from 06e9b99 to 707c4ec Compare July 16, 2025 20:21
@dizzzz dizzzz marked this pull request as ready for review July 20, 2025 18:30
@dizzzz dizzzz requested review from a team, duncdrum, line-o and wolfgangmm July 20, 2025 18:38
Comment thread exist-start/src/main/java/org/exist/start/CompatibleJavaVersionCheck.java Outdated
Comment thread exist-start/src/main/java/org/exist/start/CompatibleJavaVersionCheck.java Outdated
@dizzzz dizzzz changed the title Simplify startup code [refactor] Simplify startup code Jul 23, 2025
@duncdrum duncdrum merged commit cd2f0c4 into eXist-db:develop Jul 23, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants