Author: davsclaus
Date: Sun May 8 09:49:12 2011
New Revision: 1100711
URL: http://svn.apache.org/viewvc?rev=1100711&view=rev
Log:
CAMEL-3950: Fixed camel-web not being able to start routes which was configured
as no auto startup.
Modified:
camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/applicationContext.xml
Modified:
camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java?rev=1100711&r1=1100710&r2=1100711&view=diff
==============================================================================
---
camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java
(original)
+++
camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java
Sun May 8 09:49:12 2011
@@ -69,10 +69,10 @@ public class RouteStatusResource {
public Response setStatus(String status) throws Exception {
if (status != null) {
if (status.equalsIgnoreCase("start")) {
- getCamelContext().startRoute(getRoute());
+ getCamelContext().startRoute(getRoute().getId());
return Response.ok().build();
} else if (status.equalsIgnoreCase("stop")) {
- getCamelContext().stopRoute(getRoute());
+ getCamelContext().stopRoute(getRoute().getId());
return Response.ok().build();
}
}
Modified:
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/applicationContext.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/WEB-INF/applicationContext.xml?rev=1100711&r1=1100710&r2=1100711&view=diff
==============================================================================
---
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/applicationContext.xml
(original)
+++
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/applicationContext.xml
Sun May 8 09:49:12 2011
@@ -17,21 +17,16 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
- http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
+ http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <description>This is an example route which you can start, stop and
modify</description>
-
- <from uri="seda:foo"/>
- <to uri="mock:results"/>
- </route>
- </camelContext>
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <description>This is an example route which you can start, stop
and modify</description>
+ <from uri="seda:foo"/>
+ <to uri="mock:results"/>
+ </route>
+ </camelContext>
</beans>