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 2012/06/04 19:21:11 UTC

[jira] [Commented] (CAMEL-5312) Adding Restlet routes with relative paths to Apache Camel context does NOT work after I send first request to restlet route

    [ https://issues.apache.org/jira/browse/CAMEL-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288701#comment-13288701 ] 

Claus Ibsen commented on CAMEL-5312:
------------------------------------

How do you add a 2nd route at step #3 ?

And what server do you use? Apache Tomcat, or something else?
                
> Adding Restlet routes with relative paths to Apache Camel context does NOT work after I send first request to restlet route 
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5312
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5312
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.9.1
>         Environment: Grails, Apache Camel
>            Reporter: Amit Patel
>
> Adding Restlet routes with relative paths to Apache Camel context does NOT
> work after I send first request to restlet route.
> 1) Add Restlet route restletRoute1 with relative path to Apache Camel context
> 2) Send a request to restletRoute1 (works)
> 3) Add a route restletRoute2 with relative path to Apache Camel context
> 4) Send a request to restletRoute2 (does not works). RestletServlet
> does not find the restlet endpoint and return Not Found message.
> when I checked jconsole It saw the restletRoute1 and restletRoute2 started
> successfully. If I add restletRoute1 and restletRoute2 then send a
> request to restletRoute1 and restletRoute2 both works. Our
> application supports add route on-the-fly feature, so we don't have
> to start the application every time when we add a new route. Because of
> the above issue we can't integrate restlet to our application.
> Routes
> -------
> <routes xmlns="http://camel.apache.org/schema/spring">
> <route>
> <from uri="restlet:/restletRoute1"/>
> <setHeader headerName="Content-Type">
> <constant>text/plain</constant>
> </setHeader>
> <setBody>
> <constant>restletRoute1</constant>
> </setBody>
> </route>
> <route>
> <routes xmlns="http://camel.apache.org/schema/spring">
> <route>
> <from uri="restlet:/restletRoute2"/>
> <setHeader headerName="Content-Type">
> <constant>text/plain</constant>
> </setHeader>
> <setBody>
> <constant>restletRoute2</constant>
> </setBody>
> </route>
> <route>
> libs
> -----
> 'org.apache.camel:camel-restlet:2.9.1'
> 'org.restlet.jee:org.restlet.ext.spring:2.0.13'
> Web.xml
> -----------
> <servlet>
>                      <servlet-name>RestletServlet</servlet-name>
>                      <servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class>
>                      <init-param>
>                            <param-name>org.restlet.component</param-name>
>                            <param-value>restletComponent</param-value>
>                      </init-param>
>               </servlet>
>               <servlet-mapping>
>                      <servlet-name>RestletServlet</servlet-name>
>                      <url-pattern>/rs/*</url-pattern>
>               </servlet-mapping>
> Resources.groovy
> -----------------
> restletComponent(org.restlet.Component)
> restletComponentService(org.apache.camel.component.restlet.RestletComponent, ref("restletComponent"))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira