svn commit: r931012 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java

2010-04-05 Thread davsclaus
Author: davsclaus
Date: Tue Apr  6 04:40:38 2010
New Revision: 931012

URL: http://svn.apache.org/viewvc?rev=931012&view=rev
Log:
MR-332: Avoid NPE if from endpoint is null

Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java?rev=931012&r1=931011&r2=931012&view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/PollEnricher.java
 Tue Apr  6 04:40:38 2010
@@ -63,6 +63,7 @@ public class PollEnricher extends Servic
  *
  * @param aggregationStrategy  aggregation strategy to aggregate input 
data and additional data.
  * @param consumer consumer to resource endpoint.
+ * @param timeout timeout in millis
  */
 public PollEnricher(AggregationStrategy aggregationStrategy, 
PollingConsumer consumer, long timeout) {
 this.aggregationStrategy = aggregationStrategy;
@@ -171,7 +172,8 @@ public class PollEnricher extends Servic
 if (consumer instanceof EventDrivenPollingConsumer) {
 EventDrivenPollingConsumer edpc = (EventDrivenPollingConsumer) 
consumer;
 boolean fileBasedConsumer = 
edpc.getEndpoint().getEndpointKey().startsWith("file") || 
edpc.getEndpoint().getEndpointKey().startsWith("ftp");
-boolean fileBasedExchange = 
exchange.getFromEndpoint().getEndpointUri().startsWith("file") || 
exchange.getFromEndpoint().getEndpointUri().startsWith("ftp");
+boolean fileBasedExchange = exchange.getFromEndpoint() != null
+&& 
(exchange.getFromEndpoint().getEndpointUri().startsWith("file") || 
exchange.getFromEndpoint().getEndpointUri().startsWith("ftp"));
 if (fileBasedConsumer && fileBasedExchange) {
 throw new IllegalArgumentException("Camel currently does not 
support pollEnrich from a file/ftp endpoint"
 + " when the route also started from a file/ftp 
endpoint."




svn commit: r931010 - in /camel/trunk: components/camel-juel/pom.xml platforms/karaf/features/pom.xml platforms/karaf/features/src/main/resources/features.xml

2010-04-05 Thread ningjiang
Author: ningjiang
Date: Tue Apr  6 04:30:21 2010
New Revision: 931010

URL: http://svn.apache.org/viewvc?rev=931010&view=rev
Log:
CAMEL-2615 fixed the camel-juel feature install issue in servicemix

Modified:
camel/trunk/components/camel-juel/pom.xml
camel/trunk/platforms/karaf/features/pom.xml
camel/trunk/platforms/karaf/features/src/main/resources/features.xml

Modified: camel/trunk/components/camel-juel/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-juel/pom.xml?rev=931010&r1=931009&r2=931010&view=diff
==
--- camel/trunk/components/camel-juel/pom.xml (original)
+++ camel/trunk/components/camel-juel/pom.xml Tue Apr  6 04:30:21 2010
@@ -31,6 +31,7 @@
   Camel JUEL support
 
   
+
javax.el;version="[2,3)"

org.apache.camel.language.juel.*
   
 

Modified: camel/trunk/platforms/karaf/features/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/pom.xml?rev=931010&r1=931009&r2=931010&view=diff
==
--- camel/trunk/platforms/karaf/features/pom.xml (original)
+++ camel/trunk/platforms/karaf/features/pom.xml Tue Apr  6 04:30:21 2010
@@ -93,6 +93,7 @@
   1.2.1_2
   2.4_3
   2.2.0_1
+  0.7.1
   1.6.6_1
   0.5.0_2
   9.1.0.1_3

Modified: camel/trunk/platforms/karaf/features/src/main/resources/features.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features.xml?rev=931010&r1=931009&r2=931010&view=diff
==
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml 
(original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Tue 
Apr  6 04:30:21 2010
@@ -316,7 +316,8 @@
   
   
 camel-core
-
mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/${geronimo-el-version}
+http
+mvn:org.ops4j.pax.web/pax-web-jsp/${pax.web.version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.juel/${juel-bundle-version}
 mvn:org.apache.camel/camel-juel/${pom.version}
   




svn commit: r930900 - in /camel/m2-repo/com/google/common: ./ google-collect/ google-collect/1.0/

2010-04-05 Thread krasserm
Author: krasserm
Date: Mon Apr  5 16:53:06 2010
New Revision: 930900

URL: http://svn.apache.org/viewvc?rev=930900&view=rev
Log:
upload of google collection lib (needed by GAE examples)

Added:
camel/m2-repo/com/google/common/
camel/m2-repo/com/google/common/google-collect/
camel/m2-repo/com/google/common/google-collect/1.0/
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar   
(with props)

camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.md5

camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.sha1
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom   
(with props)

camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.md5

camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.sha1
camel/m2-repo/com/google/common/google-collect/maven-metadata.xml   (with 
props)
camel/m2-repo/com/google/common/google-collect/maven-metadata.xml.md5
camel/m2-repo/com/google/common/google-collect/maven-metadata.xml.sha1

Added: camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar?rev=930900&view=auto
==
Binary file - no diff available.

Propchange: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar
--
svn:mime-type = application/octet-stream

Added: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.md5
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.md5?rev=930900&view=auto
==
--- 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.md5 
(added)
+++ 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.md5 
Mon Apr  5 16:53:06 2010
@@ -0,0 +1 @@
+b5483f116137f86201dc96c1dcfc7083
\ No newline at end of file

Added: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.sha1
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.sha1?rev=930900&view=auto
==
--- 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.sha1 
(added)
+++ 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.jar.sha1 
Mon Apr  5 16:53:06 2010
@@ -0,0 +1 @@
+a2437cd90ef0e7f0840645489f4226e73400d0dc
\ No newline at end of file

Added: camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom?rev=930900&view=auto
==
--- camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom 
(added)
+++ camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom 
Mon Apr  5 16:53:06 2010
@@ -0,0 +1,8 @@
+
+http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
xmlns="http://maven.apache.org/POM/4.0.0";
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  4.0.0
+  com.google.common
+  google-collect
+  1.0
+

Propchange: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom
--
svn:eol-style = native

Added: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.md5
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.md5?rev=930900&view=auto
==
--- 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.md5 
(added)
+++ 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.md5 
Mon Apr  5 16:53:06 2010
@@ -0,0 +1 @@
+baf6fc024e67900df3d6a86d44236256
\ No newline at end of file

Added: 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.sha1
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.sha1?rev=930900&view=auto
==
--- 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.sha1 
(added)
+++ 
camel/m2-repo/com/google/common/google-collect/1.0/google-collect-1.0.pom.sha1 
Mon Apr  5 16:53:06 2010
@@ -0,0 +1 @@
+d05b02158bd0c3efd8262b515ae1e5833b8ad77f
\ No newline at end of file

Added: camel/m2-repo/com/google/common/google-collect/maven-metadata.xml
URL: 
http://svn.apache

svn commit: r930897 - in /camel/trunk/components/camel-gae: pom.xml src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java src/main/java/org/apache/camel/component/gae/auth/GAuth

2010-04-05 Thread krasserm
Author: krasserm
Date: Mon Apr  5 16:25:08 2010
New Revision: 930897

URL: http://svn.apache.org/viewvc?rev=930897&view=rev
Log:
propagate message headers in gauth endpoints, use latest gdata version.

Modified:
camel/trunk/components/camel-gae/pom.xml

camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java

camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthUpgradeBinding.java

Modified: camel/trunk/components/camel-gae/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/pom.xml?rev=930897&r1=930896&r2=930897&view=diff
==
--- camel/trunk/components/camel-gae/pom.xml (original)
+++ camel/trunk/components/camel-gae/pom.xml Mon Apr  5 16:25:08 2010
@@ -33,7 +33,7 @@
   

org.apache.camel.component.gae.*
 1.3.2
-1.40.2
+1.41.1
   
 
   

Modified: 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java?rev=930897&r1=930896&r2=930897&view=diff
==
--- 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java
 (original)
+++ 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBinding.java
 Mon Apr  5 16:25:08 2010
@@ -82,6 +82,7 @@ public class GAuthAuthorizeBinding imple
  */
 public Exchange readResponse(GAuthEndpoint endpoint, Exchange exchange, 
GoogleOAuthParameters response) throws Exception {
 String authrUrl = 
endpoint.newOAuthHelper().createUserAuthorizationUrl(response);
+exchange.getOut().setHeaders(exchange.getIn().getHeaders());
 exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 302);
 exchange.getOut().setHeader("Location", authrUrl);
 

Modified: 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthUpgradeBinding.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthUpgradeBinding.java?rev=930897&r1=930896&r2=930897&view=diff
==
--- 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthUpgradeBinding.java
 (original)
+++ 
camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthUpgradeBinding.java
 Mon Apr  5 16:25:08 2010
@@ -89,6 +89,7 @@ public class GAuthUpgradeBinding impleme
  * @see #GAUTH_ACCESS_TOKEN_SECRET
  */
 public Exchange readResponse(GAuthEndpoint endpoint, Exchange exchange, 
GoogleOAuthParameters response) throws IOException {
+exchange.getOut().setHeaders(exchange.getIn().getHeaders());
 exchange.getOut().setHeader(GAUTH_ACCESS_TOKEN, 
response.getOAuthToken());
 exchange.getOut().setHeader(GAUTH_ACCESS_TOKEN_SECRET, 
response.getOAuthTokenSecret());
 return exchange;




svn commit: r930894 - in /camel/m2-repo/com/google/gdata: gdata-calendar-meta/ gdata-calendar-meta/1.41.1/ gdata-calendar/ gdata-calendar/1.41.1/ gdata-core/ gdata-core/1.41.1/

2010-04-05 Thread krasserm
Author: krasserm
Date: Mon Apr  5 16:20:18 2010
New Revision: 930894

URL: http://svn.apache.org/viewvc?rev=930894&view=rev
Log:
gdata-core version update and deployment of gdata-calendar neededed for 
upcoming oauth example.

Added:
camel/m2-repo/com/google/gdata/gdata-calendar/
camel/m2-repo/com/google/gdata/gdata-calendar-meta/
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar
   (with props)

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.md5

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.sha1

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.pom
   (with props)

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.pom.md5

camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.pom.sha1
camel/m2-repo/com/google/gdata/gdata-calendar-meta/maven-metadata.xml   
(with props)
camel/m2-repo/com/google/gdata/gdata-calendar-meta/maven-metadata.xml.md5
camel/m2-repo/com/google/gdata/gdata-calendar-meta/maven-metadata.xml.sha1
camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.jar  
 (with props)

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.jar.md5

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.jar.sha1

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.pom  
 (with props)

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.pom.md5

camel/m2-repo/com/google/gdata/gdata-calendar/1.41.1/gdata-calendar-1.41.1.pom.sha1
camel/m2-repo/com/google/gdata/gdata-calendar/maven-metadata.xml   (with 
props)
camel/m2-repo/com/google/gdata/gdata-calendar/maven-metadata.xml.md5
camel/m2-repo/com/google/gdata/gdata-calendar/maven-metadata.xml.sha1
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.jar   
(with props)
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.jar.md5
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.jar.sha1
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.pom   
(with props)
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.pom.md5
camel/m2-repo/com/google/gdata/gdata-core/1.41.1/gdata-core-1.41.1.pom.sha1
Modified:
camel/m2-repo/com/google/gdata/gdata-core/maven-metadata.xml
camel/m2-repo/com/google/gdata/gdata-core/maven-metadata.xml.md5
camel/m2-repo/com/google/gdata/gdata-core/maven-metadata.xml.sha1

Added: 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar?rev=930894&view=auto
==
Binary file - no diff available.

Propchange: 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar
--
svn:mime-type = application/octet-stream

Added: 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.md5
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.md5?rev=930894&view=auto
==
--- 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.md5
 (added)
+++ 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.md5
 Mon Apr  5 16:20:18 2010
@@ -0,0 +1 @@
+a850af0449be05687676b9274b92d622
\ No newline at end of file

Added: 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.sha1
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.sha1?rev=930894&view=auto
==
--- 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.sha1
 (added)
+++ 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.jar.sha1
 Mon Apr  5 16:20:18 2010
@@ -0,0 +1 @@
+b169a3441ad85a64999d5346ae7708a38bb8b0f8
\ No newline at end of file

Added: 
camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.pom
URL: 
http://svn.apache.org/viewvc/camel/m2-repo/com/google/gdata/gdata-calendar-meta/1.41.1/gdata-calendar-meta-1.41.1.pom?rev=930894&view=auto
===

svn commit: r930893 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/builder/ main/java/org/apache/camel/impl/ main/java/org/apache/camel/util/ test/java/org/apache/camel/impl/

2010-04-05 Thread davsclaus
Author: davsclaus
Date: Mon Apr  5 16:13:12 2010
New Revision: 930893

URL: http://svn.apache.org/viewvc?rev=930893&view=rev
Log:
CAMEL-2550: @EndpointInject validates only one of uri or ref attribute has been 
set. Removed @deprecated class.

Removed:

camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java
Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java

camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java

camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java

camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=930893&r1=930892&r2=930893&view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
 Mon Apr  5 16:13:12 2010
@@ -948,9 +948,6 @@ public class DefaultCamelContext extends
 return errorHandlerBuilder;
 }
 
-/**
- * Sets the default error handler builder which is inherited by the routes
- */
 public void setErrorHandlerBuilder(ErrorHandlerBuilder 
errorHandlerBuilder) {
 this.errorHandlerBuilder = errorHandlerBuilder;
 }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java?rev=930893&r1=930892&r2=930893&view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
 Mon Apr  5 16:13:12 2010
@@ -127,23 +127,27 @@ public final class CamelContextHelper {
 /**
  * Evaluates the @EndpointInject annotation using the given context
  */
-public static Endpoint getEndpointInjection(CamelContext camelContext, 
String uri, String name, String injectionPointName, boolean mandatory) {
+public static Endpoint getEndpointInjection(CamelContext camelContext, 
String uri, String ref, String injectionPointName, boolean mandatory) {
+if (ObjectHelper.isNotEmpty(uri) && ObjectHelper.isNotEmpty(ref)) {
+throw new IllegalArgumentException("Both uri and name is provided, 
only either one is allowed: uri=" + uri + ", ref=" + ref);
+}
+
 Endpoint endpoint;
 if (isNotEmpty(uri)) {
 endpoint = camelContext.getEndpoint(uri);
 } else {
-// if a name is given then it should be possible to lookup
+// if a ref is given then it should be possible to lookup
 // otherwise we do not catch situations where there is a typo etc
-if (isNotEmpty(name)) {
-endpoint = mandatoryLookup(camelContext, name, Endpoint.class);
+if (isNotEmpty(ref)) {
+endpoint = mandatoryLookup(camelContext, ref, Endpoint.class);
 } else {
-if (isEmpty(name)) {
-name = injectionPointName;
+if (isEmpty(ref)) {
+ref = injectionPointName;
 }
 if (mandatory) {
-endpoint = mandatoryLookup(camelContext, name, 
Endpoint.class);
+endpoint = mandatoryLookup(camelContext, ref, 
Endpoint.class);
 } else {
-endpoint = lookup(camelContext, name, Endpoint.class);
+endpoint = lookup(camelContext, ref, Endpoint.class);
 }
 }
 }

Modified: 
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java?rev=930893&r1=930892&r2=930893&view=diff
==
--- 
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
 (original)
+++ 
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
 Mon Apr  5 16:13:12 2010
@@ -74,7 +74,7 @@ public class CamelPostProcessorHelperTes
 
 MyEndpointInjectBeanProducerTemplate bean = new 
MyEndpointInjectBeanProducerTemplate();
 Method method = bean.getClass().getMethod("setProducer", 
ProducerTemplate.class);
-
+
 EndpointInject endpointInject = 
method.getAnnota

[CONF] Apache Camel > Camel 2.3.0 Release

2010-04-05 Thread confluence







 Camel 2.3.0 Release
 Page edited by Claus Ibsen

 
  
 
 Camel 2.3.0 release (currently in progress)




New and Noteworthy

Welcome to the 2.3.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)


	Overhauled threading model and introducing threadPoolProfile to define profiles for thread pools to have easy configuration.
	Property placeholders in for example endpoint uris is not natively supported in camel-core which means you no long need to use Spring for that. It works therefore in any environment as its provided out of the box in camel-core.
	Property placeholders also works in the  when using Spring XML. Basically nearly all places where you enter text the property placeholder is supported.
	Added ExchangeSentEvent to EventNotifier which contains time taken and is emitted when an Exchange is sent to an Endpoint. This allows end users to easily gather performance stats for Exchange send to endpoints.
	Added disconnect option to MINA to close Mina session right after usage.
	Jetty now supports to get the HttpServletRequest and HttpServletResponse from the Message header.
	XPathBuilder now supports being used without an Exchange which allows you to use it in a custom/generic fashion.
	XPath now supports using the JVM system property specifying a custom XPathFactory to be used. You can use this to switch from default to use e.g. Saxon.
	XSLT now supports using  where the files is loaded from classpath, and being able to load relative according to the endpoint configured location. See the wiki page for details.
	File, FTP added option eagerDeleteTargetFile to control the behavior when using tempFile whether or not to eagerly delete the target file or wait until last moment.
	Reduced registering producers in JMX to prevent using too much memory and potentially registering short lived producers which didn't bring much value of being managed as well.
	Upgraded HTTP to use Apache HTTP Client 4.0.1. You may need to migrate if you use special or advanced configuration of HTTP Client.
	Upgraded Jetty to use Jetty 7.0.1.
	Individual routes can be Graceful Shutdown at runtime, which allows you to stop the route in a more reliable and gentle way.
	Total overhaul of the Aggregator EIP, which now has better completion triggers, and supports pluggable repository. For example to use camel-hawtdb as persistent store.
	Added removeHeaders to remove multiple headers, e.g. use removeHeaders("Camel*") to remove all Camel related headers.
	Improved the Failover load balancer to support round robin mode and a few other options as well.
	Fixed issue with Camel not being able to run deployed as a WAR in WebLogic server.
	Fixed Polling Consumer not working with JMS selector.
	pollEnrich now handover completions which means you can use the move like options from File or FTP component. For example to enrich with a file and have that file moved when the route completes.
	Added @Attachments annotation to Bean binding.
	Simple and Bean language now has a build in OGNL notation which allows you to reference from Map or List structures and as well to invoke methods in a OGNL like notation. See more details at Simple wiki page.
	camel-jetty supports the multipart/form post out of box.
	Graceful Shutdown now shut down routes in the reverse order in which they was started. Option shutdownRoutesInReverseOrder can be used to control this behavior.
	XSLT component now allows you to chose which output type to use with the output option. For example you can now stream directly to a file, for example when transforming very big xml messages.
	Error Handler can be configure with specialized  tag to make it easier to configure error handling in Spring XML.
	Added depends-on attribute to  so you can have other beans created before Camel when using Spring XML.
	Added voidAsInOnly attribute to  when Using CamelProxy to let methods that has void as return type be regarded as InOnly messages. By default all methods would be InOut unless you annotate them with @InOut or @InOnly.
	Added org.apache.camel.builder.ProxyBuilder to easier create Camel Proxy in Java / Java DSL.



New Enterprise Integration Patterns

New Components


	camel-nagios for sending passive checks to Nagios
	properties for using property placeholders to resolve endpoint uris.
	camel-gae extensions
	
		gauth component for implementing OAuth consumers.
		glogin component for programmatic login to Google App Engine applications from Java clients.
	
	
	camel-hawtdb as persistent store for the Aggregator EIP.
	camel-netty for working with TCP and UDP protocols using Java NIO based capabilities offered by the JBoss Netty.



New DSL

	removeHeaders



New Annotations

	@Attachments



New Data Formats


	SOAP data format provides basic webservice support without the CXF Stack



New Languages

New Examples

	camel-example-aggregate shows the new overhauled Aggregator in use with persistence

[CONF] Apache Camel > Using CamelProxy

2010-04-05 Thread confluence







 Using CamelProxy
 Page edited by Claus Ibsen

 
  
 
 Using CamelProxy

Camel allows you to proxy a producer sending to an Endpoint by a regular interface. Then when clients using this interface can work with it as if its regular java code but in reality its proxied and does a Request Reply to a given endpoint.

Proxy from Spring

You can define a proxy in the spring XML file as shown below

"myCamel" xmlns="http://camel.apache.org/schema/spring">


"myProxySender"
   serviceInterface="org.apache.camel.spring.config.MyProxySender"
   serviceUrl="direct:start"/>

 

"direct:start"/>

Bye ${body}







Now the client can grab this bean using regular spring bean coding and invoke it as if its just another bean.
The code is based on an unit test but proves the point:

ApplicationContext ac = new ClassPathXmlApplicationContext("org/apache/camel/spring/config/AnotherCamelProxyTest.xml");

MyProxySender sender = (MyProxySender) ac.getBean("myProxySender");
String reply = sender.hello("Camel");

assertEquals("Bye Camel", reply);



In Camel 2.3 you can define that proxied methods which has void as return type, can be treated as Fire and Forget messaging style (aka InOnly). This is done by setting the attribute voidAsInOnly=true in the  tag. If you let it be the default value, which is InOut then a void method will still wait for the message to be completely routed. This is not always what you want and hence you can use this option to turn it onto a fire and forget style. BTW: You can also add the @InOnly annotation to the method on the interface to tell Camel that this method is InOnly.

Such an example is shown below:

"myCamel" xmlns="http://camel.apache.org/schema/spring">


"myOtherSender"
   serviceInterface="org.apache.camel.spring.config.MyOtherProxySender"
   serviceUrl="seda:start"
   voidAsInOnly="true"/>



"seda:start"/>

2000

"mock:result"/>






Proxy from Java

You can also create a proxy from regular Java using a org.apache.camel.component.bean.ProxyHelper as shown below:


Endpoint endpoint = context.getEndpoint("direct:start");
MyProxySender sender = ProxyHelper.createProxy(endpoint, MyProxySender.class);



In Camel 2.3 you can use org.apache.camel.builder.ProxyBuilder which may be easier to use than ProxyHelper:

public void testProxyBuilderProxyCallAnotherBean() throws Exception {
// use ProxyBuilder to easily create the proxy
OrderService service = new ProxyBuilder(context).endpoint("direct:bean").build(OrderService.class);

String reply = service.submitOrderStringReturnString("World");
assertEquals("Hello World", reply);
}




Proxy with Annotation

Another way to configure the proxy from java is by using the @Produce annotation. Also see POJO Producing.


@Produce(uri="direct:start")
MyProxySender sender;



This basically does the same as ProxyHelper.createProxy.

What is send on the Message
When using a proxy Camel will send the message payload as a org.apache.camel.component.bean.BeanInvocation object which holds the details of which method was invoked and what the argument was.

Turning the BeanInvocation into a first class payload
Available as of Camel 2.1

If you proxied method signature only have one parameter such as:


String hello(String name);



Then it gives another advantage in Camel as it allows Camel to regard the value passed in to this single parameter as the real payload. In other words if you pass in Camel to the hello method, then Camel can see that as a java.lang.String payload with the value of Camel. This gives you a great advantage as you can use the proxy as first class services with Camel.

You can proxy Camel and let clients use the pure and clean interfaces as if Camel newer existed. Then Camel can proxy the invocation and receive the input passed into the single method parameter and regard that as if it was just the message payload.

Okay lets try that with an example

Example with proxy using single parameter methods.

At first we have the interface we wish to proxy

public interface OrderService {

String submitOrderStringReturnString(String order);

Document submitOrderStringReturnDocument(String order);

String submitOrderDocumentReturnString(Document order);

Document submitOrderDocumentReturnDocument(Document order);

void doNothing(String s);

Integer invalidReturnType(String s);

String doAbsolutelyNothing();

}



Notice that all methods have single parameters. The return type is optional, as you can see one of them is void.
Also what you should know is that Camel uses its Type Converter mechanism to adapt to the types defined on the methods.

This allows us to easily use org.w3c.dom.Document and String types with no hazzle.

Okay then we have the following route where we route using a 

svn commit: r930866 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/bean/ camel-core/src/test/java/org/apache/camel/component/

2010-04-05 Thread davsclaus
Author: davsclaus
Date: Mon Apr  5 14:25:21 2010
New Revision: 930866

URL: http://svn.apache.org/viewvc?rev=930866&view=rev
Log:
CAMEL-2613: Added ProxyBuilder to Java DSL. Added voidAsInOnly option to Camel 
Proxy to let methods that has void return type act as InOnly (fire and forget) 
instead of default as InOut.

Added:

camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java 
  (with props)

camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyVoidAsInOnlyTest.java
  - copied, changed from r930692, 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java

camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyVoidAsInOutTest.java
   (with props)

camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/MyOtherProxySender.java
  - copied, changed from r930692, 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/MyProxySender.java

camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyVoidAsInOnlyTest.xml
  - copied, changed from r930692, 
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/AnotherCamelProxyTest.xml

camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyVoidAsInOutTest.xml
   (with props)
Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfoCache.java

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/ProxyHelper.java

camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanProxyTest.java

camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelProxyFactoryDefinition.java

camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java

Added: 
camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java?rev=930866&view=auto
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java 
(added)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java 
Mon Apr  5 14:25:21 2010
@@ -0,0 +1,81 @@
+/**
+ * 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.builder;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.component.bean.ProxyHelper;
+
+/**
+ * A build to create Camel proxies.
+ *
+ * @version $Revision$
+ */
+public final class ProxyBuilder {
+
+private final CamelContext camelContext;
+private Endpoint endpoint;
+private boolean voidAsInOnly;
+
+public ProxyBuilder(CamelContext camelContext) {
+this.camelContext = camelContext;
+}
+
+/**
+ * Send the proxied message to this endpoint
+ *
+ * @param url  uri of endpoint
+ * @return the builder
+ */
+public ProxyBuilder endpoint(String url) {
+this.endpoint = camelContext.getEndpoint(url);
+return this;
+}
+
+/**
+ * Send the proxied message to this endpoint
+ *
+ * @param endpoint  the endpoint
+ * @return the builder
+ */
+public ProxyBuilder endpoint(Endpoint endpoint) {
+this.endpoint = endpoint;
+return this;
+}
+
+/**
+ * Let methods which return void be regarded as InOnly 
methods (eg Fire and forget).
+ *
+ * @return the builder
+ */
+public ProxyBuilder voidAsInOnly() {
+voidAsInOnly = true;
+return this;
+}
+
+/**
+ * Builds the proxy.
+ *
+ * @param interfaceClasses  the service interface(s)
+ * @return the proxied bean
+ * @throws Exception is thrown if error creating t

[CONF] Apache Camel > Using CamelProxy

2010-04-05 Thread confluence







 Using CamelProxy
 Page edited by Claus Ibsen

 
  
 
 Using CamelProxy

Camel allows you to proxy a producer sending to an Endpoint by a regular interface. Then when clients using this interface can work with it as if its regular java code but in reality its proxied and does a Request Reply to a given endpoint.

Proxy from Spring

You can define a proxy in the spring XML file as shown below

"myCamel" xmlns="http://camel.apache.org/schema/spring">


"myProxySender"
   serviceInterface="org.apache.camel.spring.config.MyProxySender"
   serviceUrl="direct:start"/>

 

"direct:start"/>

Bye ${body}







Now the client can grab this bean using regular spring bean coding and invoke it as if its just another bean.
The code is based on an unit test but proves the point:

ApplicationContext ac = new ClassPathXmlApplicationContext("org/apache/camel/spring/config/AnotherCamelProxyTest.xml");

MyProxySender sender = (MyProxySender) ac.getBean("myProxySender");
String reply = sender.hello("Camel");

assertEquals("Bye Camel", reply);



In Camel 2.3 you can define that proxied methods which has void as return type, can be treated as Event Message messaging style (aka InOnly). This is done by setting the attribute voidAsInOnly=true in the  tag. If you let it be the default value, which is InOut then a void method will still wait for the message to be completely routed. This is not always what you want and hence you can use this option to turn it onto a fire and forget style. BTW: You can also add the @InOnly annotation to the method on the interface to tell Camel that this method is InOnly.

Proxy from Java

You can also create a proxy from regular Java using a ProxyHelper as shown below:


Endpoint endpoint = context.getEndpoint("direct:start");
MyProxySender sender = ProxyHelper.createProxy(endpoint, MyProxySender.class);



Proxy with Annotation

Another way to configure the proxy from java is by using the @Produce annotation. Also see POJO Producing.


@Produce(uri="direct:start")
MyProxySender sender;



This basically does the same as ProxyHelper.createProxy.

What is send on the Message
When using a proxy Camel will send the message payload as a org.apache.camel.component.bean.BeanInvocation object which holds the details of which method was invoked and what the argument was.

Turning the BeanInvocation into a first class payload
Available as of Camel 2.1

If you proxied method signature only have one parameter such as:


String hello(String name);



Then it gives another advantage in Camel as it allows Camel to regard the value passed in to this single parameter as the real payload. In other words if you pass in Camel to the hello method, then Camel can see that as a java.lang.String payload with the value of Camel. This gives you a great advantage as you can use the proxy as first class services with Camel.

You can proxy Camel and let clients use the pure and clean interfaces as if Camel newer existed. Then Camel can proxy the invocation and receive the input passed into the single method parameter and regard that as if it was just the message payload.

Okay lets try that with an example

Example with proxy using single parameter methods.

At first we have the interface we wish to proxy

public interface OrderService {

String submitOrderStringReturnString(String order);

Document submitOrderStringReturnDocument(String order);

String submitOrderDocumentReturnString(Document order);

Document submitOrderDocumentReturnDocument(Document order);

void doNothing(String s);

Integer invalidReturnType(String s);

String doAbsolutelyNothing();

}



Notice that all methods have single parameters. The return type is optional, as you can see one of them is void.
Also what you should know is that Camel uses its Type Converter mechanism to adapt to the types defined on the methods.

This allows us to easily use org.w3c.dom.Document and String types with no hazzle.

Okay then we have the following route where we route using a Content Based Router that is XML based. See that we use XPath in the choices to route the message depending on its a book order or not.


from("direct:start")
.choice()
.when(xpath("/order/@type = 'book'")).to("direct:book")
.otherwise().to("direct:other")
.end();

from("direct:book").transform(constant("123\">OK"));

from("direct:other").transform(constant("FAIL"));



Now there is a couple of tests that shows using the Camel Proxy how we can easily invoke the proxy and do not know its actually Camel doing some routing underneath.


Endpoint endpoint = context.getEndpoint("direct:start");
OrderService service = ProxyHelper.createProxy(endpoint, OrderService.class);

String reply = service.submitOrderStringReturnString("book\">Camel in action");
assertEquals("123\">OK", reply);



And this one below shows using di

svn commit: r930836 - /camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java

2010-04-05 Thread davsclaus
Author: davsclaus
Date: Mon Apr  5 10:45:15 2010
New Revision: 930836

URL: http://svn.apache.org/viewvc?rev=930836&view=rev
Log:
JmsBinding should only WARN if body is not null.

Modified:

camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java

Modified: 
camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java?rev=930836&r1=930835&r2=930836&view=diff
==
--- 
camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
 (original)
+++ 
camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
 Mon Apr  5 10:45:15 2010
@@ -438,7 +438,7 @@ public class JmsBinding {
 // force a specific type from the endpoint configuration
 type = endpoint.getConfiguration().getJmsMessageType();
 } else {
-// let body deterime the type
+// let body determine the type
 if (body instanceof Node || body instanceof String) {
 type = Text;
 } else if (body instanceof byte[] || body instanceof GenericFile 
|| body instanceof File || body instanceof Reader
@@ -492,11 +492,11 @@ public class JmsBinding {
 }
 }
 
-// TODO: should we throw an exception instead?
-if (LOG.isWarnEnabled()) {
+// warn if the body could not be mapped
+if (body != null && LOG.isWarnEnabled()) {
 LOG.warn("Cannot determine specific JmsMessage type to use from 
body class."
 + " Will use generic JmsMessage."
-+ (body != null ? (" Body class: " + 
body.getClass().getCanonicalName()) : " Body is null")
++ " Body class: " + ObjectHelper.classCanonicalName(body)
 + ". If you want to send a POJO then your class might need 
to implement java.io.Serializable"
 + ", or you can force a specific type by setting the 
jmsMessageType option on the JMS endpoint.");
 }




svn commit: r930826 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/component/seda/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/processor/ag

2010-04-05 Thread davsclaus
Author: davsclaus
Date: Mon Apr  5 08:12:11 2010
New Revision: 930826

URL: http://svn.apache.org/viewvc?rev=930826&view=rev
Log:
CAMEL-2568: Polished code a bit. Added recover over SEDA test. Fixed CS.

Added:

camel/trunk/components/camel-hawtdb/src/test/java/org/apache/camel/component/hawtdb/HawtDBAggregateRecoverWithSedaTest.java
  - copied, changed from r930692, 
camel/trunk/components/camel-hawtdb/src/test/java/org/apache/camel/component/hawtdb/HawtDBAggregateRecoverTest.java
Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java

camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java

camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java

camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaDefaultUnboundedQueueSizeTest.java

camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ShutdownRouteGracefulWithTimerTest.java

camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java

camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java

camel/trunk/components/camel-hawtdb/src/test/java/org/apache/camel/component/hawtdb/HawtDBAggregateLoadAndRecoverTest.java

camel/trunk/components/camel-hawtdb/src/test/java/org/apache/camel/component/hawtdb/HawtDBAggregateRecoverTest.java

camel/trunk/components/camel-hawtdb/src/test/java/org/apache/camel/component/hawtdb/HawtDBAggregateRecoverWithRedeliveryPolicyTest.java

camel/trunk/components/camel-hawtdb/src/test/resources/org/apache/camel/component/hawtdb/HawtDBSpringAggregateRecoverWithRedeliveryPolicyTest.xml

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java?rev=930826&r1=930825&r2=930826&view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
 Mon Apr  5 08:12:11 2010
@@ -59,7 +59,7 @@ public class SedaComponent extends Defau
 protected Endpoint createEndpoint(String uri, String remaining, 
Map parameters) throws Exception {
 int consumers = getAndRemoveParameter(parameters, 
"concurrentConsumers", Integer.class, 1);
 boolean limitConcurrentConsumers = getAndRemoveParameter(parameters, 
"limitConcurrentConsumers", Boolean.class, true);
-if ((limitConcurrentConsumers) && (consumers >  
maxConcurrentConsumers)) {
+if (limitConcurrentConsumers && consumers >  maxConcurrentConsumers) {
 throw new IllegalArgumentException("The limitConcurrentConsumers 
flag in set to true. ConcurrentConsumers cannot be set at a value greater than "
 + maxConcurrentConsumers + " was " + consumers);
 }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=930826&r1=930825&r2=930826&view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
 Mon Apr  5 08:12:11 2010
@@ -523,7 +523,7 @@ public abstract class ProcessorDefinitio
  *
  * @param uri  the endpoint to send to
  * @return the builder
- * @see org.apache.camel.SendAsyncProcessor
+ * @see org.apache.camel.processor.SendAsyncProcessor
  */
 public ToDefinition toAsync(String uri) {
 ToDefinition answer = new ToDefinition(uri);
@@ -541,7 +541,7 @@ public abstract class ProcessorDefinitio
  * @param uri  the endpoint to send to
  * @param poolSize the core pool size
  * @return the builder
- * @see org.apache.camel.SendAsyncProcessor
+ * @see org.apache.camel.processor.SendAsyncProcessor
  */
 public ToDefinition toAsync(String uri, int poolSize) {
 ToDefinition answer = new ToDefinition(uri);
@@ -559,7 +559,7 @@ public abstract class ProcessorDefinitio
  *
  * @param endpoint  the endpoint to send to
  * @return the builder
- * @see org.apache.camel.SendAsyncProcessor
+ * @see org.apache.camel.processor.SendAsyncProcessor
  */
 public ToDefinition toAsync(Endpoint endpoint) {
 ToDefinition answer = new ToDefinition(endpoint);
@@ -577,7 +577,7 @@ public abstract class ProcessorDefinitio
  * @param endpoint  the endpoint to send to
  * @param poolSize the core pool size
  * @return the builder
- * @s