diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2009-12-09 23:58:25 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2009-12-09 23:58:25 +0000 |
| commit | 2d5606befc20b47c801d5141faa43159581940ce (patch) | |
| tree | 1606ded506cdd6a6bf479ba0aa61a766ae607584 /java/client/src | |
| parent | b6ba2c4cae275a24c7aba6c63f0e5d10debea3bf (diff) | |
| download | qpid-python-2d5606befc20b47c801d5141faa43159581940ce.tar.gz | |
QPID-2258 : AMQP0-9-1 Compliance fixes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@889022 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java | 8 | ||||
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java b/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java index 8857f1115a..c9212a54c1 100644 --- a/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java +++ b/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java @@ -68,6 +68,14 @@ public class ConnectionStartMethodHandler implements StateAwareMethodListener<Co ProtocolVersion pv = new ProtocolVersion((byte) body.getVersionMajor(), (byte) body.getVersionMinor()); + // 0-9-1 is indistinguishable from 0-9 using only major and minor ... if we established the connection as 0-9-1 + // and now get back major = 0 , minor = 9 then we can assume it means 0-9-1 + + if(pv.equals(ProtocolVersion.v0_9) && session.getProtocolVersion().equals(ProtocolVersion.v0_91)) + { + pv = ProtocolVersion.v0_91; + } + // For the purposes of interop, we can make the client accept the broker's version string. // If it does, it then internally records the version as being the latest one that it understands. // It needs to do this since frame lookup is done by version. diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java index 8910920017..2d59146b43 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java @@ -403,9 +403,7 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession _protocolVersion = pv; _methodRegistry = MethodRegistry.getMethodRegistry(pv); _methodDispatcher = ClientMethodDispatcherImpl.newMethodDispatcher(pv, this); - - // _registry = MainRegistry.getVersionSpecificRegistry(versionMajor, versionMinor); - } + } public byte getProtocolMinorVersion() { @@ -422,11 +420,6 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession return _protocolVersion; } -// public VersionSpecificRegistry getRegistry() -// { -// return _registry; -// } - public MethodRegistry getMethodRegistry() { return _methodRegistry; |
