qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [5/5] qpid-jms git commit: fixup config for controlling producer settlement
Date Tue, 11 Nov 2014 16:35:08 GMT
fixup config for controlling producer settlement


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/63d56d28
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/63d56d28
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/63d56d28

Branch: refs/heads/master
Commit: 63d56d282c5310ebeb9c3c4ea8775fe86da8acb2
Parents: 109b402
Author: Robert Gemmell <robbie@apache.org>
Authored: Tue Nov 11 14:56:55 2014 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Tue Nov 11 16:29:48 2014 +0000

----------------------------------------------------------------------
 .../jms/provider/amqp/AmqpAnonymousProducerWrapper.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/63d56d28/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpAnonymousProducerWrapper.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpAnonymousProducerWrapper.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpAnonymousProducerWrapper.java
index 3c61f2f..cc63ffa 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpAnonymousProducerWrapper.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpAnonymousProducerWrapper.java
@@ -86,6 +86,11 @@ public class AmqpAnonymousProducerWrapper extends AmqpProducer {
         return delegate.getRemoteState();
     }
 
+    @Override
+    public void setPresettle(boolean presettle) {
+        delegate.setPresettle(presettle);
+    };
+
     private class AnonymousRelayRequest extends WrappedAsyncResult {
 
         public AnonymousRelayRequest(AsyncResult openResult) {
@@ -99,7 +104,11 @@ public class AmqpAnonymousProducerWrapper extends AmqpProducer {
         @Override
         public void onFailure(Throwable result) {
             LOG.debug("Attempt to open producer to anonymous relay failed, entering fallback
mode");
-            delegate = new AmqpAnonymousFallbackProducer(session, getJmsResource());
+
+            AmqpProducer newProducer = new AmqpAnonymousFallbackProducer(session, getJmsResource());
+            newProducer.setPresettle(delegate.isPresettle());
+            delegate = newProducer;
+
             delegate.open(getWrappedRequest());
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message