camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1359231 - in /camel/branches/camel-2.10.x: ./ camel-core/src/main/java/org/apache/camel/component/seda/ camel-core/src/test/java/org/apache/camel/component/seda/ components/camel-http/
Date Mon, 09 Jul 2012 15:46:41 GMT
Author: bvahdat
Date: Mon Jul  9 15:46:40 2012
New Revision: 1359231

URL: http://svn.apache.org/viewvc?rev=1359231&view=rev
Log:
Merged revisions 1359226 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1359226 | bvahdat | 2012-07-09 17:42:40 +0200 (Mo, 09 Jul 2012) | 1 line
  
  CAMEL-5432: SedaProducer should send to the right BlockingQueue being attached on the SedaEndpoint
so that the sent messages don't get lost.
........

Added:
    camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java
      - copied unchanged from r1359226, camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java
Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
    camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaProducer.java
    camel/branches/camel-2.10.x/components/camel-http/   (props changed)

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1359226

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul  9 15:46:40 2012
@@ -1 +1 @@
-/camel/trunk:1-1358964,1359013,1359197
+/camel/trunk:1-1358964,1359013,1359197,1359226

Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java?rev=1359231&r1=1359230&r2=1359231&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
(original)
+++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
Mon Jul  9 15:46:40 2012
@@ -85,7 +85,7 @@ public class SedaEndpoint extends Defaul
     }
 
     public Producer createProducer() throws Exception {
-        return new SedaProducer(this, getQueue(), getWaitForTaskToComplete(), getTimeout(),
isBlockWhenFull());
+        return new SedaProducer(this, getWaitForTaskToComplete(), getTimeout(), isBlockWhenFull());
     }
 
     public Consumer createConsumer(Processor processor) throws Exception {

Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaProducer.java?rev=1359231&r1=1359230&r2=1359231&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaProducer.java
(original)
+++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaProducer.java
Mon Jul  9 15:46:40 2012
@@ -32,6 +32,10 @@ import org.apache.camel.util.ExchangeHel
  * @version 
  */
 public class SedaProducer extends DefaultAsyncProducer {
+    /**
+     * @deprecated Better make use of the {@link SedaEndpoint#getQueue()} API which delivers
the accurate reference to the queue currently being used.
+     */
+    @Deprecated
     protected final BlockingQueue<Exchange> queue;
     private final SedaEndpoint endpoint;
     private final WaitForTaskToComplete waitForTaskToComplete;
@@ -39,17 +43,24 @@ public class SedaProducer extends Defaul
     private final boolean blockWhenFull;
 
     /**
-     * @deprecated use the other constructor
+     * @deprecated Use {@link #SedaProducer(SedaEndpoint, WaitForTaskToComplete, long, boolean)
the other constructor}.
      */
     @Deprecated
     public SedaProducer(SedaEndpoint endpoint, BlockingQueue<Exchange> queue, WaitForTaskToComplete
waitForTaskToComplete, long timeout) {
-        this(endpoint, queue, waitForTaskToComplete, timeout, false);
+        this(endpoint, waitForTaskToComplete, timeout, false);
     }
-    
-    public SedaProducer(SedaEndpoint endpoint, BlockingQueue<Exchange> queue, WaitForTaskToComplete
waitForTaskToComplete,
-                        long timeout, boolean blockWhenFull) {
+
+    /**
+     * @deprecated Use {@link #SedaProducer(SedaEndpoint, WaitForTaskToComplete, long, boolean)
the other constructor}.
+     */
+    @Deprecated
+    public SedaProducer(SedaEndpoint endpoint, BlockingQueue<Exchange> queue, WaitForTaskToComplete
waitForTaskToComplete, long timeout, boolean blockWhenFull) {
+        this(endpoint, waitForTaskToComplete, timeout, blockWhenFull);
+    }
+
+    public SedaProducer(SedaEndpoint endpoint, WaitForTaskToComplete waitForTaskToComplete,
long timeout, boolean blockWhenFull) {
         super(endpoint);
-        this.queue = queue;
+        this.queue = endpoint.getQueue();
         this.endpoint = endpoint;
         this.waitForTaskToComplete = waitForTaskToComplete;
         this.timeout = timeout;
@@ -125,7 +136,7 @@ public class SedaProducer extends Defaul
                 if (!done) {
                     exchange.setException(new ExchangeTimedOutException(exchange, timeout));
                     // remove timed out Exchange from queue
-                    queue.remove(copy);
+                    endpoint.getQueue().remove(copy);
                     // count down to indicate timeout
                     latch.countDown();
                 }
@@ -183,6 +194,7 @@ public class SedaProducer extends Defaul
      * @param exchange the exchange to add to the queue
      */
     protected void addToQueue(Exchange exchange) {
+        BlockingQueue<Exchange> queue = endpoint.getQueue();
         if (blockWhenFull) {
             try {
                 queue.put(exchange);

Propchange: camel/branches/camel-2.10.x/components/camel-http/
------------------------------------------------------------------------------
  Merged /camel/trunk/components/camel-http:r1359226



Mime
View raw message