Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D30CF200B95 for ; Tue, 27 Sep 2016 08:33:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D1CA3160AE5; Tue, 27 Sep 2016 06:33:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 24CAE160AD2 for ; Tue, 27 Sep 2016 08:33:21 +0200 (CEST) Received: (qmail 22994 invoked by uid 500); 27 Sep 2016 06:33:21 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 22977 invoked by uid 99); 27 Sep 2016 06:33:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2016 06:33:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1BFE42C2A5F for ; Tue, 27 Sep 2016 06:33:21 +0000 (UTC) Date: Tue, 27 Sep 2016 06:33:21 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10342) WebSockets options are ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 27 Sep 2016 06:33:23 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15525237#comment-15525237 ] ASF GitHub Bot commented on CAMEL-10342: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/camel/pull/1187 > WebSockets options are ignored > ------------------------------ > > Key: CAMEL-10342 > URL: https://issues.apache.org/jira/browse/CAMEL-10342 > Project: Camel > Issue Type: Bug > Components: camel-websocket > Affects Versions: 2.16.3 > Reporter: Daniel Beland > > Setting maxTextMessageSize or maxBinaryMessageSize has no effect, messages above the limit are still consumed and the route is started. > I was debugging it to understand what was wrong and I came to the conclusion that parameters are set correctly on the camel WebSocketEndpoint and then on the ServletContextHandler (in camel method WebSocketComponent.setWebSocketComponentServletInitialParameter). > But then the same values are null in jetty method WebSocketServlet.init() and they are not set on the WebSocketFactory. > When I open a WebSocket connection I can see the default values are used instead of my settings in jetty WebSocketFactory.upgrade method. > I think the problem is the init parameters that are set on the camel ServletContextHandler are not copied on the jetty ServletHolder. > If I override the websocket bean in blueprint.xml with my own and override the createServlet method to copy the parameters then everything works correctly. > So effectively changing the line in createServlet > handler.addServlet(new ServletHolder(servlet), pathSpec); > By > ServletHolder servletHolder = new ServletHolder(servlet); > servletHolder.setInitParameters(handler.getInitParams()); > handler.addServlet(servletHolder, pathSpec); > Also I think the unit test WebscoketEndpointConfigurationTest.testSetServletInitalparameters is wrong, it simply verifies that the values are set in camel but never checks they are set correctly on the jetty side. -- This message was sent by Atlassian JIRA (v6.3.4#6332)