summaryrefslogtreecommitdiff
path: root/qpid/java/client/src/main
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-06-07 13:42:01 +0000
committerRafael H. Schloming <rhs@apache.org>2008-06-07 13:42:01 +0000
commit865436044bceebaae348747dedbc126e2b22eb5d (patch)
treeecadf31cb986ada58b907c5efbe6ea853784e88c /qpid/java/client/src/main
parentdcdd849a1fc5678d8b8b9799ec357627cba8e5ed (diff)
downloadqpid-python-865436044bceebaae348747dedbc126e2b22eb5d.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@664339 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src/main')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpidity/nclient/Client.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpidity/nclient/Client.java b/qpid/java/client/src/main/java/org/apache/qpidity/nclient/Client.java
index 9fb4c541a9..bc88160137 100644
--- a/qpid/java/client/src/main/java/org/apache/qpidity/nclient/Client.java
+++ b/qpid/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());