Skip to content

Commit

Permalink
[ENTESB-7935] Fix eclipse errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Apr 6, 2018
1 parent 6a4d563 commit 2bd5135
Show file tree
Hide file tree
Showing 41 changed files with 110 additions and 130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.che_*
.classpath
.project
.tern-project
.settings
.vagrant
Vagrantfile
Expand Down
5 changes: 5 additions & 0 deletions camel-activemq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
5 changes: 0 additions & 5 deletions camel-cxf-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
16 changes: 8 additions & 8 deletions camel-cxf-jaxrs/src/main/webapp/WEB-INF/cxfrs-camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@
CamelCxfRsServlet sends the required name parameter to the service by populating them
within the message exchange body.
-->
<route>
<from uri="direct:start" />
<setHeader headerName="operationName">
<route id="directToCxfrsBeanRoute">
<from id="directConsumer" uri="direct:start" />
<setHeader id="setHeaderOperationName" headerName="operationName">
<simple>greet</simple>
</setHeader>
<setHeader headerName="CamelCxfRsUsingHttpAPI">
<setHeader id="setHeaderCamelCxfRsUsingHttpAPI" headerName="CamelCxfRsUsingHttpAPI">
<constant>false</constant>
</setHeader>
<to uri="cxfrs:bean:cxfProducer" />
<to id="cxfrsProducer" uri="cxfrs:bean:cxfProducer" />
</route>

<!--
This route defines a CXF consumer endpoint which handles requests made to the greeting REST service.
GreetingsProcessor constructs a String greeting response to return back to the JAX-RS client.
-->
<route>
<from uri="cxfrs:bean:cxfConsumer" />
<process ref="greetingsProcessor" />
<route id="cxfConsumerToProcessorRoute">
<from id="cxfrsConsumer" uri="cxfrs:bean:cxfConsumer" />
<process id="processor" ref="greetingsProcessor" />
</route>
</camelContext>
</beans>
1 change: 0 additions & 1 deletion camel-cxf-jaxrs/src/main/webapp/greeting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-RS Example</title>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxrs/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-RS Example</title>
Expand Down
5 changes: 0 additions & 5 deletions camel-cxf-jaxws-cdi-secure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketbox</groupId>
<artifactId>picketbox</artifactId>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws-cdi-secure/src/main/webapp/greeting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws-cdi-secure/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
5 changes: 0 additions & 5 deletions camel-cxf-jaxws-cdi-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
-->
<route id="route2">
<from id="from2" uri="cxf:bean:cxfConsumer"/>
<process id="process1" ref="greetingsProcessor"/>
<process id="processor" ref="greetingsProcessor"/>
</route>
</camelContext>
</beans>
1 change: 0 additions & 1 deletion camel-cxf-jaxws-cdi-xml/src/main/webapp/greeting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws-cdi-xml/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
5 changes: 0 additions & 5 deletions camel-cxf-jaxws-secure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws-secure/src/main/webapp/greeting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws-secure/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
5 changes: 0 additions & 5 deletions camel-cxf-jaxws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
12 changes: 6 additions & 6 deletions camel-cxf-jaxws/src/main/webapp/WEB-INF/cxfws-camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@
CamelCxfWsServlet sends the required message and name parameters to the service by populating them
within the message exchange body.
-->
<route>
<from uri="direct:start" />
<to uri="cxf:bean:cxfProducer" />
<route id="directToCxfrsBeanRoute">
<from id="directConsumer" uri="direct:start" />
<to id="cxfwsProducer" uri="cxf:bean:cxfProducer" />
</route>

<!--
This route defines a CXF consumer endpoint which handles requests made to the greeting web service.
GreetingsProcessor constructs a String greeting response to return back to the JAX-WS client.
-->
<route>
<from uri="cxf:bean:cxfConsumer" />
<process ref="greetingsProcessor" />
<route id="cxfConsumerToProcessorRoute">
<from id="cxfrsConsumer" uri="cxf:bean:cxfConsumer" />
<process id="processor" ref="greetingsProcessor" />
</route>
</camelContext>

Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws/src/main/webapp/greeting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
1 change: 0 additions & 1 deletion camel-cxf-jaxws/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>WildFly Camel Subsystem CXF JAX-WS Example</title>
Expand Down
5 changes: 5 additions & 0 deletions camel-jms-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
46 changes: 23 additions & 23 deletions camel-jms-spring/src/main/webapp/WEB-INF/camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,48 +43,48 @@
<!--
This route generates a random order every 5 seconds
-->
<route>
<from uri="timer:order?period=5000&amp;delay=0"/>
<bean method="generateOrder" ref="orderGenerator"/>
<route id="timerToFileRoute">
<from id="routeTimer" uri="timer:order?period=5000&amp;delay=0"/>
<bean id="orderGenerator" method="generateOrder" ref="orderGenerator"/>
<setHeader headerName="Exchange.FILE_NAME" id="route-header-file-name">
<method method="generateFileName" ref="orderGenerator"/>
</setHeader>
<to uri="file://{{jboss.server.data.dir}}/orders"/>
<to id="fileProducer" uri="file://{{jboss.server.data.dir}}/orders"/>
</route>

<!--
This route reads files placed within JBOSS_HOME/standalone/data/orders
and places them onto JMS queue 'ordersQueue' within the WildFly
internal ActiveMQ Artemis broker.
-->
<route>
<from uri="file://{{jboss.server.data.dir}}/orders" />
<convertBodyTo type="java.lang.String" />
<removeHeaders pattern="*" />
<to uri="jms:queue:OrdersQueue" />
<route id="fileToJmsQueueRoute">
<from id="fileConsumer" uri="file://{{jboss.server.data.dir}}/orders" />
<convertBodyTo id="convertToString" type="java.lang.String" />
<removeHeaders id="removeHeaders" pattern="*" />
<to id="jmsProducer" uri="jms:queue:OrdersQueue" />
</route>

<!--
This route consumes messages from the 'ordersQueue'. Then, based on the
message payload XML content it uses a content based router to output
orders into appropriate country directories
-->
<route>
<from uri="jms:queue:OrdersQueue" />
<choice>
<when>
<xpath>/order/customer/country = 'UK'</xpath>
<log message="Sending order to the UK" />
<to uri="file:{{jboss.server.data.dir}}/orders/processed/UK" />
<route id="jmsQueueToFileRoute">
<from id="jmsConsumer" uri="jms:queue:OrdersQueue" />
<choice id="choiceCountry">
<when id="whenCountryUk">
<xpath id="xpathUk">/order/customer/country = 'UK'</xpath>
<log id="logUk" message="Sending order to the UK" />
<to id="fileProcessedUk" uri="file:{{jboss.server.data.dir}}/orders/processed/UK" />
</when>
<when>
<xpath>/order/customer/country = 'US'</xpath>
<log message="Sending order to the US" />
<to uri="file:{{jboss.server.data.dir}}/orders/processed/US" />
<when id="whenCountryUs">
<xpath id="xpathUs">/order/customer/country = 'US'</xpath>
<log id="logUs" message="Sending order to the US" />
<to id="fileProcessedUs" uri="file:{{jboss.server.data.dir}}/orders/processed/US" />
</when>
<otherwise>
<log message="Sending order to another country" />
<to uri="file:{{jboss.server.data.dir}}/orders/processed/other" />
<otherwise id="whenCountryOther">
<log id="logOther" message="Sending order to another country" />
<to id="fileProcessedOther" uri="file:{{jboss.server.data.dir}}/orders/processed/other" />
</otherwise>
</choice>
</route>
Expand Down
6 changes: 5 additions & 1 deletion camel-jms-tx-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Build -->
Expand Down
40 changes: 20 additions & 20 deletions camel-jms-tx-spring/src/main/webapp/WEB-INF/camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
is encountered this takes care of rolling back the JMS and JPA transactions. The
problem message is sent to the WildFly dead letter JMS queue (DLQ).
-->
<onException>
<onException id="onISE">
<exception>java.lang.IllegalStateException</exception>
<redeliveryPolicy maximumRedeliveries="1" />
<handled>
Expand All @@ -81,24 +81,24 @@
<!--
This route generates a random order every 15 seconds
-->
<route>
<from uri="timer:order?period=15000&amp;delay=0"/>
<bean method="generateOrder" ref="orderGenerator"/>
<route id="timerToFileRoute">
<from id="routeTimer" uri="timer:order?period=15000&amp;delay=0"/>
<bean id="orderGenerator" method="generateOrder" ref="orderGenerator"/>
<setHeader headerName="Exchange.FILE_NAME" id="route-header-file-name">
<method method="generateFileName" ref="orderGenerator"/>
</setHeader>
<to uri="file://{{jboss.server.data.dir}}/orders"/>
<to id="fileProducer" uri="file://{{jboss.server.data.dir}}/orders"/>
</route>

<!--
This route consumes XML files from JBOSS_HOME/standalone/data/orders and sends
the file content to JMS destination OrdersQueue.
-->
<route>
<from uri="file:{{jboss.server.data.dir}}/orders" />
<transacted />
<convertBodyTo type="java.lang.String" />
<to uri="jms:queue:OrdersQueue" />
<route id="fileToJmsQueueRoute">
<from id="fileConsumer" uri="file:{{jboss.server.data.dir}}/orders" />
<transacted id="transacted" />
<convertBodyTo id="convertToString" type="java.lang.String" />
<to id="jmsProducer" uri="jms:queue:OrdersQueue" />
</route>

<!--
Expand All @@ -110,20 +110,20 @@
which forces the JMS / JPA transaction to be rolled back and the message to be delivered to the dead letter
queue.
-->
<route>
<from uri="jms:queue:OrdersQueue" />
<unmarshal>
<route id="jmsQueueToFileRoute">
<from id="jmsConsumer" uri="jms:queue:OrdersQueue" />
<unmarshal id="jaxbUnmarshal">
<jaxb contextPath="org.wildfly.camel.examples.jms.transacted.model" />
</unmarshal>
<to uri="jpa:Order" />
<choice>
<when>
<to id="jpaProducer" uri="jpa:Order" />
<choice id="choiceQuantity">
<when id="whenQuantity">
<simple>${body.quantity} > 10</simple>
<log message="Order quantity is greater than 10 - rolling back transaction!" />
<throwException exceptionType="java.lang.IllegalStateException" message="Invalid quantity" />
<log id="logError" message="Order quantity is greater than 10 - rolling back transaction!" />
<throwException id="exception" exceptionType="java.lang.IllegalStateException" message="Invalid quantity" />
</when>
<otherwise>
<log message="Order processed successfully" />
<otherwise id="otherwiseQuantity">
<log id="logSuccess" message="Order processed successfully" />
</otherwise>
</choice>
</route>
Expand Down
Loading

0 comments on commit 2bd5135

Please sign in to comment.