-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesign of GlassFish bootstrap #25183
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: David Matějček <[email protected]> # Conflicts: # nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/server/CommonClassLoaderServiceImpl.java
Signed-off-by: David Matějček <[email protected]>
- useful when you use exports rather than editing asenv.conf Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- Caused parallel classloader architecture to osgi, so ie. default-web.xml filter for JSPC was worthless, dependencies were always found somehow. - However it is still useful for jar files with Main executed from command line. Signed-off-by: David Matějček <[email protected]>
- Stop swallowing exceptions - Log stacktraces if AS_TRACE or AS_DEBUG enabled - To get very verbose logs for asadmin: - export AS_ADMIN_LOG_FORMATTER=org.glassfish.main.jul.formatter.OneLineFormatter - export AS_TRACE=true Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- Removed MaxPermSize - not supported on JDK11 - Removed -server and -client; on current JVMs -server is always active - Added log manager and blocking handler for waiting on instance's logging.properties Signed-off-by: David Matějček <[email protected]>
- Separated bootstrap aka glassfish.jar and glassfish-osgi-bootstrap - Separated common-util (osgi enabled) and glassfish-jdk-extensions (usual jar) - Result: We have nonosgi part usable for standard Java classpath and another osgi-enabled group of jar files loaded dynamically. It is much easier to understand and manage all dependencies. - Result2: We can enable logging much sooner than before. Maybe even without blocking (not implemented yet, to be invented later). - This commit will not build, I am trying to separate the work to parts. Signed-off-by: David Matějček <[email protected]>
- For CLI I tried to eliminate what is not required. - It should be refactored later, so CLI would have much cleaner dependency tree Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- When I remove the jar file from any of those two lines, GF cannot start. Signed-off-by: David Matějček <[email protected]>
- just 4 jars to start GlassFish are required: - glassfish.jar contains non-osgi GlassFishMain class and Launcher interface - glassfish-jul-extensions.jar for logging in every phase with same set of available features. - glassfish-jdk-extensions - basic tools used on all layers: i18n class, classloader, we will migrate more in the future. - simple-glassfish-api.jar - basic GF apis, no other dependencies. Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
…sh.jar Signed-off-by: David Matějček <[email protected]>
6e9b092
to
4c37d35
Compare
Wow, it took me a while to reproduce it - the reason is that JDK17 and JDK21 resolve Manifest classpath in different way! I have to find where and why it changed ... EDIT: known issues:
EDIT2: All resolved. I will also run all TCK tests locally. I noticed that servlet TCK executed one of cli jars instead of using script, so I expect yet some issues to resolve ... until that I will keep it as a draft. |
- removed Control, unsupported with JPMS - removed dead code - added env option to enable logging of all failed lookups Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- felix framework is supplied by other jpms modules which don't overlap osgi.core - logging annotations are used just by maven compiler plugin and they are not used in runtime. Signed-off-by: David Matějček <[email protected]>
Ok, another round, seems we don't have any mavenized tests for gfclient, tbd soon ... |
- AS_INSTALL must be absolute env option despite it can be also autodetected, but then it would not be possible to use it in scripts (chicken-egg problem). - classpaths in manifests sometimes don't work on JDK11-17, not sure why exactly. Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- If not present, use all jars in the modules directory. Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- https://bugs.openjdk.org/browse/JDK-8273473 Signed-off-by: David Matějček <[email protected]>
Main feature changes
Bootstrap libs
*.cli
jars were moved to install root as they are simply executable jars.Bootstrap design
Related changes
Future PRs
Review
Probably is better to go through commits.
Notes