diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2013-10-24 12:49:13 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2013-10-24 12:49:13 +0000 |
| commit | 779a9279e52481bfa63acea6bf3fe7116257e83a (patch) | |
| tree | d2b63eb5eba856d29fdfb42a90bc72000e34ef05 /qpid/java/amqp-1-0-client | |
| parent | 1188148f10e2e814c58ca10e387cf1391b70ca35 (diff) | |
| download | qpid-python-779a9279e52481bfa63acea6bf3fe7116257e83a.tar.gz | |
QPID-5245 : Applied patch from David Ingham
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1535362 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/amqp-1-0-client')
2 files changed, 41 insertions, 12 deletions
diff --git a/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/ChannelsExhaustedException.java b/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/ChannelsExhaustedException.java new file mode 100644 index 0000000000..1f23d02e02 --- /dev/null +++ b/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/ChannelsExhaustedException.java @@ -0,0 +1,39 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.amqp_1_0.client;
+
+public class ChannelsExhaustedException extends ConnectionException
+{
+ protected ChannelsExhaustedException(final String message)
+ {
+ super(message);
+ }
+
+ public ChannelsExhaustedException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ ChannelsExhaustedException()
+ {
+
+ }
+}
diff --git a/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Session.java b/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Session.java index 21af6950d8..1c12907c49 100644 --- a/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Session.java +++ b/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Session.java @@ -51,13 +51,13 @@ public class Session private TransactionController _sessionLocalTC; private Connection _connection; - public Session(final Connection connection, String name) throws SessionCreationException + public Session(final Connection connection, String name) throws ChannelsExhaustedException { _connection = connection; _endpoint = connection.getEndpoint().createSession(name); if(_endpoint == null) { - throw new SessionCreationException("Cannot create session as all channels are in use"); + throw new ChannelsExhaustedException("Cannot create session as all channels are in use"); } _sectionEncoder = new SectionEncoderImpl(connection.getEndpoint().getDescribedTypeRegistry()); _sectionDecoder = new SectionDecoderImpl(connection.getEndpoint().getDescribedTypeRegistry()); @@ -389,14 +389,4 @@ public class Session { public void configureSource(final Source source); } - - private class SessionCreationException extends ConnectionException - { - - private SessionCreationException(final String message) - { - super(message); - } - - } } |
