Repository navigation
Shall we move out non-Jakarta Persistence (JPA) modules to an extras repo? #2828
Replies: 2 comments 2 replies
What problem(s) do you see and how is it/are they - if any - (un)related to EclipseLink project's goals?
Why? Because they are not related to Jakarta Persistence? That does not seem like a good enough reason to do it. And if so, are there any resources to update existing and/or set up new build/integration/test jobs for each of these new repositories? Sounds more like bringing non-trivial amount of work on the table not only for this project but also for EF staff.
There are good reasons I do not trust AI - one of them visible here is that it misses the fact that jakarta persistence implementation in eclipselink will not run correctly without having moxy on the class/module path - unless someone or the force managed to fix this recently. Additionally, one should keep other consumers like WLS in mind, regardless of their current relevance. The surrounding ecosystem isn't strictly limited to GF and OL. However, I agree that certain modules could simply be dropped or archived in legacy branches rather than migrated—SDO and DBWS/DBWSBuilder seem like primary candidates. Only note that no other open-source SDO implementation exists these days and runs on modern JDKs and probably a surprise here is that one of its consumers is Eclipse Metro
I recommend proceeding with the core separation as was planned for 5.0 while keeping the remaining components untouched, ensuring maximal test coverage to mitigate regression risks. Furthermore, completing this split will likely necessitate an internal service registry (or sth like that), potentially unlocking alternative approaches for dealing with this extra burden. |
Basically reducing the complexity and surface, so it's hopefully easier for people new to the project to understand and reason about it. Some clearer top level folders could achieve a similar thing, perhaps. The core goal is an organisation that's somewhat easier to understand.
I did indeed think of WLS, and of course they remain important from the point of view of this project. I hope for them to consume EclipseLink 5 soon. I didn't want to exclude them on purpose, I just asked the AI to investigate GlassFish and Open Liberty. WLS wold be harder to investigate. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
While working on Jakarta Persistence 4.0 support for EclipseLink 6.0, I noticed (again) that the current repo actually contains many different things which are not relevant to Jakarta Persistence.
Maybe we should think about moving these to an extra repository?
I asked Claude AI to create a rapport about the current state of the repo and how it relates to GlassFIsh and Open Liberty.
Which EclipseLink modules are not the Persistence implementation
A dependency analysis of the EclipseLink reactor (branch
6.0), identifying what could move to a separate repository — and the one structural obstacle that decides how far the split can actually go.That makes the boundary unusually clean on paper. Roughly 153,000 lines of main source sit in modules the provider never compiles against — about 15% of the reactor's ~1.05M lines. The complication is not which modules are separable, but that the largest candidate has its foundation buried inside
core.Dependency direction, condensed:
Module verdicts
Sizes are main-source lines; test trees excluded.
org.eclipse.persistence.coreorg.eclipse.persistence.jpa.jpqlorg.eclipse.persistence.jpaorg.eclipse.persistence.jpa.modelgenorg.eclipse.persistence.moxyorg.eclipse.persistence.sdodbws.builderorg.eclipse.persistence.dbwsmoxy.utils.xjcorg.eclipse.persistence.jpars.serverorg.eclipse.persistence.jparsorg.eclipse.persistence.corbaorg.eclipse.persistence.extensionorg.eclipse.persistence.nosqlorg.eclipse.persistence.oracleorg.eclipse.persistence.oracle.nosqlorg.eclipse.persistence.jsonorg.eclipse.persistence.pgsqleclipselink.utils.renameeclipselink.utils.sigcompareXML binding stack
110,804 lines · 5 modules
By volume this is the obvious candidate and by subject matter the clearest:
moxyimplements Jakarta XML Binding, a different specification entirely.sdoimplements Service Data Objects.dbwsanddbws.builderexpose databases as web services. None of it is Persistence.It is also the one cluster that cannot be lifted out as-is, for the reason below.
The obstacle: OXM lives in core
376 files inside
org.eclipse.persistence.coreSo moving
moxyto another repository does not remove XML binding from the Persistence codebase — it splits one subsystem across two repositories, with the lower half still shipping insidecoreand the upper half consuming it as a published artifact. That is worse than the status quo: the same coupling, now spanning a release boundary.Note too that the Persistence provider itself imports
org.eclipse.persistence.oxmin four files. Those resolve againstcore, not MOXy, so they are not an argument for keeping MOXy — but they do show the XML foundation is genuinely entangled with the provider and cannot simply follow MOXy out of the door.The precondition is a core split, not a repo split. Extracting
internal/oxm,oxmandplatform/xmlfromcoreinto their own module is the work that makes the XML cluster separable. Until that happens, moving MOXy is a repository change that buys very little.JPA-RS
14,354 lines · 2 modules
The cleanest cut available.
jpars.serverdepends onjpaandmoxy; nothing depends on it except the aggregate artifacts (uber jar, BOM, javadoc). It exposes JPA over REST — a product built on the provider, not part of it.It carries a MOXy dependency, so it would naturally live wherever MOXy ends up. If the XML cluster stays put for now, JPA-RS can still move on its own and consume both as published artifacts.
Remote transports
7,856 lines · 2 modules
corbais a CORBA transport for cache coordination — 33 files ofsessions/coordination/corba. For a Jakarta EE 12 release this reads as a retirement candidate rather than a relocation one; moving it preserves a maintenance obligation that dropping it removes.extensionis small and miscellaneous: an SLF4J logger, a JGroups coordination transport, a Kryo serializer. Third-party integration glue rather than provider code. It already caused unrelated build breakage this cycle when JGroups 5.5 removedFLUSH— an argument for isolating its release cadence from the provider's.Data platform extensions
19,047 lines · 5 modules
These look peripheral by name and are not.
jsonis JSON column type support (JsonTypeConverter,MySQLJsonPlatform).pgsqlandoracleare database platform implementations.nosqlandoracle.nosqlextend the persistence runtime to non-relational stores.All of it is persistence behaviour that happens to be vendor-specific — the same category as the platform classes already inside
core. Recommend keeping them.Downstream consumers
The two Jakarta EE runtimes that ship EclipseLink integrate it in opposite ways, and only one of them is constrained by a split.
GlassFish — consumes the extras, integrates at bundle level
GlassFish consumes
moxy,dbws,sdoandjsonalongside the provider, using EclipseLink's own OSGi bundles. A split turns internal reactor ordering into a cross-repository release dependency — for a downstream that already hand-patches EclipseLink bundle manifests (appserver/distributions/*/src/main/patches/org.eclipse.persistence.jpa/), a mechanism that silently breaks when the patched manifest and the shipped jar drift apart.GlassFish is the constraint on any split involving the XML cluster.
Open Liberty — repackages, and ships none of the extras
Liberty does not consume EclipseLink's OSGi bundles at all. It assembles a single fat bundle (
com.ibm.websphere.appserver.thirdparty.eclipselink[.2.7]) with bndInclude-Resourcefrom exactly six Maven artifacts:It then authors its own
Export-Package/Import-Packageover the merged content, discarding EclipseLink's manifests entirely.com.ibm.ws.jpa.container.eclipselinkprovides the container glue;com.ibm.ws.persistenceis an internal persistence service importing onlyorg.eclipse.persistence.{jpa,logging,platform.server,sessions,transaction}.A repository-wide search finds no use of
dbws,jpars,corba,nosqlororacle. The two apparent exceptions are not real:moxyappears only in Apache CXF's JAXB-provider detection and anxmlBindingtest, andpersistence.sdoappears only in localization property files — SDO exception strings carried inside core's resource bundles, not the SDO module.Liberty consumes exactly the four modules marked Keep. Every move proposed here is invisible to it.
The asymmetry that matters
The repository split does not affect Liberty. The core split does.
Liberty repackages
corewholesale and re-exportsorg.eclipse.persistence.*, so it currently receives the 376 OXM files for free inside the core jar. Ifoxm,internal/oxmandplatform/xmlbecome a separate artifact, Liberty's fat bundle silently loses those packages unless the new artifact is added toInclude-Resource— a class of breakage their build will not flag, because bnd will happily produce a bundle with fewer classes in it.So the two steps need different handling: the repository split needs no downstream warning, while the core split needs coordination with both GlassFish and Liberty.
Other affected artifacts
eclipselinkuber jar aggregates moxy, sdo, dbws, corba, nosql, oracle, jpars and the extensions. Removing modules changes what that artifact contains — a visible, breaking change for anyone depending on the single-jar distribution.Recommendation
Split in the order that dependency structure allows, not by size:
utils.rename,utils.sigcompare. Nothing depends on them, and the provider is unaffected.corbarather than relocate it. Moveextension, whose third-party integrations benefit from an independent cadence.oxm,internal/oxmandplatform/xmlout ofcorefirst; the repository move is the easy step afterwards.org.eclipse.persistence.core, which Liberty repackages wholesale.The 6.0 line is a reasonable moment for the first two groups, since consumers are already absorbing a major version. The XML work is a larger architectural change and is better sequenced against a release where the Persistence 4.0 uplift is not competing for the same attention.
Derived from the EclipseLink reactor at branch
6.0. Dependency closure computed from module POMs overcompileandprovidedscopes;jpaadditionally declares optionalruntimedependencies onmoxyandjson, which do not affect compilation. Line counts are main sources only. Downstream usage verified againstOpenLiberty/open-libertyand a local GlassFish checkout.All reactions