r/java • • Apr 06 '26

Jakarta EE 11 vs Spring: When the Right Answer Is No Spring at All

https://www.javacodegeeks.com/2026/03/jakarta-ee-11-vs-spring-when-the-right-answer-is-no-spring-at-all.html
42 Upvotes

98 comments sorted by

11

u/Joram2 Apr 06 '26

Quarkus + Helidon use mostly Jakarta APIs; as in developers use Jakarta APIs to write their apps. But I've heard people say that these aren't real Jakarta, the linked article doesn't even mention Quarkus + Helidon as Jakarta. I'd be curious to hear why the linked article and many others don't consider Quarkus + Helidon as real Jakarta options?

I disagree that Spring gives you faster development. I create new apps with Helidon, Payara Micro, and Spring Boot pretty quickly.

In terms of Security, REST, Database Access, Dependency Injection, health + metrics, I don't see any large pros or cons between Spring Boot and Jakarta.

4

u/josephottinger Apr 06 '26 edited Apr 06 '26

Well, that's a framing question, too: Jakarta API vs a specific Jakarta EE implementation? After all, I can use Jakarta APIs in Spring Boot if I so choose - the APIs are there, the specs have implementations. It wouldn't be very smart, I think, but "smart" and "doable" aren't the same things... but the article seems to be suggesting that Jakarta EE profiles are preferred by developers, like they're rushing out to use Payara, Wildfly, Liberty, or whatever, which is a fascinating conclusion because I can't find people willing to say that that's what they are doing.

That doesn't mean they don't exist: the claim as stated might be 100% valid. It's just that they're generally quite quiet and difficult to find, even though they should be visible: you don't have people muttering even quietly about their recent successful migration to Wildfly. You'd think there'd be more discussion about server resource allocation/acquisition, you know? The Jakarta EE deployment model has not changed enough to avoid that. You don't expect everyone to blurt out industry details or secrets, but you do expect a groundswell of background noise, and it's difficult to see right now. Again, not saying it doesn't exist, but it feels anecdotal more than it should.

(ETA to mention more about the Jakarta deployment model, one of the main reasons IMO that Spring, et al, ate Jakarta's lunch in the developer mindspace in the first place.)

5

u/johnwaterwood Apr 06 '26

 ETA to mention more about the Jakarta deployment model, one of the main reasons IMO that Spring, et al, ate Jakarta's lunch in the developer mindspace in the first place.

Technically Jakarta EE does not really demand that there’s a separate server runtime that engineers cannot touch, and for which they have to supply a war file that some grumpy OPS guy will then deploy.

As early as 2003 in various jobs I’ve also supplied the AS + war as essentially a single unit under control of engineering.

Of course, I know that by far not every company operated like that, and the inability to touch the centrally installed AS, often severely out of date, since grumpy and sometimes borderline evil OPS could not be *rsed to update anything ever, is what caused the hate.

Spring got famous and popular by allowing the engineering team to effectively sneak a complete application server into production, updating and patching it at their will, circumventing OPS totally (as long as no newer JDK or newer Servlet version was required, which still came from the centrally installed thing)

2

u/josephottinger Apr 07 '26

I disagree. Spring got famous by removing the barriers between configuration and deployment. The embedded services came later, but by then Spring had killed the remote-EJB-running-locally mechanism, and good freaking riddance. I was there. I talked to Rod about it; Floyd and Dion and I were part of watching it happen. Heck, I have a copy of Rod's J2EE without EJB signed to me on my bookshelf right now; I'm looking at it.

Rod and I had our differences - I was used to more flexible app servers that didn't have the barriers Spring destroyed, so for me Spring was never really all that necessary. (I never even realized ejbc was a thing for a while: I'd been deploying in Orion without it for a long time, and the "network layer" for in-container invocation didn't exist in Orion. Great server, destroyed by being bought by Oracle. C'est la vie.)

But long term he had the right idea: barriers to development are bad, and he showed the way forward that didn't have those barriers. The embedded container stuff came later as a natural afterthought.

2

u/johnwaterwood Apr 07 '26

Wow, a fellow Orion user!

That actually was the server I used in 2003. From IronFlare, just two Norwegian guys. Still wonder till today what the Evermind did in my stacktraces.

Using remote everything for EJB was crazy, and for EJB entity beans that was even crazier. But those latter were already very controversial under the EE vendors when introduced.

 But long term he had the right idea

Initially, sure. But from EE 5 onwards and specifically EE 6, those barriers and issues were not longer there or far less. Yet, I remember Rob talking about EE as late as 2009 as-if EJB 2 and J2EE 1.4 were still the latest version.

When asked about EJB 3 and EE 5 or 6 there was some handwaving that most people were still on EJB 2, and… and that’s where my comment came from, that J2EE could not be updated easily since grimpy OPS needed to be convinced, while with Spring you could hide the runtime inside your war and update with every deploy of your app.

His excuse why he could compare 2009 spring to 2005 J2EE.

2

u/josephottinger Apr 07 '26

It was three guys, not two - Karl, Magnus, and Magnus!

Entity beans weren't controversial as much as not very easy to use, especially when there were alternatives.

As far as the marketing: by 2009 I was out of all of that, and was watching from afar. The marketing never really mattered to me, so I just shrugged at it.

1

u/josephottinger Apr 06 '26

Hey, you don't have to tell ME - I deployed on Orion for years. I thought Spring was funny until I had to work with its actual targeted market - those poor WebLogic and WebSphere users, stuck with ejbc and a deploy cycle from hell.

34

u/obetu5432 Apr 06 '26

why are you trying to sell me Jakarta EE?

who paid for this?

-5

u/henk53 Apr 06 '26

Why are you always trying to sell Spring? Does Broadcom pay you for it?

0

u/[deleted] Apr 06 '26

[deleted] — view deleted comment

2

u/johnwaterwood Apr 07 '26

 They been trying to tell us Spring is bad since the begining.

It’s really Spring that launched massive smear campaigns against EE for nearly all of its life. The evidence is still in the archives of TheServerside.com.

J2EE is long going. It’s Jakarta EE now, and EARs and EJB is largely a thing of the past.

Or shall I claim that spring users still need to maintain 10mb+ xml files for their bean configuration?

5

u/josephottinger Apr 07 '26 edited Apr 07 '26

Okay, as someone who's, uh, rather heavily represented in those archives at TSS - which are, sadly, no longer available since they mangled everything in the port to Wordpress and Informa has no interest in supporting the site - I don't think it's really a "smear campaign." With all due respect, the smearing on TSS was JBoss, not Spring, and Spring was standing up for the "little guy" against Big Iron.

And they had a point; app servers influenced by San Francisco and the like were quite powerful but represented a model that was more suitable for those gimpy OPs people, as you framed it elsewhere. Developers were not trusted, they should stay in their lanes, resource allocation belongs to the admins, we'll give you a resource when you know how to ask for it... a model that made development an absolute pain (because developers had to build deployments themselves just to test) AND a model that didn't actually map well.

Again: TSSJS 2004 or so, Floyd asked the audience how many used EJBs: hands went up everywhere. He then asked how many used them to connect to non-localhost servers, and it was something like 3%. And considering that the app servers at the time apart from Orion (very much a niche app server, despite being the best one IMO) all used network layers for EJBs, that's a huge performance sink. IIOP just to talk to a bean in the same JVM? Whyyyyyyyyy - it's a discipline I ran into late because it hadn't affected me. Orion would optimize such calls internally and fly. Other app servers got similar optimizations later - and the Local EJB stuff helped formalize it.

But that's representative of the whole pattern: Someone comes up with a better plan (Spring, Orion, Hibernate, Maven, Gradle...) and people adopt it and the ecosystem adjusts. Nothing unusual about it, really.

I am, BTW, working on a spiritual successor to TheServerSide. It's undergoing some hefty maintenance work at the moment, but it's working, and it, well, has a TSS editor at the helm.

ETA to clarify: Floyd created InfoQ.com, and InfoQ is great. It's just not the same spirit as TSS was, with a different kind of audience. I'm thinking more of the grassroots developer, which InfoQ does not target nor should it.

4

u/henk53 Apr 07 '26 edited Apr 07 '26

With all due respect, the smearing on TSS was JBoss, not Spring, and Spring was standing up for the "little guy" against Big Iron.

That's not how I remember it. Every article about J2EE and later JEE attracted dozens if sometimes not many dozens of people with dubious histories all responding in a similar way: "who's still using J2EE??? Use Spring!!!"

Even for mundane articles about some minor update of one of the more obscure APIs in J2EE at the time. It's like how every, and then I really mean EVERY post about the Eclipse IDE here on r/java is raided by gangs of user asking "Who is still using Eclipse??? Use IntelliJ!"

And yes, JBoss (by name of Marc Fleury) did some of that too, but I saw much more of that coming from Spring "users".

Spring was standing up for the "little guy" against Big Iron.

That sounds... naive. Maybe initially. But later on I think Spring was standing up for Spring and nothing else. They also had users to gain, marketshare to gain.

They lied for a long time that Spring MVC was used much more than JSF. They kept repeating it, and repeating it, despite all evidence at the time pointing to it simply not being true. Then eventually it did became true. I guess their smear campaign did the work (of course Angular & co have beaten both Spring MVC and JSF, but that's another story).

a model that made development an absolute pain

Obviously I agree.

The nuance is that from early on one did not have the follow that model. You already mentioned Orion. Other options were a homegrown stack based on Tomcat (e.g. Tomcat + Hibernate + Mojarra + ...), and not much later the early versions of JBoss, like JBoss as 3 and 4.

Also, J2EE/Java EE itself began to open up around 2005 for a model away from the San Francisco project and giving developers more APIs to handle things themselves. Servlet's HttpServletRequest.authenticate/login and @DataSourceDefinition are examples of breaking this model down. The JASPIC API (Jakarta Authenticaton) essentially fully opened the authentication part to developers, away from security configuration out of reach and maintained by those gimpy OPs people.

All of this was fully ignored by Rod & co.

Instead of saying; "WebSphere and WebLogic, and the practice of putting developers in their own lanes are evil, but with Orion/JBoss/Tomcat stack and using APIs like the above mentioned you don't have to follow that model" he just said "J2EE is evil, from the good of my heart I bring you Spring. Please use my Spring and all your prolems will go away"

It's "Wij van WC eend...", isn't it? (https://en.wikipedia.org/wiki/Toilet_Duck#:~:text=In%20the%20Netherlands%2C%20the%20advertising,campaign%20that%20ended%20in%201996.)

I am, BTW, working on a spiritual successor to TheServerSide.

Sounds interesting!

2

u/nlisker Apr 09 '26

It's like how every, and then I really mean EVERY post about the Eclipse IDE here on r/java is raided by gangs of user asking "Who is still using Eclipse??? Use IntelliJ!"

As an Eclipse user, I go to read the comments on Eclipse posts just to make sure this sub still does exactly what you describe :)

→ More replies (10)

3

u/analcocoacream Apr 07 '26
  • please do link here the so called evidence.
  • every one uses spring boot and annotations

3

u/josephottinger Apr 07 '26

Evidence would be nice, BUT "everyone uses spring boot and annotations" is trivially falsifiable. If you're going to demand evidence for others' claims, you might want to bring some evidence of your own. :D

→ More replies (4)

22

u/josephottinger Apr 06 '26

It's interesting, but fails to say what the developers MEAN - it even mentions explicitly that Spring uses Jakarta APIs "under the hood" ... which isn't quite correct, because you're going to end up littering your Spring code with Jakarta references if you use Jakarta APIs pretty trivially.

It's "under the hood" like your skull is "under your skin."

So when this audience "prefers" Jakarta EE - was the question actually "Would you rather deploy using nothing but Jakarta EE APIs, into a Jakarta EE profile, over using Spring or any related technology?" - because if it isn't, this is an interesting article that asked a Jakarta EE audience if they prefer Jakarta EE APIs.

That's like asking a lot of Reese's stockholders, smeared with peanut butter, if they prefer M&Ms.

0

u/[deleted] Apr 06 '26

[deleted] — view deleted comment

5

u/josephottinger Apr 06 '26

And to be more specific: no, using Jakarta APIs does not mean you can deploy Spring on a servlet container. It has that downstream effect, but that's not the primary: it uses Jakarta APIs because there's no point in Spring having its own servlet equivalent, or its own JAX-RS equivalent, or its own JNDI layer. It uses those APIs because those are the basic enterprise APIs and Spring wraps them where they should be or could be replaceable, or exposes them where there's no advantage in replacing them.

You can write a Spring application with no Jakarta references in your own code - but the implementation's going to bring over Jakarta APIs unless you do some serious work to avoid that - and why would you bother? You don't win anything from that effort. (Theoretically you could, but realistically, no.)

The end result is that you do end up with jakarta.* references in your own code and nobody worries about it at all. And that's the right outcome.

0

u/[deleted] Apr 06 '26

[deleted] — view deleted comment

2

u/doobiesteintortoise Apr 06 '26

I'm... not sure what you're asking. If I'm using Spring Data JPA, it is using Jakarta EE. If I'm using JMS - as in, JMS and not the underlying protocols like AMQP - I'm using Jakarta EE to do it. And so would everyone. Spring is wrapping Jakarta EE, it's not replacing it, and that's been the case since 2004 or so.

1

u/persicsb Apr 06 '26

Actually, Spring is replacing CDI with Spring IoC.

Since the Jakarta EE APIs are more and more rely on CDI, implementing/wrapping them them with Spring IoC will be a hassle in the future.

2

u/doobiesteintortoise Apr 06 '26

Um, I'm not sure what your claim is here: Spring predates Jakarta EE's CDI, CDI has always been a bit of a bridge to cross, it's ... still a bridge to cross and yes, it may be a hassle in the future but that's not new nor is the level of effort a given and/or constant.

It does not address which one is preferable - that's not a claim I am willing to address myself, as it's a preference; I know what I prefer and why, but that is not a recommendation for anyone else, you need to decide for yourself what you're willing to use or endure, and why.

4

u/josephottinger Apr 06 '26

FWIW, I have a number of books published under my own name covering Spring, and I talk to Josh Long fairly regularly and I know Rod. I appreciate the observation, but I also am already aware.

5

u/maethor Apr 06 '26 edited Apr 06 '26

I noticed that the side by side comparison completely ignored documentation, which is all over the place with JEE (want to inject an event bus into a Quarkus app? That's at least 3 different documentation sources). At least with Spring, the docs are somewhere on spring.io.

1

u/Additional_Cellist46 Apr 09 '26

What you’re comparing is Spring with Quarkus. Not with Jakarta EE. It’s really hard to compare JakartaEE to anything like Spring or any specific framework. Spring is a framework, JakartaEE is a specification. Even the original article above is wrong when it compares them

Spring can be compared to application servers like JBoss or WebLogic. Or to other frameworks like Quarkus. Or to runtimes like Payara Micro or Embedded GlassFish.

What Jakarta EE is, is different. It’s a common API framework adopted by many of the above - Quarkus supports a part of it (the Core profile), app servers and many runtimes provide either all Jakarta EE APIs or a subset (Web or Core profile)

Jakarta EE unifies multiple frameworks, servers, runtimes. A single API to learn, a single API to use, with any of them. Each server or framework can include Jakarta EE documentation in their documentation and some really do.

Spring is a different story. It provides a small subset of JakartaEE, a selected subset which doesn’t compose any of the defined profiles. Some JakartaEE knowledge can be reused but not much. All needs to be in the Spring documentation.

1

u/Additional_Cellist46 Apr 09 '26

I would also note that yes, the docs for Spring are all on spring.io. But if you want to find out how to do things, even on spring.io you find multiple tutorials on how to do it. And often none of them is complete. Some are even outdated and it’s hard to say to which Spring version they apply. Having all documentation on a single site doesn’t mean it’s of higher quality.

-1

u/persicsb Apr 06 '26

Jakarta EE specs are in one single place: https://jakarta.ee/specifications/

It is properly versioned, you have the spec document (in PDF and HTML), the javadoc.

1

u/maethor Apr 06 '26

And that will have documentation for io.quarkus.vertx., io.vertx.mutiny.core.eventbus. and io.smallrye.common.annotation.*? Including plenty of tutorials?

2

u/persicsb Apr 07 '26

Those are not part of Jakarta EE.

1

u/maethor Apr 07 '26

So, in order do anything useful with JEE I need to use things like Quarkus or Helidon on top of it, but they don't count as JEE? That makes "Jakarta EE vs Spring" a pointless discussion.

1

u/persicsb Apr 07 '26

No, you don't have to use Quarkus or Helidon. Why would you think that?

→ More replies (2)

1

u/[deleted] Apr 06 '26 edited Apr 06 '26

[removed] — view removed comment

2

u/johnwaterwood Apr 07 '26

You are not wrong really. There ARE plenty of EE resources, but they are not coherently linked and integrated.

The API documents (aka the specs), the tutorial and the official examples could be much better integrated and should pretty much al link to each other.

It’s made worse by every vendor such as Payara, IBM and Tomitribe creating their own examples or even forking the official ones and publishing them on their own sites instead of contributing changes to the central shared site.

2

u/persicsb Apr 06 '26

Haven't you heard from the Java EE tutorial? It demonstrates every aspects of Java EE: https://javaee.github.io/tutorial/toc.html

It is being modernized now: https://jakarta.ee/learn/docs/jakartaee-tutorial/current/index.html

9

u/Distinct_Meringue_76 Apr 06 '26

10+ years Spring vet here. 10 years j2ee before that. Came back to jakartaee and there's no looking back. I only need a single dependency "jakartaee-api" and the Dev UX is at least as productive as with Spring or quarkus. Hot code reload in debug mode is instantaneous in eclipse. Hot deployment is less than 2 sec with eclipse Glassfish integration. To me right now, there's no reason not to use Glassfish or Payara in 2026. I know that Spring boot is very popular. They Have definitely changed the game in enterprise Java. I always joke that Spring boot is a programming language. I've seen people write their first hello world application by generating a Spring boot app but I digress. Use Glassfish or Payara and stop programming your pom.

2

u/j4ckbauer Apr 06 '26

I worked at an organization that refused to use Spring because they felt it was inefficient from a performance/billing perspective for their use case (basic REST API backend in cloud hosting). I'm curious if there are any benchmarks on the subject.

5

u/chabala Apr 06 '26

Article framed as "Jakarta EE vs Spring", but many Java applications need neither. I've seen plenty of Spring applications that were using Spring 'just because', and the developer didn't know any better.

Did you need Spring to load properties files and do some light dependency injection? Most developers I interview don't know what DI is.

6

u/PiotrDz Apr 06 '26

And don't even start on Sprijg Data Jpa. This monstrosity is considered a default in so many projects but nobody asks why is it needed

8

u/[deleted] Apr 06 '26

[removed] — view removed comment

2

u/PiotrDz Apr 06 '26

Fortunately even for auto generation there are other, less complex tools

→ More replies (6)

1

u/Joram2 Apr 06 '26

> many Java applications need neither

If you aren't writing a server app, you definitely don't want a server app framework. If you are writing a server app, all the major options are some flavor of Jakarta or Spring. There are a few other options, like Vert.x (without Quarkus), but generally, I could write everything myself, but I wouldn't want to reinvent the wheel.

4

u/neopointer Apr 06 '26 edited Apr 21 '26

JEE lost the war (pun intended) long time ago. The developer experience with application servers was always a pain in the butt. Like it or not spring's devx is great compared to plain JEE.

Edit: typo

8

u/Joram2 Apr 06 '26

I've used Quarkus, Helidon, Payara 7 Micro along with Spring Boot. They are all competitive options. I haven't tried Glassfish or OpenLiberty or WildFly, but I would imagine they are comparable.

4

u/vips7L Apr 06 '26

I've really enjoyed Microprofile in quarkus and helidon.

13

u/persicsb Apr 06 '26

Have you tried the modern Jakarta EE developer experience?

6

u/thewiirocks Apr 06 '26

Generally a self-inflicted poor experience. Netbeans + Glassfish provided an unparalleled good, highly integrated, and fast to develop experience 15 years ago. But everyone insisted on using literally anything else. If they weren’t restarting their server on every change like a caveman, they weren’t happy.

Not much has changed, unfortunately. Most developers continue with Node.js or Python servers that have to be restarted with every small change. They instead look to AI as the solution for faster development rather than solving the fundamental issues slowing them down.

7

u/Distinct_Meringue_76 Apr 07 '26

Underrated comment. I've used eclipse+ Glassfish and my velocity is unbeatable when compared to spring boot or quarkus. Will try with netbeans as well and report back.

3

u/thewiirocks Apr 07 '26

Interested to hear your thoughts. The integration isn’t as good out of the box since Netbeans and Glassfish were split, but with a bit of work Netbeans can still be configured to live-deploy class updates.

4

u/henk53 Apr 06 '26

JEE lost the war (pun intended) long time ago.

But do we celebrate it? Do we actively hinder the return and improvement of Jakarta EE, just because we want Broadcom to have a full monopoly?

3

u/neopointer Apr 06 '26

You're right. I don't think it should be celebrated, but I currently don't have the incentive to try the latest JEE stuff they are creating because I will for sure not use it at work and hardly see myself using it outside work.

If there are articles or videos comparing spring with the latest JEE I'm happy to read/watch though.

1

u/Additional_Cellist46 Apr 21 '26

What could happen to change this? I see this argument everywhere that all jobs require Spring. But in the past, no jobs required Spring, just developers found their way to use it in their projects and run in on top of J2EE servers. Nowadays, I see a lot of people watching Jakarta EE and many of them hoping to use it in they day job.

I also see that some major companies are migrating from SpringBoot to Quarkus. I know in what Quarkus excels but what are the real reasons and arguments why they migrate to it? What would make them consider other Jakarta EE options? Is it development speed, fitness for microservices and Kubernetes, speed of startup, resource usage, GraalVM support? Or anything else? If other solutions excel in these areas would it be enough for architects to recommend them or something else matters?

2

u/Prior-Equal2657 Apr 06 '26

If I want to use Jakarta EE APIs I'll go Quarkus. Why in the 2026 such thing as application server still exists?

6

u/persicsb Apr 06 '26

A Spring Boot app is the same as an app server actually

1

u/[deleted] Apr 06 '26 edited Apr 06 '26

[removed] — view removed comment

3

u/persicsb Apr 06 '26

Both are runtimes, that provide a managed environment for you application code.

An AS provides managged tools for web services, messaging, e-mails, scheduling, batch processing, database access, transactions, thread pools etc.

That is the same for Spring Boot - it preconfigures and manages those resources for you. The resources are created and managed by the framework, you don't instantiate it your own, you let Spring Boot configure them for you.

From a programmer point of view, both are the same - managed resources, injected into your code, so you can use those services.

A Spring Boot app is a managed environment for your code.

-1

u/[deleted] Apr 06 '26 edited Apr 06 '26

[removed] — view removed comment

1

u/henk53 Apr 07 '26

If Spring Boot were an actual application server, how can it be used seamlessly with another application server?

As a POC we deployed Piranha (https://github.com/eclipse-ee4j/piranha) to a Spring Boot AS (packaged Piranha inside the Spring Boot generated uber jar), since a customer prescribed that Spring Boot should be used for everything.

This gave a us a rather complete Jakarta environment (not perfect, since Piranha doesn't implement everything) running on Spring Boot.

2

u/persicsb Apr 06 '26

The Kubernetes level stuff is the same for both: you manage the JVM process (as kubernetes deep down only manages processes). It does not matter, if you manage the JVM that runs Glassfish with your code, or manages the uberjar created by a Maven Spring Boot plugin build.

1

u/Additional_Cellist46 Apr 21 '26

You said it. Jakarta EE is just a set of APIs. It doesn’t define that an app server must implement them. In reality, many app servers do but there are also frameworks and runtimes that implement it too.

Spring also provides APIs to use. It’s just a different set of APIs from Jakarta EE. Spring is a framework, in needs a server to run. But SpringBoot runs your application, it contains a sever. So it’s an app server. Most of app servers just integrate a servlet container like Tomcat or Undertow instead of having their own. So they are all similar. With SpringBoot you can build executable JARs that contain server and app, and you can also build WAR that needs a server. With many Jakarta EE runtimes you can do both too - build an executable JAR and also run a WAR with a server.

So what’s the difference? The only difference is in the API, which are mostly incompatible. And in the mindset and philosophy - while SpringBoot heavily promotes building standalone JARs, Jakarta EE prefers the WAR model and but still gives you many options to package and run it.

4

u/henk53 Apr 06 '26

Because it works really well in a docker image?

One layer holds the EE/AS runtime, the top layer holds your war.

-1

u/Prior-Equal2657 Apr 06 '26

This still sounds overcomplicated. Why do I need application server if quarkus compiles to native binary and starts in milliseconds?

3

u/persicsb Apr 06 '26

Quarkus cannot compile everything to native binary, that Jakarta EE offers. They have serious limitations. But actually, those limitations are addressed in the Jakarta EE spec with the introduction of CDI Lite - CDI Lite is build time, like ArC in Quarkus.

But everything that is beyond CDI Lite, cannot go native - the same limitations as ArC has.

1

u/Additional_Cellist46 Apr 21 '26

This isn’t true. Helidon supports native with all of the CDI features. Quarkus doesn’t support all CDI not because of native compilation but because it aggressively moves all configuration and bootstrap to build time.

Dynamic extensions work also with native, even reflection works with native if the framework is wise enough to build the right metadata to keep the seemingly unused code in the native binary. Quarkus just doesn’t have enough information at build time from them and it refuses any runtime configuration at startup.

3

u/Joram2 Apr 06 '26

By native binaries, I presume you mean Graal; the JDK team themselves are steering people away from Graal and emphasizing features like Leyden for faster startup.

Frameworks like Payara Micro (Glassfish has similar options), you build a single app as a .war and run via Payara Micro. IMO, that's a very small step down from building simpler standalone artifacts as .jars, fat .jars, or jlink builds. But it's not a big difference. There, Payara + Glassfish are more Jakarta framework implementations than legacy application server. I would agree that classic app servers designed for multiple applications seem pretty pointless, especially when you are using containers.

1

u/Prior-Equal2657 Apr 06 '26

Let's not forget about developer experience (AKA hot reload in quarkus).

With my Glassfish/JBoss/Tomcat experience from 10 years ago development was done via some kind of exposed wars. Still, way less convenient comparing to what we have out of application server ecosystem today.

2

u/persicsb Apr 06 '26

With my Glassfish/JBoss/Tomcat experience from 10 years ago

Please, do not compare today's Jakarta EE dev experience with one from 10 years ago.

1

u/Prior-Equal2657 Apr 07 '26

But what changed? Still some "war", "ear", etc... Still deploy to application server instead of starting minimalistic embedded one.

2

u/persicsb Apr 07 '26

Wildfly, Liberty, Glassfish can all be embedded. All of the subsystems can be turned off, if you do not need those. If you only want to use the Web Profile, use it, no other stuff will be available and configured.

1

u/Prior-Equal2657 Apr 07 '26

Just compare https://glassfish.org/docs/latest/embedded-server-guide.html

to https://start.spring.io/ or https://code.quarkus.io/ or https://micronaut.io/launch/

Still don't see why I should go WAR/EAR (unless I need some very fancy stuff like distributed transactions which are configurable in spring boot also btw)

→ More replies (1)

1

u/henk53 Apr 06 '26

Why is it overcomplicated?

A war archive is a very standard and well understood artefact. It's very good to separate your own / business code from your framework runtime code.

Native binaries have a whole slew of problems. It's not a default go to or silver bullet. It comes with serious tradeoffs. Very good for commandline apps, or serverless, but not so good for long running server processes.

Quarkus doesn't start in milleseconds when using the runtime JIT optimizer. Then it may be several seconds. An AS like GlassFish takes about the same amount of seconds.

1

u/OwnBreakfast1114 Apr 07 '26

A war archive is a very standard and well understood artefact. It's very good to separate your own / business code from your framework runtime code.

Is it? I mostly see people just bundle fat jars and call it a day.

1

u/henk53 Apr 07 '26

Is it? I mostly see people just bundle fat jars and call it a day.

It is. Your docker image delta's become MUCH smaller.

1

u/OwnBreakfast1114 Apr 08 '26

Spring supports that via the layers if you really want: https://docs.spring.io/spring-boot/reference/packaging/container-images/efficient-images.html. You build the image as an exploded jar.

2

u/henk53 Apr 08 '26

Exactly, Spring supports it via layers and switched and it does work.

But that only strengthens the point that Jakarta EE with the war model was right all along. For Jakarta EE this seperation is totally native and natural. Spring has to jump through a few hoops to achieve the same.

1

u/Additional_Cellist46 Apr 21 '26

Do they also bundle JDK into their apps? Most of them don’t, even if that’s possible. With the JDK separate, it’s easier to patch the JDK wirhout rebuilding the app.

In the same way, it’s easier to patch the server runtime if you keep it separate. You can also keep JAR dependencies separate from the WAR, but it’s easy to update them also inside the WAR because they are stored as JARs in it, not shaded into other classes.

And it slows down startup time. When all is bundled in a JAR, all has to be either shaded at one pile, runtime and app classes, to avoid impacting startup time, or it has to be unpacked before loading classes, which slows down the startup. SpringBoot packes the JARs inside the single JAR in a clever way, but it still impacts startup time, and is very non-standard.

2

u/Distinct_Meringue_76 Apr 07 '26

Application servers solved the problem of Microservices before it was cool. In fact, they were doing nano services. Today, I see kids create lambda functions and orchestrate them in the cloud with queues and events. Seeing it got me so depressed that I became an erlang Developer along the way, but the Java job market was just too strong in comparison that I needed to come back. I have now settled on Glassfish and jakartaee.

1

u/Yesterdave_ Apr 06 '26

I guess the Jakarta EE APIs are more used simply because of Quarkus, Micronaut, Helidon. But I would consider those frameworks far from a "standard" Jakarta environment.