diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-06-07 13:42:01 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-06-07 13:42:01 +0000 |
| commit | b77030fd7d3ad635d725b9c0a82f34253fb04592 (patch) | |
| tree | a3c0c844a6a2319c371daf1e236ec14d1d3f1ff3 /java/client/src/main | |
| parent | 26777a6a0f2ee1e813356f15c6ffe951facb72f7 (diff) | |
| download | qpid-python-b77030fd7d3ad635d725b9c0a82f34253fb04592.tar.gz | |
QPID-1126: reuse channel numbers for sessions that have closed, and honor the negotiated channel-max; also removed unnecessary catches that were swallowing stack traces from several tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@664339 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src/main')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpidity/nclient/Client.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/java/client/src/main/java/org/apache/qpidity/nclient/Client.java b/java/client/src/main/java/org/apache/qpidity/nclient/Client.java index 9fb4c541a9..bc88160137 100644 --- a/java/client/src/main/java/org/apache/qpidity/nclient/Client.java +++ b/java/client/src/main/java/org/apache/qpidity/nclient/Client.java @@ -22,7 +22,6 @@ package org.apache.qpidity.nclient; import java.util.List; import java.util.UUID; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; @@ -55,7 +54,6 @@ import org.slf4j.LoggerFactory; public class Client implements org.apache.qpidity.nclient.Connection { - private AtomicInteger _channelNo = new AtomicInteger(); private Connection _conn; private ClosedListener _closedListner; private final Lock _lock = new ReentrantLock(); @@ -286,7 +284,7 @@ public class Client implements org.apache.qpidity.nclient.Connection public Session createSession(long expiryInSeconds) { - Channel ch = _conn.getChannel(_channelNo.incrementAndGet()); + Channel ch = _conn.getChannel(); ClientSession ssn = new ClientSession(UUID.randomUUID().toString().getBytes()); ssn.attach(ch); ssn.sessionAttach(ssn.getName()); |
