Skip to content

Commit c308407

Browse files
docs: Remove non-existent HTTP/2 configuration properties from xdoc
The HTTP/2 transport documentation contained numerous configuration parameters that do not exist in the codebase — they were aspirational examples that never had backing implementations. This causes user confusion and wasted debugging when the properties have no effect. Removed across 3 xdoc files: - JVM system properties: -Daxis2.http2.enabled, -Daxis2.http2.streaming.enabled, -Daxis2.openapi.http2.enabled, -Daxis2.openapi.cache.enabled, -Daxis2.openapi.compression.enabled - Servlet init-params: enableHTTP2, tomcatHttp2Integration - Context-params: axis2.http2.enabled, openapi.http2.optimization - Client Options properties: HTTP2_ENABLED, HTTP2_STREAMING_ENABLED, HTTP2_MEMORY_OPTIMIZATION, HTTP2_MULTIPLEXING_ENABLED, HTTP2_PROCESSING_MODE, HTTP2_PERFORMANCE_MONITORING, HTTP2_METRICS_COLLECTION - axis2.xml parameters: TomcatHttp2Integration, TomcatBufferAlignment, TomcatStreamAlignment, TomcatCompressionOptimization, OpenApiHttp2Enabled, OpenApiSpecCacheTimeout, OpenApiLargeSpecThreshold - openapi.properties: openapi.enterprise.http2.enabled, openapi.enterprise.streaming.enabled, openapi.enterprise.memory.optimization Replaced with accurate guidance: HTTP/2 is enabled by selecting the H2TransportSender in axis2.xml and the appropriate streaming message formatter class. No boolean flags, system properties, or servlet init-params are required. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a538106 commit c308407

3 files changed

Lines changed: 43 additions & 84 deletions

File tree

src/site/xdoc/docs/http2-integration-guide.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ itself</strong>, not just the transport layer.</p>
107107
(<code>FieldFilteringMessageFormatter</code>). See
108108
<a href="json-streaming-formatter.html">Streaming JSON Formatter</a>.</li>
109109
<li><strong>C parity</strong> — the same architecture exists in
110-
Axis2/C via Apache httpd <code>mod_h2</code> with
110+
<a href="https://axis.apache.org/axis2/c/core/">Axis2/C</a> via
111+
<a href="https://httpd.apache.org/">Apache httpd</a> <code>mod_h2</code> with
111112
<code>ap_rflush()</code> in the message formatter. Both
112113
implementations use the same 64 KB flush interval, producing
113114
identical HTTP/2 DATA frame patterns from both C and Java
@@ -330,13 +331,10 @@ client.getOptions().setTo(new EndpointReference("https://example.com/service"));
330331
</pre>
331332

332333
<p><strong>3. Large Payload Optimization:</strong></p>
333-
<pre>
334-
// Configure for big data processing (50MB+ JSON)
335-
MessageContext msgContext = new MessageContext();
336-
msgContext.setProperty("HTTP2_STREAMING_ENABLED", true);
337-
msgContext.setProperty("HTTP2_MEMORY_OPTIMIZATION", true);
338-
msgContext.setProperty("FLOW_CONTROL_WINDOW_SIZE", 2097152); // 2MB
339-
</pre>
334+
<p>Streaming for large payloads is enabled by selecting a streaming message
335+
formatter (e.g. <code>MoshiStreamingMessageFormatter</code>) in axis2.xml.
336+
No programmatic property flags are required — the formatter handles
337+
chunked HTTP/2 DATA frames and flow control automatically.</p>
340338

341339
<h3>Performance Tuning (Optional Overrides)</h3>
342340

@@ -515,9 +513,11 @@ enableALPN = true (Required for HTTP/2)
515513
<pre>
516514
-XX:+UseZGC # Low-latency garbage collector
517515
-XX:MaxDirectMemorySize=512m # Direct memory for HTTP/2 buffers
518-
-Daxis2.http2.enabled=true # Enable HTTP/2 transport
519-
-Daxis2.http2.streaming.enabled=true # Enable streaming for large payloads
520516
</pre>
517+
<p><em>Note:</em> HTTP/2 and streaming are enabled entirely through axis2.xml
518+
by selecting the appropriate message receiver and formatter classes (e.g.
519+
<code>EnhancedMoshiJsonFormatter</code>, <code>MoshiStreamingMessageFormatter</code>).
520+
No JVM system properties are required.</p>
521521

522522
<h2>Testing Strategy</h2>
523523

src/site/xdoc/docs/http2-transport-additions.xml

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -271,24 +271,15 @@ options.setProperty("MAX_CONCURRENT_STREAMS", 20);
271271
<li><strong>Streaming Mode</strong> (50MB+): Memory-efficient streaming with chunked processing</li>
272272
</ul>
273273

274-
<pre>
275-
// Configure payload-specific processing
276-
Options options = new Options();
277-
options.setProperty("HTTP2_PROCESSING_MODE", "streaming"); // or "multiplexing", "standard"
278-
options.setProperty("HTTP2_MEMORY_OPTIMIZATION", Boolean.TRUE);
279-
options.setProperty("HTTP2_STREAMING_ENABLED", Boolean.TRUE);
280-
</pre>
274+
<p>Streaming and memory optimization are controlled by the message formatter
275+
selected in axis2.xml (e.g. <code>MoshiStreamingMessageFormatter</code>).
276+
No client-side <code>Options</code> properties are required — the transport
277+
sender negotiates HTTP/2 framing and flow control automatically.</p>
281278

282279
<h3>Performance Monitoring</h3>
283280

284-
<p>HTTP/2 transport provides comprehensive performance metrics:</p>
285-
286-
<pre>
287-
// Enable performance monitoring
288-
Options options = new Options();
289-
options.setProperty("HTTP2_PERFORMANCE_MONITORING", Boolean.TRUE);
290-
options.setProperty("HTTP2_METRICS_COLLECTION", Boolean.TRUE);
291-
</pre>
281+
<p>HTTP/2 transport performance can be monitored via JMX or application-level
282+
logging. Enable JMX in the JVM startup flags (see the JVM Tuning section).</p>
292283

293284
<p>Available metrics include:</p>
294285
<ul>
@@ -356,15 +347,12 @@ for web-app use cases with predictable resource dependencies:</p>
356347

357348
<p>Individual services can specify HTTP/2 preferences in their services.xml:</p>
358349

359-
<pre>
360-
&lt;service name="BigDataService"&gt;
361-
&lt;parameter name="preferredTransport"&gt;h2&lt;/parameter&gt;
362-
&lt;parameter name="enableHTTP2"&gt;true&lt;/parameter&gt;
363-
&lt;parameter name="enableStreaming"&gt;true&lt;/parameter&gt;
364-
&lt;parameter name="maxPayloadSize"&gt;104857600&lt;/parameter&gt; &lt;!-- 100MB --&gt;
365-
&lt;parameter name="streamingThreshold"&gt;52428800&lt;/parameter&gt; &lt;!-- 50MB --&gt;
366-
&lt;/service&gt;
367-
</pre>
350+
<p>HTTP/2 is enabled at the transport level in axis2.xml, not per-service.
351+
Select the H2TransportSender in the <code>&lt;transportSender&gt;</code> section
352+
and configure its parameters there. For streaming large payloads, use the
353+
streaming message formatter (e.g. <code>MoshiStreamingMessageFormatter</code>
354+
or <code>JSONStreamingMessageFormatter</code>) in the service's message
355+
receiver configuration. No service-level parameters are required.</p>
368356

369357
<h3>Client-Side HTTP/2 Usage for SOAP (for JSON, see curl and Apache HTTPComponents section)</h3>
370358

@@ -382,13 +370,11 @@ Options options = new Options();
382370
options.setProperty(HTTPConstants.TRANSPORT_NAME, "h2");
383371
options.setTo(new EndpointReference("https://localhost:8443/services/BigDataService"));
384372

385-
// HTTP/2 specific configurations
386-
options.setProperty("HTTP2_ENABLED", Boolean.TRUE);
387-
options.setProperty("HTTP2_STREAMING_ENABLED", Boolean.TRUE);
388-
options.setProperty("HTTP2_MEMORY_OPTIMIZATION", Boolean.TRUE);
389-
options.setProperty("HTTP2_MULTIPLEXING_ENABLED", Boolean.TRUE);
373+
// HTTP/2 is negotiated by the transport sender selected in axis2.xml.
374+
// No additional boolean flags are needed — the h2 transport handles
375+
// multiplexing, streaming, and flow control automatically.
390376

391-
// Performance settings for large payloads
377+
// Timeout settings for large payloads
392378
options.setTimeOutInMilliSeconds(300000); // 5 minutes
393379
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 30000);
394380
options.setProperty(HTTPConstants.SO_TIMEOUT, 300000);

src/site/xdoc/docs/openapi-rest-advanced-http2-userguide.xml

Lines changed: 17 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,14 @@ openapi.title=High-Performance Trading API
113113
openapi.description=HTTP/2 optimized enterprise trading platform with sub-second response times
114114
openapi.version=2.0.0-h2
115115

116-
# HTTP/2 Performance Optimizations
117-
openapi.prettyPrint=false # Reduce JSON size for HTTP/2 streaming
116+
# OpenAPI UI settings (standard Swagger UI properties)
117+
openapi.prettyPrint=false # Reduce JSON size
118118
openapi.swaggerUi.deepLinking=true # Enable efficient navigation
119119
openapi.swaggerUi.filter=true # Optimize large API browsing
120-
openapi.enterprise.http2.enabled=true # Enable HTTP/2 specific optimizations
121120

122-
# Large Payload Support
123-
openapi.enterprise.streaming.enabled=true # Enable streaming for large responses
124-
openapi.enterprise.memory.optimization=true # Optimize memory for concurrent requests
121+
# Note: HTTP/2 transport and streaming are configured in axis2.xml
122+
# by selecting the appropriate transport sender and message formatter.
123+
# No openapi.properties flags are needed for HTTP/2.
125124
</pre>
126125

127126
<h3>3. Service Configuration</h3>
@@ -200,14 +199,10 @@ This results in up to 50% additional performance improvements in WildFly deploym
200199

201200
&lt;display-name&gt;High-Performance OpenAPI + HTTP/2 Service&lt;/display-name&gt;
202201

203-
&lt;!-- Axis2 Servlet with HTTP/2 Support --&gt;
202+
&lt;!-- Axis2 Servlet (HTTP/2 is configured in axis2.xml, not here) --&gt;
204203
&lt;servlet&gt;
205204
&lt;servlet-name&gt;AxisServlet&lt;/servlet-name&gt;
206205
&lt;servlet-class&gt;org.apache.axis2.transport.http.AxisServlet&lt;/servlet-class&gt;
207-
&lt;init-param&gt;
208-
&lt;param-name&gt;enableHTTP2&lt;/param-name&gt;
209-
&lt;param-value&gt;true&lt;/param-value&gt;
210-
&lt;/init-param&gt;
211206
&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
212207
&lt;/servlet&gt;
213208

@@ -329,16 +324,10 @@ low overhead and simplified deployment, making it an excellent choice for high-p
329324
&lt;!-- axis2.xml - Tomcat 11 + HTTP/2 + OpenAPI Optimized Configuration --&gt;
330325
&lt;axisconfig name="AxisJava2.0-Tomcat11-HTTP2-OpenAPI"&gt;
331326

332-
&lt;!-- Tomcat HTTP/2 Integration Parameters --&gt;
333-
&lt;parameter name="TomcatHttp2Integration"&gt;true&lt;/parameter&gt;
334-
&lt;parameter name="TomcatBufferAlignment"&gt;65536&lt;/parameter&gt; &lt;!-- Match http2MaxFrameSize --&gt;
335-
&lt;parameter name="TomcatStreamAlignment"&gt;200&lt;/parameter&gt; &lt;!-- Match maxConcurrentStreams --&gt;
336-
&lt;parameter name="TomcatCompressionOptimization"&gt;true&lt;/parameter&gt; &lt;!-- Leverage Tomcat compression --&gt;
337-
338-
&lt;!-- OpenAPI Configuration for HTTP/2 --&gt;
339-
&lt;parameter name="OpenApiHttp2Enabled"&gt;true&lt;/parameter&gt;
340-
&lt;parameter name="OpenApiSpecCacheTimeout"&gt;300&lt;/parameter&gt; &lt;!-- 5 minutes --&gt;
341-
&lt;parameter name="OpenApiLargeSpecThreshold"&gt;1048576&lt;/parameter&gt; &lt;!-- 1MB threshold --&gt;
327+
&lt;!-- HTTP/2 is negotiated by the transport sender below.
328+
Tomcat's HTTP/2 connector (h2c/h2) is configured in server.xml,
329+
not in axis2.xml. No Tomcat-specific or OpenAPI-specific
330+
parameters are needed here. --&gt;
342331

343332
&lt;!-- HTTP/2 Transport Sender --&gt;
344333
&lt;transportSender name="h2"
@@ -378,28 +367,14 @@ low overhead and simplified deployment, making it an excellent choice for high-p
378367

379368
&lt;display-name&gt;Enterprise OpenAPI + HTTP/2 on Tomcat 11&lt;/display-name&gt;
380369

381-
&lt;!-- Context Parameters for HTTP/2 + OpenAPI --&gt;
382-
&lt;context-param&gt;
383-
&lt;param-name&gt;axis2.http2.enabled&lt;/param-name&gt;
384-
&lt;param-value&gt;true&lt;/param-value&gt;
385-
&lt;/context-param&gt;
386-
&lt;context-param&gt;
387-
&lt;param-name&gt;openapi.http2.optimization&lt;/param-name&gt;
388-
&lt;param-value&gt;true&lt;/param-value&gt;
389-
&lt;/context-param&gt;
390-
391-
&lt;!-- Axis2 Servlet with Tomcat HTTP/2 Support --&gt;
370+
&lt;!-- HTTP/2 and streaming are configured in axis2.xml via message receiver
371+
and formatter class selection, not via web.xml context-params.
372+
See the axis2.xml HTTP/2 transport configuration section. --&gt;
373+
374+
&lt;!-- Axis2 Servlet --&gt;
392375
&lt;servlet&gt;
393376
&lt;servlet-name&gt;AxisServlet&lt;/servlet-name&gt;
394377
&lt;servlet-class&gt;org.apache.axis2.transport.http.AxisServlet&lt;/servlet-class&gt;
395-
&lt;init-param&gt;
396-
&lt;param-name&gt;enableHTTP2&lt;/param-name&gt;
397-
&lt;param-value&gt;true&lt;/param-value&gt;
398-
&lt;/init-param&gt;
399-
&lt;init-param&gt;
400-
&lt;param-name&gt;tomcatHttp2Integration&lt;/param-name&gt;
401-
&lt;param-value&gt;true&lt;/param-value&gt;
402-
&lt;/init-param&gt;
403378
&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
404379
&lt;async-supported&gt;true&lt;/async-supported&gt;
405380
&lt;/servlet&gt;
@@ -428,10 +403,8 @@ export CATALINA_OPTS="$CATALINA_OPTS -Djava.net.preferIPv6Addresses=false"
428403
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.coyote.http2.Http2Protocol.maxConcurrentStreams=200"
429404
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.coyote.http2.Http2Protocol.initialWindowSize=131072"
430405

431-
# OpenAPI Optimization
432-
export CATALINA_OPTS="$CATALINA_OPTS -Daxis2.openapi.http2.enabled=true"
433-
export CATALINA_OPTS="$CATALINA_OPTS -Daxis2.openapi.cache.enabled=true"
434-
export CATALINA_OPTS="$CATALINA_OPTS -Daxis2.openapi.compression.enabled=true"
406+
# Note: Axis2 HTTP/2 and OpenAPI are configured in axis2.xml, not via
407+
# system properties. No -Daxis2.* flags are needed.
435408

436409
# Performance Monitoring
437410
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote"

0 commit comments

Comments
 (0)