You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/09/29 09:19:00 UTC
[jira] [Updated] (CAMEL-17015) camel-servlet - Issue with REST
Service after Camel update - custom servletName does not work
[ https://issues.apache.org/jira/browse/CAMEL-17015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-17015:
--------------------------------
Summary: camel-servlet - Issue with REST Service after Camel update - custom servletName does not work (was: Issue with REST Service after Camel update)
> camel-servlet - Issue with REST Service after Camel update - custom servletName does not work
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-17015
> URL: https://issues.apache.org/jira/browse/CAMEL-17015
> Project: Camel
> Issue Type: Bug
> Components: rest
> Affects Versions: 3.11.2
> Reporter: Peter Hermsdorf
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 3.7.6, 3.11.3, 3.13.0
>
>
> After updating from Camel 3.4.4 to 3.11.2 our REST Services aren'T working anymore.
> Already discussed here: https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/Problem.20with.20REST.20services.20after.20upgrading.20to.20Camel.203.2E11.2E2/near/255227937
> Debugging revealed the following:
> we create a Osgi Camel Context and register Routes like this:
> {code:java}
> camelContext = new OsgiDefaultCamelContext(bundleContext) {
> @Override
> public void init() {
> final RouteBuilder routes = createRoutes();
> routes.restConfiguration().componentProperty("servletName", "my.custom.servletName").clientRequestValidation(true);
> this.addRoutes(routes);
> super.init();
> }
> {code}
>
> In org.apache.camel.component.servlet.ServletComponent.connect(HttpConsumer)
> {code}
> sc.getEndpoint().getServletName()
> {code}
> returns the Default Servlet Name {code}CamelServlet{code} and not my {code}my.custom.servletName{code} because {code}org.apache.camel.component.servlet.ServletEndpoint.setServletName(String){code} is called with {code}CamelServlet{code} and not with my custom servletname.
> Seems like no one is setting the correct value on {code}org.apache.camel.component.servlet.ServletComponent.setServletName(String){code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)