camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aka...@apache.org
Subject svn commit: r930358 - /camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
Date Fri, 02 Apr 2010 19:40:50 GMT
Author: akarpe
Date: Fri Apr  2 19:40:50 2010
New Revision: 930358

URL: http://svn.apache.org/viewvc?rev=930358&view=rev
Log:
CAMEL-2526 - Changed the behavior of the fix to thrown an exception instead of informing/warning
the user

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

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=930358&r1=930357&r2=930358&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
Fri Apr  2 19:40:50 2010
@@ -63,12 +63,8 @@ public class SedaComponent extends Defau
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         int consumers = getAndRemoveParameter(parameters, "concurrentConsumers", Integer.class,
1);
         boolean limitConcurrentConsumers = getAndRemoveParameter(parameters, "limitConcurrentConsumers",
Boolean.class, true);
-        if (limitConcurrentConsumers) {
-            consumers = (consumers < maxConcurrentConsumers) ? consumers : maxConcurrentConsumers;
-            if (consumers == maxConcurrentConsumers) {
-                LOG.info("The limitConcurrentConsumers flag in set to true. Concurrent Consumers
cannot be set at a value greater than  " + maxConcurrentConsumers);
-                LOG.info("Concurrent Consumers set to " + maxConcurrentConsumers);
-            }
+        if ((limitConcurrentConsumers) && (consumers >  maxConcurrentConsumers))
{
+            throw new IllegalArgumentException("The limitConcurrentConsumers flag in set
to true. Concurrent Consumers cannot be set at a value greater than " + maxConcurrentConsumers);
         }
         SedaEndpoint answer = new SedaEndpoint(uri, this, createQueue(uri, parameters), consumers);
         answer.configureProperties(parameters);



Mime
View raw message