Skip to content
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

Impact of Jakarta.* - Spring Boot 3, Nov 2022 #2835

Closed
rbygrave opened this issue Sep 19, 2022 · 3 comments
Closed

Impact of Jakarta.* - Spring Boot 3, Nov 2022 #2835

rbygrave opened this issue Sep 19, 2022 · 3 comments
Assignees
Milestone

Comments

@rbygrave
Copy link
Member

Raising this as a discussion point. Very shortly, around Nov 2022 Spring Boot 3 is expected with Java 17 and Jakarta.* based dependencies.

Is that going to work with Ebean?

persistence-api : No change expected here. Ebean ORM effectively owns these classes so no impact from Spring Boot upgrade.
ebean-spring-txn : Folks using Spring managed transactions via ebean-spring-txn. Yes, we do use a deprecated class that might be removed. Easy to resolve, no major issue expected.

Jakarta JAXB : Unfortunately I expect this to be a real problem. The TLDR is that javax JAXB isn't compatible with jakarata JAXB and so when apps make this jump ALL libraries that depend on JAXB must also make this jump to Jakarta. If an application has a 3rd party library that uses javax JAXB and that library does NOT have a version that supports jakarta JAXB then that app will have some effort to resolve that.

For Ebean, we use JAXB in DB Migrations (extremely common) and also Autotune (rarely used). We have held off migrating to Jakarta JAXB due to the incompatibility this causes. We actually bumped to jakarta JAXB, hit these issues, investigated and decided to revert back to javax JAXB. Refer: #2722

Q: Will Ebean maintain a fork due to the incompatibility in JAXB?
A: I really really want to avoid that if at all possible.

Q: Are there any other issues other than JAXB?
A: We have optional and minor use of javax.servlet (provides the option to shutdown ebean when servlet context is shutdown) and JTA Transaction but these will not be a major issue to deal with and will not require a fork.

Refer: #2722
Refer: ebean-orm/javax-persistence-api#8

@rbygrave rbygrave self-assigned this Sep 19, 2022
@rPraml
Copy link
Contributor

rPraml commented Sep 19, 2022

FYI: We don't have a timeline yet when and how we go to Jakarta.*

Q: Will Ebean maintain a fork due to the incompatibility in JAXB?
A: I really really want to avoid that if at all possible.

Other projects do so (logback e.g.). And yes, I can understand that you really really want to avoid this.
We have the luck, that only 3 sub-modules are affected. So I see the following options:

  • Bump ebean to the next major version (14) and use jakarta everywhere. Others can still use version 13.x of autotune, ddl-generation and external mapping. The API between these modules should be very mature, so this shouldn't be the problem.
    I also think the modules itself are mature. (Ok, we occasionally fix small bugs in db-migration)
    This is the less effort, just keep the API compatible (and maybe the one or other backport is needed)

  • Simply copy the affected modules, so we have a "-java" and "-jakarta" module in the master branch. This means duplicate code, which may cause maintenance problems in the future.

  • Do the translation automatically in the maven build (e.g. https://rmannibucau.metawerx.net/move-from-javax-to-jakarta-with-apache-tomee-9-2.html - I didn't check, if that really works!) and move the two artifacts separately to mvncentral

@rbygrave
Copy link
Member Author

Refer to discussion at: #2839

@rbygrave
Copy link
Member Author

rbygrave commented Mar 1, 2023

As release 13.14.0 onwards we will additionally release a Jakarta version, so we have released 13-14.0-jakarta version of the various ebean modules.

At this stage we can close this issue.

Refer to the discussion for more details on what we are doing and how it works etc.

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

No branches or pull requests

2 participants