Skip to content

TOMEE-4707 drop the standalone HTTP server from openejb-http (10.x) - #2981

Draft
jungm wants to merge 2 commits into
apache:tomee-10.xfrom
jungm:TOMEE-4707-10.x
Draft

jungm wants to merge 2 commits into
apache:tomee-10.xfrom
jungm:TOMEE-4707-10.x

Conversation

@jungm

@jungm jungm commented Sep 30, 2026

Copy link
Copy Markdown
Member

Backport of #2945 to tomee-10.x.

TomEE serves HTTP through Tomcat, so the hand written HTTP server in openejb-http is unused attack surface. This removes the module:

  • The servlet bridge REST, web services and CXF build on (HttpListener, HttpRequest/HttpResponse, the servlet adapters) moves to openejb-server. ServerServlet, EEFilter and the CDI request listeners move to tomee-catalina; a web.xml exposing ejbd over HTTP now uses org.apache.tomee.catalina.remote.ServerServlet.
  • httpejbd, the Jetty backend, OpenEJBHttpRegistry, RsRegistryImpl and OpenEJBHttpWsRegistry are gone. Without Tomcat's registries RESTService/WsService don't deploy endpoints (logged at INFO); @WebServiceRef clients keep working.
  • openejb-standalone, arquillian-openejb-embedded and the ApplicationComposer have no HTTP server: @EnableServices(jaxrs/jaxws) and the ApplicationComposer's @JaxrsProviders handling are removed, and @RandomPort("http") is an ordinary name (it just sets http.port). Tests and examples that need HTTP run on TomEE embedded.
  • Settings only the embedded transport read are gone: the cxf-rs auth/realm service properties and cxf.jaxrs.static-resources-list. openejb.rest.wildcard defaults to *.
  • The root pom no longer manages Jetty versions.

Differences from the main change:

  • The BOMs only drop openejb-http (no openejb-jakarta-data on 10.x).
  • The MicroProfile Rest Client TCK keeps its explicit Jetty 9.2 / WireMock 2 setup, which doesn't depend on the root pom's Jetty management.
  • The examples moved to TomEE embedded use 10.3.0-SNAPSHOT; javamail, mp-jsonb-configuration, mtom, multiple-arquillian-adapters and rest-on-ejb had tomee.version stuck at 10.2.1-SNAPSHOT and are bumped, since they now resolve tomee-plus-api and arquillian-tomee-embedded through it.
  • SECURITY.md and examples/multiple-arquillian-adapters/README.adoc don't exist on 10.x and stay absent.

Note that #2945 is a breaking change that was meant for the next major.

rzo1 and others added 2 commits September 30, 2026 11:18
…2945)

* TOMEE-4707 drop the standalone HTTP server from openejb-http

TomEE serves requests through Tomcat's connectors, so the hand written HTTP
server in openejb-http is unused attack surface. Removes it, the unreachable
Jetty backend, the httpejbd service and OpenEJBHttpRegistry.

isTextXml and reformat move to HttpUtil. RsRegistryImpl and
OpenEJBHttpWsRegistry extended OpenEJBHttpRegistry and were the non-Tomcat
fallbacks in RESTService and WsService; both go, so openejb-standalone and
arquillian-openejb-embedded lose embedded REST/WS wiring.

Everything Tomcat needs stays: listeners, the registry, request, response and
session, the servlet and filter adapters, ServerServlet and the CDI listeners.
The tests that drove the removed transport over a socket go with it.

* TOMEE-4707 drop what still pointed at httpejbd

RESTService and WsService log a warning and skip deployment when no registry
is available instead of failing with an NPE per application. The embedded
Arquillian adapter no longer advertises an HTTP URL, openejb-standalone stops
shipping the HTTP, CXF and CXF-RS modules, and the httpejbd aliases, debug
flags, docs and test leftovers go. cdi-embedded excludes the CDI TCK tests that
need an HTTP server; cdi-tomee runs them.

* TOMEE-4707 run CDIApplicationTest on TomEE embedded

Moves the shared JAX-RS test beans to arquillian-tomee-jaxrs-tests, where the
tests using them run against Tomcat.

* TOMEE-4707 drop httpejbd from the docs

ApplicationComposer docs point to TomEE embedded and the Arquillian TomEE
adapters for testing JAX-RS and JAX-WS endpoints over HTTP.

* TOMEE-4707 drop the ApplicationComposer REST/WS examples

rest-applicationcomposer, rest-applicationcomposer-mockito and
applicationcomposer-jaxws-cdi relied on ApplicationComposer serving HTTP.

* TOMEE-4707 run JAX-RS application, routing and provider tests on TomEE embedded

Moves the Application/web.xml deployment, routing, provider and response tests
from openejb-cxf-rs to arquillian-tomee-jaxrs-tests, where they deploy a war on
Tomcat instead of the removed embedded HTTP server.

* TOMEE-4707 run JAX-RS CDI, EJB, security and async tests on TomEE embedded

Moves the ApplicationComposer/EJBContainer based cxf-rs tests to arquillian-tomee-jaxrs-tests.
SecurityContextIsUsableTest logs in with BASIC auth against a webapp realm.

* TOMEE-4707 run JAX-RS provider, JSON and bval tests on TomEE embedded

The provider, exception mapper, Johnzon/JSON-B and bean validation tests of
openejb-cxf-rs run in arquillian-tomee-jaxrs-tests; their altdd descriptors are
WEB-INF descriptors of each test archive.

* TOMEE-4707 run the web service examples on TomEE embedded

The tests deploy each example with Arquillian to TomEE embedded and call the endpoints Tomcat serves;
the READMEs show the Arquillian tests and their output.

* TOMEE-4707 remove undeployed web service ports from PortAddressRegistry

removePort returned early for every registered port and cleared the wrong map
for the service QName, so @WebServiceRef lookups by SEI kept seeing ports of
undeployed applications.

* TOMEE-4707 run the REST examples on TomEE embedded

The REST example tests deploy to TomEE embedded with Arquillian and call the
endpoints over Tomcat; multiple-arquillian-adapters drops its embedded-remote variant.

* TOMEE-4707 remove the unreachable embedded HTTP transport

Without httpejbd nothing registers HttpListenerRegistry or SessionManager, so the
request/response/session implementations, embedded servlet/filter/JSP registration
and multipart support behind them are dead. LightweightWebAppBuilder keeps listeners,
CDI and ServletContext events; HttpUtil keeps selectSingleAddress.

* TOMEE-4707 run the JAX-RS event, jmx, cli and logging tests on TomEE embedded

Observers and the log capture register from a webapp listener before the JAX-RS deployment.
arquillian.xml enables the CXF JMX monitoring CxfUtilTest checks.

* TOMEE-4707 run the JAX-WS tests on TomEE embedded

openejb-cxf keeps GlobalFeatureConfigTest, the other tests need a deployed endpoint.
DynamicPortTest only covered httpejbd.port=0.

* TOMEE-4707 drop openejb-cxf-rs test leftovers

* TOMEE-4707 skip REST and web service deployment when no registry is available

* TOMEE-4707 run the in-JVM JAX-RS JMX and logging tests on TomEE embedded only, enable CXF monitoring on remote adapters

* TOMEE-4707 observe the JAX-WS server events in-container in EventTest

* TOMEE-4707 ship the enclosing test class in the JAX-RS test archives

* TOMEE-4707 remove the openejb-http module

The servlet bridge the REST, web service and CXF modules build on (HttpListener,
HttpRequest, HttpResponse, the servlet adapters, HttpUtil) moves to openejb-server.
ServerServlet, EEFilter and the CDI request listeners only run in Tomcat and move to
tomee-catalina; a web.xml exposing ejbd over HTTP now uses
org.apache.tomee.catalina.remote.ServerServlet.

HttpSession, ServletSessionAdapter and BasicAuthHttpListenerWrapper only served the
standalone server and go.

* TOMEE-4707 check for the REST and web service registries once, when the services start

Without a registry RESTService and WsService return from start() before they register
themselves or observe deployments, so the deployment paths no longer need null checks.
WsService registers the PortAddressRegistry first, @WebServiceRef clients need it
even when no endpoint can be published.

* TOMEE-4707 drop the REST and web service options of the ApplicationComposer

The ApplicationComposer has no HTTP server. @EnableServices loses jaxrs/jaxws,
FilteredServiceManager its jaxrs/jaxws aliases and ApplicationComposers its
@JaxrsProviders handling; @RandomPort("http") fails instead of injecting a port nothing
listens on. The applicationcomposer-maven-plugin ships openejb-ejbd instead of
openejb-cxf-rs.

* TOMEE-4707 remove what is left of the embedded HTTP transport

SWClassLoader.getWebResource served the removed embedded web resources, the itests
"http" mode targeted httpejbd, and the cdi-embedded TCK no longer needs CXF.

* TOMEE-4707 use ArquillianUtil to detect TomEE embedded in the JAX-RS tests

* TOMEE-4707 stop managing Jetty versions

The Jetty dependency management was for the Jetty backend of openejb-http. Nothing
uses Jetty directly anymore, so tomee-security and the MicroProfile Rest Client TCK
drop their workarounds against it and HtmlUnit resolves a consistent Jetty 9.4.

* TOMEE-4707 treat @RandomPort("http") like any other name

* TOMEE-4707 drop what only the embedded HTTP transport used

- Proxys, AppFinder.AppOrWebContextTransformer, LogCategory.HTTPSERVER,
  LightweightWebAppBuilder.LightServletContext and EmbeddedServletContextCreated
- the HttpRequest/HttpResponse members of the removed HTTP parser
- CxfRsHttpListener's static resource handling (CXFJAXRSFilter calls doInvoke)
- the cxf-rs auth/realm settings, TomcatRsRegistry ignores them
- @JaxrsProviders.applicationName and its METHOD target
- the regex REST wildcard: openejb.rest.wildcard defaults to "*"

A missing REST or web service registry is logged at INFO, the webprofile ships
openejb-cxf without a WsRegistry.

* TOMEE-4707 tidy the tests moved to TomEE embedded

WsJMXTest runs again and ServerDestroyedTest checks the ServerDestroyed event.
SuspendedTest and CdiHandlersTest wait with a bound instead of racing the server,
RsInterceptorInjectionTest checks isUserInRole again, and httpejbd/EJBContainer
leftovers are gone.

* TOMEE-4707 drop the JSP and server service leftovers from the cdi-embedded TCK

TckTlds and tomee-catalina only served the JSP support of the removed HTTP
server. The builtin servlet decorator tests need servlet objects the embedded
container no longer registers, and javaee-full tests are already skipped by group.

* TOMEE-4707 align the docs with the removed embedded HTTP server

* TOMEE-4707 drop leftovers from the examples moved to TomEE embedded

* TOMEE-4707 drop build leftovers of the removed HTTP server

The openejb-standalone NOTICE/LICENSE no longer list CXF, XmlSchema and
libre-wsdl4j, its itest profile no longer runs the http mode, and dependabot no
longer ignores Jetty, which no pom declares.

---------

Co-authored-by: Markus Jung <jungm@apache.org>
(cherry picked from commit 5c6b5a3)
…SNAPSHOT

javamail, mp-jsonb-configuration, mtom, multiple-arquillian-adapters and
rest-on-ejb resolve tomee-plus-api and arquillian-tomee-embedded through
tomee.version.
@jungm

jungm commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@jungm
jungm requested a review from rzo1 September 30, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants