You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2026/02/11 13:14:05 UTC
(camel) 03/03: update to atmoshpere runtime 3.1.0 to fix jdk25 streaming issue
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5f8ff059781c70d45a6ad730b064748053411bd8
Author: Croway <fe...@gmail.com>
AuthorDate: Wed Feb 11 11:53:52 2026 +0100
update to atmoshpere runtime 3.1.0 to fix jdk25 streaming issue
---
.../src/main/docs/atmosphere-websocket-component.adoc | 4 ----
.../camel/component/atmosphere/websocket/WebsocketRoute1Test.java | 6 +-----
.../camel/component/atmosphere/websocket/WebsocketRoute2Test.java | 6 +-----
parent/pom.xml | 2 +-
4 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
index cb008cfc3d00..3de9702dc6da 100644
--- a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
+++ b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc
@@ -21,10 +21,6 @@ connections from external clients). This component uses
the https://github.com/Atmosphere/atmosphere[Atmosphere] library to
support the Websocket transport in various Servlet containers.
-NOTE: On JDK 25 or later, websocket messages are delivered in streaming mode (`Reader`/`InputStream`) even when the `useStreaming` option is not enabled.
-This is due to a change in the JDK's internal JSR 356 WebSocket implementation.
-The component handles both modes transparently, but if your route processors check the body type, they should account for this difference.
-
Maven users will need to add the following dependency to
their `pom.xml` for this component:
diff --git a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute1Test.java b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute1Test.java
index da0f7fd09a5e..d7c9fbd5d519 100644
--- a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute1Test.java
+++ b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute1Test.java
@@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
-import java.lang.Runtime.Version;
import java.util.List;
import org.apache.camel.Exchange;
@@ -74,10 +73,7 @@ public class WebsocketRoute1Test extends WebsocketCamelRouterTestSupport {
// route for a single line
from("atmosphere-websocket:///hola").to("log:info").process(new Processor() {
public void process(final Exchange exchange) {
- // JDK 25+ delivers websocket messages in streaming mode (Reader/InputStream)
- // even without useStreaming=true, due to a change in the JSR 356 implementation
- boolean streaming = Runtime.version().compareTo(Version.parse("25")) >= 0;
- createResponse(exchange, streaming);
+ createResponse(exchange, false);
}
}).to("atmosphere-websocket:///hola");
}
diff --git a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute2Test.java b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute2Test.java
index 1f27e08fecf1..f2730c1f1237 100644
--- a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute2Test.java
+++ b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute2Test.java
@@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
-import java.lang.Runtime.Version;
import java.util.List;
import org.apache.camel.Exchange;
@@ -74,10 +73,7 @@ public class WebsocketRoute2Test extends WebsocketCamelRouterTestSupport {
// route for a broadcast line
from("atmosphere-websocket:///broadcast").to("log:info").process(new Processor() {
public void process(final Exchange exchange) {
- // JDK 25+ delivers websocket messages in streaming mode (Reader/InputStream)
- // even without useStreaming=true, due to a change in the JSR 356 implementation
- boolean streaming = Runtime.version().compareTo(Version.parse("25")) >= 0;
- createResponse(exchange, streaming);
+ createResponse(exchange, false);
}
}).to("atmosphere-websocket:///broadcast?sendToAll=true");
}
diff --git a/parent/pom.xml b/parent/pom.xml
index b09d582d9c73..041ce0fba39b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -73,7 +73,7 @@
<assertj-version>3.27.7</assertj-version>
<asterisk-java-version>3.41.0</asterisk-java-version>
<atlassian-fugue-version>6.1.2</atlassian-fugue-version>
- <atmosphere-version>3.0.15</atmosphere-version>
+ <atmosphere-version>3.1.0</atmosphere-version>
<avro-version>1.12.1</avro-version>
<avro-ipc-jetty-version>1.12.1</avro-ipc-jetty-version>
<avro-ipc-netty-version>1.12.1</avro-ipc-netty-version>