camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r581261 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java
Date Tue, 02 Oct 2007 14:31:04 GMT
Author: chirino
Date: Tue Oct  2 07:31:03 2007
New Revision: 581261

URL: http://svn.apache.org/viewvc?rev=581261&view=rev
Log:
Provide a better error message if process is called without the processor being started

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java?rev=581261&r1=581260&r2=581261&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThreadProcessor.java
Tue Oct  2 07:31:03 2007
@@ -75,6 +75,9 @@
     }
 
     public boolean process(final Exchange exchange, final AsyncCallback callback) {
+        if( shutdown.get() ) {
+            throw new IllegalStateException("ThreadProcessor is not running.");
+        }
         ProcessCall call = new ProcessCall(exchange, callback);
         executor.execute(call);
         return false;



Mime
View raw message