mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2393 - camel 2.0.0 fix is not needed anymore after upgrade to 2.2.0
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@921354 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f6f0c5107
commit
8eb28d51aa
|
@ -54,23 +54,6 @@
|
|||
</activemq.osgi.export>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>java.net.m2</id>
|
||||
<name>java.net Maven 2 Repo</name>
|
||||
<url>http://download.java.net/maven/2</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>java.net.m2</id>
|
||||
<name>java.net Maven 2 Repo</name>
|
||||
<url>http://download.java.net/maven/2</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- =============================== -->
|
||||
|
@ -84,18 +67,6 @@
|
|||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-jms</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-web</artifactId>
|
||||
<classifier>classes</classifier>
|
||||
<version>${camel-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring</artifactId>
|
||||
<groupId>org.springframework</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
|
|
|
@ -1,110 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.camel.web.resources;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.camel.CamelContext;
|
||||
import org.apache.camel.model.RouteDefinition;
|
||||
import org.apache.camel.model.RoutesDefinition;
|
||||
import org.apache.camel.view.RouteDotGenerator;
|
||||
|
||||
/**
|
||||
* The active routes in Camel which are used to implement one or more <a
|
||||
* href="http://camel.apache.org/enterprise-integration-patterns.html"
|
||||
* >Enterprise Integration Paterns</a>
|
||||
*
|
||||
* @version $Revision: 795901 $
|
||||
*/
|
||||
public class RoutesResource extends CamelChildResourceSupport {
|
||||
|
||||
public RoutesResource(CamelContextResource contextResource) {
|
||||
super(contextResource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the routes currently active within this context
|
||||
*/
|
||||
@GET
|
||||
@Produces({MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
public RoutesDefinition getRouteDefinitions() {
|
||||
RoutesDefinition answer = new RoutesDefinition();
|
||||
CamelContext camelContext = getCamelContext();
|
||||
if (camelContext != null) {
|
||||
List<RouteDefinition> list = camelContext.getRouteDefinitions();
|
||||
answer.setRoutes(list);
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Graphviz DOT <a
|
||||
* href="http://camel.apache.org/visualisation.html">Visualisation</a> of
|
||||
* the current Camel routes
|
||||
*/
|
||||
@GET
|
||||
@Produces(Constants.DOT_MIMETYPE)
|
||||
public String getDot() throws IOException {
|
||||
RouteDotGenerator generator = new RouteDotGenerator("/tmp/camel");
|
||||
return generator.getRoutesText(getCamelContext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up an individual route
|
||||
*/
|
||||
@Path("{id}")
|
||||
public RouteResource getRoute(@PathParam("id") String id) {
|
||||
List<RouteDefinition> list = getRoutes();
|
||||
for (RouteDefinition routeType : list) {
|
||||
if (routeType.getId().equals(id)) {
|
||||
return new RouteResource(this, routeType);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up an individual route with specified language
|
||||
*/
|
||||
@Path("{id}/{language}")
|
||||
public RouteResource getRoute(@PathParam("id") String id, @PathParam("language") String language) {
|
||||
RouteResource routeResource = getRoute(id);
|
||||
if (routeResource != null) {
|
||||
routeResource.setLanguage(language);
|
||||
}
|
||||
return routeResource;
|
||||
}
|
||||
|
||||
@Path("{id}/status")
|
||||
public RouteStatusResource getRouteStatus(@PathParam("id") String id) {
|
||||
RouteResource routeResource = getRoute(id);
|
||||
return routeResource.getRouteStatus();
|
||||
}
|
||||
|
||||
// Properties
|
||||
// -------------------------------------------------------------------------
|
||||
public List<RouteDefinition> getRoutes() {
|
||||
return getRouteDefinitions().getRoutes();
|
||||
}
|
||||
}
|
|
@ -79,14 +79,6 @@
|
|||
<include>**/*.class</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<!-- add our patched RoutesResource class to mask 2.0.0 camel-web bug -->
|
||||
<fileSet>
|
||||
<directory>../activemq-camel/target/classes</directory>
|
||||
<outputDirectory>/webapps/camel/WEB-INF/classes</outputDirectory>
|
||||
<includes>
|
||||
<include>org/apache/camel/web/resources/RoutesResource.class</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
||||
<dependencySets>
|
||||
|
@ -107,8 +99,6 @@
|
|||
<unpackOptions>
|
||||
<excludes>
|
||||
<exclude>**/applicationContext.xml</exclude>
|
||||
<!-- ignore RoutesResource class to mask 2.0.0 camel-web bug -->
|
||||
<exclude>**/RoutesResource.class</exclude>
|
||||
<!-- ignore jars already in distro -->
|
||||
<exclude>**/act*.jar</exclude>
|
||||
<exclude>**/ant*.jar</exclude>
|
||||
|
|
Loading…
Reference in New Issue