Skip to content

Conversation

@jeanouii
Copy link
Contributor

This PR leverages Matt's PR [#] NO-JIRA: Update Jenkinsfile to add JDK 25](#1533)

It is meant to check CI status on tests and gather community feedback. We might prefer to create a PR against Matt's branch to join efforts.

Copy link
Member

@gemmellr gemmellr left a comment

Choose a reason for hiding this comment

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

This should clearly be going against a Jira.

Comment on lines +31 to +35
* This specific class uses legacy methods toward usage on Java 17 - 23.
*
* The API of this class must be kept the same as the Java 24+ implementation
* variant of this class which can be found at:
* src/main/java24/org/apache/activemq/artemis/utils/sm/SecurityManagerShim.java
Copy link
Member

Choose a reason for hiding this comment

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

All of the Javadoc in this class is inaccurate now as you havent updated it to reflect how/where it is being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, JIRA was out yesterday, but I can create the issue. Need to check with @jbonofre if there is a parent issue I need to create a sub-task.
And also yes, I need to update the entire javadoc. That was a plain copy to follow up on the email thread.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah the ASF has been under DDoS attack for the last couple days, but Jira would usually load after another attempt or two if it failed initially.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jeanouii no need to do a JIRA. Keep the convo here.

Copy link
Member

Choose a reason for hiding this comment

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

The Jira is for issue and commit tracking, not discussion of the code. Changes to make things work on Java 24+ when they don't currently, seems pretty clearly deserving of being committed against a Jira. Almost everything should be.

Copy link
Contributor

Choose a reason for hiding this comment

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

This PR is definitely going to need a Jira before it is merged but that can be done before it is ready to merge

if (audit != OFF) {
// [AMQ-9563] TODO: JDK 21 use Subject.current() instead
Subject subject = Subject.getSubject(AccessController.getContext());
Subject subject = SecurityManagerShim.currentSubject();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need the shim? I'm wondering if we just ship two AnnotatedBean classes using MR jar and switch the JAAS API implementation when getting the Subject.

Copy link
Member

Choose a reason for hiding this comment

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

If there are no other SM / related API usage to handle then you wouldn't need it all, just the Subject method.

However I'm not seeing how duplicating a sizable complex class that may need to be updated, just to change a couple lines, would really be better than having 2 new tiny classes , that likely won't ever change, to do the switch out and avoid the need to duplicate the complex class?

For sure the classes don't need to be in their own module if that's what you dislike about it.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we only need a small part of the Shim around handling Subject then we should just use that piece for now to keep the changes minimal.

@mattrpav
Copy link
Contributor

mattrpav commented Nov 14, 2025

Updated approach w/ all three changes here: #1533

  • Jenkinsfile updated for JDK 25 option
  • KahaDBPersistenceAdapter adding DataFileFactory (to support testing w/o SecurityManager)
  • Add small SecurityShim for simply resolving Subject to activemq-broker as a Multi-Release jar

Two Jenkins jobs running on Apache CI, one with JDK 17 and another kicked off using JDK 25

@jeanouii
Copy link
Contributor Author

@mattrpav We can probably close this PR then and keep going with what you pulled in your own branch/PR

@jeanouii jeanouii closed this Nov 17, 2025
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.

4 participants