jungm opened a new pull request, #2947:
URL: https://github.com/apache/tomee/pull/2947

   Fixes TOMEE-4710, generates 
lib/org/apache/catalina/util/ServerInfo.properties in the TomEE server bundle
   
   Other options considered:
   | Option | Why not |
   |---|---|
   | Flat `lib/tomee-server-info.jar` | Tomcat reads `lib/*.jar` in filesystem 
order, so the jar needs an explicit `common.loader` entry in 
`catalina.properties`. Users who keep their own `catalina.properties` silently 
lose it, and opting out takes two edits. |
   | Rewrite `ServerInfo.properties` inside `catalina.jar` | Smallest code, but 
`catalina.jar` no longer matches Apache's published checksums. |
   | Reflection / `Unsafe` on `ServerInfo.serverInfo` | JDK 12+ can't set 
`static final` fields via reflection. `Unsafe` warns at every startup since JDK 
24 and will be blocked. |
   | Java agent adding a generated jar to the system classpath at startup | 
Only works with `-javaagent`, writes a jar on every startup, and `catalina.sh 
version` wouldn't show it. |
   | Transform `ServerInfo` bytecode via the agent | Still patching Tomcat 
code, just at runtime. |
   
   Think this approach is the least code and least intrusive yet allows us to 
keep the TomEE version everywhere Tomcat shows its version (startup log, error 
pages etc)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to