diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-01-11 02:58:14 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-01-11 02:58:14 +0000 |
| commit | cc5e2c7fd0f55eabba8d0ec55a3ddec2d526c70b (patch) | |
| tree | 3b58f428a61a16e1aaaa57e0236ec9b6938cbfc4 /qpid/java/common/src/main | |
| parent | ac697e679759575cb9fdf00d87e1ba405456517c (diff) | |
| download | qpid-python-cc5e2c7fd0f55eabba8d0ec55a3ddec2d526c70b.tar.gz | |
QPID-2994
When the session is marked transactional, message transfers are not replayed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1057460 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/main')
| -rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java index eba46e9b1b..ea7eca302b 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java @@ -89,7 +89,7 @@ public class Session extends SessionInvoker private int channel; private SessionDelegate delegate; private SessionListener listener = new DefaultSessionListener(); - private long timeout = 60000; + private long timeout = 6000; private boolean autoSync = false; private boolean incomingInit; @@ -116,7 +116,8 @@ public class Session extends SessionInvoker private Semaphore credit = new Semaphore(0); private Thread resumer = null; - + private boolean transacted = false; + protected Session(Connection connection, Binary name, long expiry) { this(connection, new SessionDelegate(), name, expiry); @@ -645,7 +646,7 @@ public class Session extends SessionInvoker { sessionCommandPoint(0, 0); } - if ((!closing && m instanceof MessageTransfer) || m.hasCompletionListener()) + if ((!closing && !transacted && m instanceof MessageTransfer) || m.hasCompletionListener()) { commands[mod(next, commands.length)] = m; commandBytes += m.getBodySize(); @@ -992,4 +993,9 @@ public class Session extends SessionInvoker { return String.format("ssn:%s", name); } + + public void setTransacted(boolean b) { + this.transacted = b; + } + } |
