ADR-005: Apache Tomcat as Servlet Container

Decision Analysis and Resolution: SW360 Servlet Container

Created by: SW360 Architecture Team
Original Decision: 2014
Reformatted: April 2026
Status: Accepted
Estimated read time: 8 minutes


Table of Contents

  1. Background
  2. Goal
  3. Key Principles
  4. Key Inputs, Assumptions and Restrictions
  5. Options Analysis
  6. Criteria for Making a Decision
  7. Final Decision
  8. Evolution
  9. Contributors

Background

SW360 was originally designed as a Liferay Portal application, which required a servlet container to host web applications. The servlet container needed to:

  • Host the Liferay portal WAR and portlet applications
  • Support multiple web applications (portlets, REST services)
  • Provide standard Java EE/Jakarta EE servlet capabilities
  • Enable production-grade deployment with proven reliability
  • Integrate well with Spring-based applications

Why This Decision Matters: The servlet container is the runtime foundation for all SW360 web components, affecting deployment, performance, and operational aspects.


Goal

The goal of this decision analysis is to:

  1. Select a servlet container that supports Liferay Portal deployment
  2. Enable reliable production deployments
  3. Support future Spring Boot integration
  4. Minimize operational complexity

Key Principles

#PrincipleDescription
1Production ProvenBattle-tested in enterprise environments
2Liferay CompatibilityRecommended by Liferay for portal deployments
3Spring IntegrationSeamless Spring Boot embedded support
4Operational SimplicityWell-known by operations teams
5Active MaintenanceRegular updates and security patches

Key Inputs, Assumptions and Restrictions

TypeDescription
InputLiferay Portal recommends Tomcat as deployment platform
InputSpring Boot embeds Tomcat by default
InputOperations team has existing Tomcat expertise
AssumptionDeployment will remain on-premises initially
AssumptionEmbedded deployment (Spring Boot) is future direction
RestrictionMust support Jakarta EE servlet specification
RestrictionMust handle concurrent users in production

Options Analysis

Option 1 - Apache Tomcat

Summary

Use Apache Tomcat, the most widely deployed open-source servlet container. Lightweight, reliable, and the recommended platform for both Liferay Portal and Spring Boot applications.

Conceptual View

graph TB
    subgraph Tomcat["Apache Tomcat"]
        direction TB
        W["webapps/<br/>├── liferay-portal.war<br/>├── sw360-rest.war<br/>└── sw360-thrift.war"]
        C["Connectors: HTTP/AJP<br/>Thread Pool: Configurable<br/>JNDI: Database connections"]
    end

Impact / Changes Required

  • Deploy WAR files to webapps directory
  • Configure server.xml for connectors and resources
  • Tune thread pools for production load

SWOT Analysis

CategoryAnalysis
Strengths1. Most widely deployed servlet container
2. Excellent Liferay compatibility (recommended)
3. Spring Boot default embedded server
4. Extensive documentation and community
5. Well-known by operations teams
6. Mature, stable, reliable
Weaknesses1. Configuration tuning required for production
2. Not a full Java EE container
3. Heavier than Jetty for simple apps
Opportunities1. Seamless transition to embedded (Spring Boot)
2. Large ecosystem of tools and monitoring
3. Docker images readily available
Threats1. Configuration drift across environments
2. Security patches require restarts

Option 2 - Eclipse Jetty

Summary

Use Eclipse Jetty, a lightweight, embeddable servlet container known for its small footprint and fast startup time.

Conceptual View

graph TB
    subgraph Jetty["Eclipse Jetty"]
        direction TB
        J1["Embedded or standalone"]
        J2["WebSocket native support"]
        J3["HTTP/2 support"]
    end

Impact / Changes Required

  • Configure Jetty for Liferay deployment
  • Different configuration format than Tomcat
  • May need additional modules for features

SWOT Analysis

CategoryAnalysis
Strengths1. Lightweight and fast startup
2. Excellent for embedded deployment
3. Good HTTP/2 and WebSocket support
4. Eclipse Foundation backing
Weaknesses1. Liferay has limited Jetty support
2. Different configuration than Tomcat
3. Smaller community than Tomcat
4. Operations team less familiar
Opportunities1. Better for microservices
2. Spring Boot alternative embed
Threats1. Limited Liferay testing on Jetty
2. Potential compatibility issues
3. Less operational expertise available

Option 3 - WildFly/JBoss

Summary

Use WildFly (formerly JBoss AS), a full Java EE application server providing comprehensive enterprise features including EJB, JMS, and clustering.

Conceptual View

graph TB
    subgraph WF["WildFly/JBoss"]
        direction TB
        W1["Full Java EE stack"]
        W2["EJB, JMS, CDI, JPA"]
        W3["Clustering built-in"]
    end

Impact / Changes Required

  • Deploy as EAR or WAR
  • Configure subsystems for features
  • Larger infrastructure footprint

SWOT Analysis

CategoryAnalysis
Strengths1. Full Java EE support
2. Built-in clustering
3. Enterprise management console
4. Red Hat support available
Weaknesses1. Heavy footprint—overkill for SW360
2. Slower startup
3. Complex configuration
4. More resources required
5. Not Spring Boot default
Opportunities1. Enterprise features if needed later
Threats1. Unnecessary complexity
2. Higher operational burden
3. Resource waste

Option 4 - GlassFish

Summary

Use GlassFish, the reference implementation for Java EE/Jakarta EE specifications.

Conceptual View

┌────────────────────────────────────────────────┐
│               GlassFish                         │
├────────────────────────────────────────────────┤
│  Jakarta EE reference implementation            │
│  Full specification support                     │
└────────────────────────────────────────────────┘

Impact / Changes Required

  • Deploy as WAR/EAR
  • Configure admin console
  • Learn GlassFish administration

SWOT Analysis

CategoryAnalysis
Strengths1. Reference Jakarta EE implementation
2. Specification-compliant
3. Eclipse Foundation backing
Weaknesses1. Limited adoption compared to Tomcat
2. Less community support
3. Operations teams unfamiliar
4. Not Liferay recommended
Opportunities1. Specification compliance
Threats1. Smaller community
2. Less operational expertise
3. Uncertain future direction

Criteria for Making a Decision

T-Shirt Sizing Scale

T-Shirt SizeNumeric ValueMeaning
XS1.0Worst for this aspect
S2.5Poor
S-M3.75Below Average
M5.0Average
M-L6.25Above Average
L7.5Good
L-XL8.75Very Good
XL10.0Best for this aspect

Weighted Evaluation Matrix

CriteriaDescriptionWeightTomcatJettyWildFlyGlassFish
RatingScoreRatingScoreRatingScoreRatingScore
Liferay CompatibilityRecommended/supported10XL100.0M50.0L75.0M-L62.5
Spring Boot IntegrationEmbedded server default9XL90.0L-XL78.75M45.0M45.0
Production ReliabilityEnterprise deployments9XL90.0L67.5L-XL78.75L67.5
Operations FamiliarityTeam expertise8XL80.0M40.0M-L50.0S-M30.0
Community & DocumentationHelp resources7XL70.0L52.5L52.5M-L43.75
Startup TimeFast bootstrapping5L37.5XL50.0M25.0M25.0
Resource EfficiencyMemory/CPU usage6L45.0L-XL52.5M30.0M30.0
Configuration SimplicityEasy setup6L45.0L45.0M30.0M-L37.5
Active MaintenanceSecurity updates8XL80.0L-XL70.0L-XL70.0L60.0
TOTAL637.5506.25456.25401.25

Score Summary

RankOptionTotal ScoreRecommendation
🥇 1Apache Tomcat637.5SELECTED
🥈 2Eclipse Jetty506.25Alternative for microservices
🥉 3WildFly/JBoss456.25❌ Overkill
4GlassFish401.25❌ Limited adoption

Final Decision

Selected Option: Apache Tomcat

Rationale

Apache Tomcat was selected as the servlet container for SW360 based on:

  1. Highest Weighted Score (637.5) - Clear winner across all criteria

  2. Liferay Compatibility (XL) - Official recommendation:

    • Liferay Portal is tested extensively on Tomcat
    • Liferay documentation assumes Tomcat
    • Best integration and support
  3. Spring Boot Integration (XL) - Future-proof:

    • Spring Boot embeds Tomcat by default
    • Seamless transition from external to embedded deployment
    • Same runtime in development and production
  4. Operations Familiarity (XL) - Lower risk:

    • Most widely deployed servlet container
    • Operations teams have Tomcat experience
    • Abundant monitoring and management tools
  5. Production Reliability (XL) - Battle-tested:

    • Powers major applications worldwide
    • Proven stability and scalability
    • Well-understood performance characteristics

Current Configuration (Spring Boot 3.x)

# Embedded Tomcat is auto-configured by Spring Boot
server.port=8080
server.tomcat.threads.max=200
server.tomcat.threads.min-spare=10
server.tomcat.accept-count=100

Evolution

Servlet Container Version History

SW360 VersionTomcat VersionServlet SpecNotes
Pre-18.xTomcat 9.xServlet 4.0 (javax)External deployment
18.x+Tomcat 10.x+Servlet 5.0+ (jakarta)Spring Boot embedded
CurrentTomcat 11.xServlet 6.0 (jakarta)Spring Boot 3.5.x

Deployment Model Evolution

EraModelNotes
2014-2023External Tomcat + WARLiferay Portal deployment
2024+Embedded TomcatSpring Boot executable JAR

  • ADR-001: Thrift services coexist with Tomcat servlet handling
  • ADR-004: Spring Boot 3.x migration (Tomcat 11.x embedded)

Contributors

NameRoleContribution
SW360 Architecture TeamDecision MakersTechnical analysis
Operations TeamStakeholdersDeployment requirements

Consequences Summary

Positive

  • ✅ Standard deployment model—WAR deployment familiar to Java operations
  • ✅ Mature ecosystem—extensive tooling, monitoring, documentation
  • ✅ Spring Boot default—embedded Tomcat simplifies modern deployments
  • ✅ Stable APIs—servlet specification is backward compatible
  • ✅ Team expertise—operations team knows Tomcat

Negative

  • ⚠️ Configuration tuning required for production
  • ⚠️ Memory footprint heavier than Jetty for simple apps
  • ⚠️ Version coupling with Jakarta EE requirements

Neutral

  • Jakarta EE migration—Tomcat 10+ uses jakarta.* namespace
  • Both embedded and external deployment modes supported

Revision History

VersionDateAuthorChanges
1.02014Architecture TeamInitial decision
2.0April 2026Bibhuti Bhusan DashReformatted to DAR/SWOT template