[ https://issues.apache.org/jira/browse/CAMEL-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291827#comment-13291827 ]
Amit Patel commented on CAMEL-5312: ----------------------------------- I am using Camel RestletComponent component. I found issue with Restlet(http://www.restlet.org/) API framework. To support camel add route on-the-fly feature.Fix should be done on both side RestletComponent component and Restlet(http://www.restlet.org/) API framework. 1) When a new restlet route added to camel context. Set varible isNewRouteAdded=true in reslet component. (CAMEL changes) 2) If isNewRouteAdded is ture in reslet component, org.restlet.ext.servlet.ServerServlet.getServer method calls createServer. (Restlet(http://www.restlet.org/) API framework changes). > 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 > Assignee: Claus Ibsen > Fix For: 2.10.0 > > Attachments: RestletSpringServlet.java > > > 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