Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Why did Java web deployment move from wars on shared application servers to executable jars with embedded containers, and what was lost?

Deployment moved to executable jars with embedded containers because each service became self-contained, easy to run in a container, and fully under its team's control, with its own container version and configuration and no coordination with server administrators. What we lost were the shared services the application server provided, such as managed connection pools, JNDI resources, clustering and session replication, which now come from libraries or the platform, while operational concerns like restarts, scaling and routing moved to orchestrators such as Kubernetes.

Why this question is asked

Fifteen years ago a typical enterprise Java application was a war file handed to an operations team, who deployed it into a WebLogic, WebSphere, JBoss or shared Tomcat server alongside other applications. Today almost every new service is a jar that starts its own Tomcat or Jetty with java -jar, usually inside a container image. Interviewers ask senior candidates why this happened and what it cost, because the answer shows whether we understand the trade-offs behind our platform rather than taking it for granted. In this answer, we will recap the application server model, see what embedded containers changed, look honestly at what was lost and where those responsibilities went, and draw the lessons for platform decisions today.

1A Quick Recap of the Application Server Model

A war (web archive) contains an application's classes and libraries but no server. It runs inside an application server, a long-running process that provides the servlet container plus many shared services: database connection pools configured by administrators and looked up through JNDI, the Java naming directory; JMS messaging; distributed transactions; security realms; clustering with session replication; and an admin console to deploy, start and stop applications.

The model made sense when servers were expensive physical machines. Many applications shared one server, administrators tuned it once, and developers wrote code against standard APIs without knowing database passwords or cluster details.

2Why Embedded Containers Won

Spring Boot and similar frameworks reversed the relationship: the container became a library inside the application. A service is one jar with everything it needs, started with java -jar. Several pressures made this win.

First, independence. In the shared model, upgrading Tomcat or a library on the server required every application on it to be tested, and a change request went through the server administrators. With an embedded container each team picks its container version and settings, upgrades on its own schedule, and owns the result. Second, containers and microservices. A self-contained jar fits naturally into a Docker image: one process, one port, configuration through environment variables. Third, parity: the same jar runs on a laptop, in CI and in production, removing a whole class of works-on-my-machine problems caused by differences in server configuration.

Shared application server versus embedded container
ConcernWar on application serverExecutable jar
Container versionChosen by server adminsChosen by the team, in the build
Connection poolsServer-managed, via JNDIHikariCP library in the app
Clustering, sessionsServer replicationRedis, Spring Session, or stateless
Restarts and scalingAdmin console, scriptsKubernetes deployments, autoscaler
ConfigurationServer settings and JNDIProperties, env vars, secrets
Blast radiusOne bad app can hurt neighboursIsolated per process

3What Was Lost

Moving the container inside the application also moved responsibilities that the server used to carry. Managed connection pools are the clearest example: administrators once tuned one pool per database and could see every application's usage in one console. Now each service embeds HikariCP with its own pool size, and fifty services with pools of 20 can open 1,000 connections against a database that handles 500, unless someone coordinates.

Clustering and session replication disappeared; sessions now go to Redis or services become stateless. Distributed transactions through the server's transaction manager are rare now, replaced by outbox and saga patterns. Centralised security realms became identity providers with OAuth 2 and OpenID Connect. The admin console became dashboards and kubectl. None of these losses is fatal, but each needs a deliberate replacement, and some, such as connection limits and secret handling, are easy to forget.

4Where the Operational Concerns Went

The responsibilities did not vanish; they moved down to the platform. Kubernetes restarts failed processes, rolls out new versions, scales replicas and routes traffic through Services and ingress. Health checks that admins once watched became liveness and readiness probes, which Spring Boot Actuator exposes. Secrets moved to Kubernetes secrets or a vault, and logs and metrics to a central observability stack.

In other words, the application server was split in two: the part that runs our code went into the jar, and the part that manages many processes became the orchestrator and the platform team's services. Some shared concerns are coming back in new forms, such as service meshes for mutual TLS and traffic policy, and database proxies that pool connections across services.

Step throughWhere application server duties live now
  1. Application jarEmbedded Tomcat or Jetty, Hikari pool, security filters
  2. LibrariesSpring Session, Resilience4j, outbox
  3. Container imageJDK, jar, start command
  4. OrchestratorRestarts, scaling, rollouts, probes, routing
  5. Platform servicesIdentity provider, secrets, observability, database proxy

5 layers, from the top down. Step through them one at a time.

The old server's responsibilities are now spread across these layers.

5Lessons for Platform Decisions

The lesson I draw is that the move traded central control for team autonomy and isolation, and that trade was right for most organisations. But a platform team should consciously replace what was lost: a recommended connection pool policy with a database-wide budget, a standard session approach, shared starters for security and observability, and good defaults for the orchestrator. War deployment is still reasonable for organisations with a large estate on application servers and strong operations teams, but new services should start as executable jars in containers.

6Follow-up questions

Is it still valid to deploy wars today?

Yes, Spring Boot still supports building a war with SpringBootServletInitializer, and Jakarta EE application servers are maintained. It makes sense where an organisation runs a supported application server estate. For new services, an executable jar in a container image is simpler and fits modern platforms better.

What replaced JNDI data sources in Spring Boot?

Spring Boot auto-configures a DataSource, usually HikariCP, from spring.datasource.* properties, with the password injected from an environment variable or a secret store. Boot can still look up a JNDI data source with spring.datasource.jndi-name when it runs on an application server.

Did embedded containers make Java services heavier?

Each process carries its own container and JVM, so total memory across many services is higher than many apps sharing one server. In exchange, each service is isolated and scaled independently. Smaller images, tuned JVM settings and techniques like class data sharing reduce the overhead.

7Conclusion

In this answer, we saw that executable jars with embedded containers won because each service became self-contained, ran naturally in container images, and let teams control their own container versions and configuration without waiting on server administrators. The price was the loss of shared application server services such as managed pools, JNDI resources and clustering, which now come from libraries and platform services, while restarts, scaling and routing moved to orchestrators like Kubernetes.

What to say in the interviewAbout 80 seconds aloud

Open with

The shift happened because the application server model put a shared, centrally managed process between teams and production. A war ran next to other applications, any server upgrade had to be coordinated with everyone, and changes went through administrators.

Then, if they want more

Embedding Tomcat or Jetty inside the jar made each service self-contained: the team picks the container version and settings in its build, the same jar runs on a laptop, in CI and in production, and it drops straight into a Docker image as one process on one port. That fit microservices and containers very well.

What we lost were the shared services the server gave us for free: centrally tuned connection pools and JNDI resources, session replication and clustering, the server transaction manager, security realms and the admin console. Those now come from libraries like Hikari and Spring Session, or from the platform: identity providers, secret stores and observability.

Operational duties like restarts, rolling deployments, scaling and routing moved to Kubernetes. The lesson I take as a platform lead is to replace those losses deliberately, for example with a database connection budget across services, because fifty independent pools can quietly overload a database that one admin used to protect.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Jakarta EE specifications
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why did Java web deployment move from wars on shared application servers to executable...": https://scrivio-interview-library.netlify.app/java/servlets/2311b434f5/