-
Notifications
You must be signed in to change notification settings - Fork 42
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
Request for distinguishing acronym for "Jakarta XML Binding", different from JAXB #179
Comments
It depends on what exactly you want to support and what price you are willing to pay for it. Since APIs as well as implementations are in different packages, one should be able to:
this way one should be able to avoid duplicating the code and support even JPMS properly - An alternative could be to define default, say One point you are not considering is impact of JPMS - do you want/need to support it or not? The problem with "old" JAXB impl is that some of its artifacts are hard, if not impossible, to update for JPMS because of split package problems (not a problem if one uses/depends on artifacts with I'm far from knowing how exactly this can be implemented in your particular case and what exactly you have to support, ie this won't work if you need
I've started using XMLB as a shortcut for Jakarta XML Binding. Do not take that as an official name, it's just that I'm trying to safe myself from typing :-) The only thing which should be taken as granted is that nothing with JAXB can be used (see guidelines) by projects governed by Jakarta EE. |
Thank you for all the advice! And just to make sure, I am not asking about how to implement this so much for my use case -- which is unfortunately "branch" level; neither app code (where no one depends on library), nor platform code (jax-xx provider); but rather between those two layers. I guess implementing dual-handling could be possible in some cases, but there is a non-trivial downside of doubling dependencies and keeping old api around. This could be confusing to users, esp. since IDE auto-completion would now bring up 2 choices for all types. But if forking what I am hoping to figure out is the naming part, to try to reduce confusion to end users. I hope this makes more sense: this is not an easy problem to necessarily explain. Now, on naming idea: XMLB sounds like a potential name I could use. One caveat is that I will also need to think of similar counterpart for JAX-RS api and it would be nice if there was a pattern. But I can understand why this may be challenging. |
TL;DNR; to distinguish "old" Java XML Binding api -- JAXB -- from new Jakarta XML Binding api -- not JAXB -- some distiguishing Id would be useful. Not sure what: JAKB? JAKXB? JAXB3?
(I kind of like "JAKB" even if I initially added it as a joke).
Longer story:
Now that there is a major breaking version change in this space -- old "JAXB" not being binary or source compatible with new one, due to package (java package, maven group) change -- it is necessary for many intermediate packages to indicate which java XML binding api they implement.
In my case this is for Jackson JAXB annotations package:
https://github.com/FasterXML/jackson-modules-base/tree/master/jaxb
The change itself should be quite mechanical, although now there is need to support 2 different (if similar at many levels) APIs and that cannot be done with just one package. Solution there is to do something like:
Former has the benefit of just a single source codebase and may work initially. Latter has the downside that it literally doubles code to maintain (until old one can be deprecated in distant future), but upside that it Actually Works and will keep working when new Jakarta XML Binding API possibly changes (presumably old JAXB will not).
So I am thinking of going with the latter route for Jackson 2.13: but if so, will need a new name.
So
jackson-module-jaxb-annotations
needs to be come something else. If so, I would like to follow a well-known pattern: perhapsjackson-module-jakb-annotations
So: I think there should be acronym for Jakarta XML Binding, different from "JAXB" (which refers to old Java XML Binding).
But what should that be?
The text was updated successfully, but these errors were encountered: