-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ActiveMQ on Java 25 #1563
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
ActiveMQ on Java 25 #1563
Conversation
238395b to
ec7682e
Compare
0feb22e to
9c4e4ac
Compare
9c4e4ac to
1922d5b
Compare
ea87cc1 to
367568b
Compare
cf803e8 to
486e60f
Compare
af06564 to
bfc0690
Compare
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Outdated
Show resolved
Hide resolved
gemmellr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be enforcing that Java 24+ is used for the release process since its required for this to be of any worth to end users.
An earlier PR is still open to require 21+ since Java 21+ wasnt used for the previous release when it should have been, though that PR (#1532) requires changes as its somewhat out of date now
(I required 25 to release elsewhere, saves changing it later and noone should be really be using 24 now anyway)
activemq-broker/src/main/java24/org/apache/activemq/broker/jmx/SubjectShim.java
Outdated
Show resolved
Hide resolved
| private void assertJDK21VirtualThreadSupport() { | ||
| if(!(Runtime.version().feature() >= 21)) { | ||
| LOG.error("Virtual Thread support requires JDK 21 or higher"); | ||
| throw new IllegalStateException("Virtual Thread support requires JDK 21 or higher"); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cleanup seems fine, but a thought for later would be....is there any need for all the reflection above and this runtime version checking, when the client jar is already a multi-release jar requiring Java 21 (and soon 24[/25]) to release it? Could maybe have a [couple variants of] trivial delegate class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a refactoring of @mattrpav 's code. So I'd let him reply.
I agree that having the assertion to fail would be weird because that would mean the JVM could not read the MRJAR but still run in some way this class.
|
@gemmellr Thanks a lot for the detailed review. I grab back the branch and address the feedback. |
bfc0690 to
e876d81
Compare
|
I'll leave the test config changes to Matt, not sure whats wanted or has been discussed there. It doesnt look like you covered this bit of my earlier review. Either the original PR needs updated and merged before this one so this can update things, or this one should just do the necessary, to avoid a repeat of the previous releasing issue.
|
|
@gemmellr I was waiting for Matt to speak, but you are correct, I'll add that in the same PR so it's autonomous. I think it need a JIRA as well. |
… test to remove SecurityManager Co-authored-by: Gurpartap Singh <gurpartap0306>
Ensure builds under Java 21 will still work with Security Manager Only run required tests
Use Java 25 compatible version of Mockito Use Mockito Agent because self attaching an agent is now unavailable since Java 21+ Split integration tests (MRJAR dependent) into a specific integration-test phase so they use the jar in the classpath Do not rely on activeByDefault because when other profiles activate, quick becomes inactive
… the API will be removed anyways
…id the failsafe integration tests
e876d81 to
1de8b1c
Compare
|
@gemmellr I've now added the enforcer plugin in the apache-release profile to make sure we release the MRJAR supporting Java 21 and Java 24. |
There is a property used in the parent for the maven version enforcement, you could set that if you wanted it to be specified locally more obviously. It is personal preference as you say. I dont know what others here might prefer. I definitely prefer to use the parent pom for a lot that is possible (but not everything; I set/override the compiler properties locally) in order to make our poms more concise. Most especially all the plugin versions possible. Users dont really [need to] care about our plugin versions (they have their own plugin versions) so long as things still work, and the constant plugin version upgrade churn otherwise mostly just distracts from other far more meaningful dependency etc changes that users actually are more affected by and likely to be more interested in. I find using the parent versions removes a bunch of that noise, and using the same parent across different components can also mean more consistency among which plugins are being used (albeit, in general all the plugins do then use wildly inconsistent deps, so you still end up needing to grab lots of different versions of the same plugin deps regardless). Its still trivial to see what is actually being used with e.g help:effective-pom, or just running the build. |
|
Yeah, I have similar preferences. Sometimes I prefer to just be explicit as opposed to think other will go a research. I have bad experience on this. Also sometimes updating just one thing (parent pom for example) will break everything. So parent pom is just an organizational (group) thing for me. I tend myself to put as minimum as possible inside. Add checkstyle rules, deployments rules, rat, and plugins required for that. |
jbonofre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good to me.
I just have a couple of questions:
verifyvstestin the CI (just curious)- the
DataFileFactoryand such don't seem directly related with Java 25 (only theSubjectis imho). I'm fine to include it, but to "simplify" the review, it would be great to have PR specifically to the change intent. Just a nit.
Great one @jeanouii !
| distribution: temurin | ||
| - name: Test | ||
| run: mvn -B -e -fae test | ||
| run: mvn -B -e -fae verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason to use verify here more than test ? I'm just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it was mostly due to the introduction of failsafe to delay the execution of tests using the MRJAR because the jar is created only after the test phase. So tests using MRJAR were postponed to run only during the integration test phase. So if you use test and not verify you won't run them.
In the end, I could have reverted this because Robbie requested instead to change the phase of the JAR plugin so the MRJAR is built in the process classes phase and therefor it's visible to the test plugin. Does not hurt. Could have been removed
No need to review, this is a temp PR I'll kill whenever I have more visibility on what now fails on Java 25