summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQConnection.java13
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java1
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java2
-rw-r--r--java/module.xml1
-rw-r--r--java/test-profiles/Excludes5
-rw-r--r--java/test-profiles/java.testprofile5
6 files changed, 19 insertions, 8 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
index ef09d36ee5..125cb6cae3 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
@@ -516,6 +516,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
_protocolHandler = new AMQProtocolHandler(this);
+ _logger.info("Connecting with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());
+
// We are not currently connected
_connected = false;
@@ -552,6 +554,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
}
}
+ _logger.info("Connected with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());
+
if (_logger.isDebugEnabled())
{
_logger.debug("Are we connected:" + _connected);
@@ -619,13 +623,18 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
try
{
- Class c = Class.forName(String.format
+ String delegateClassName = String.format
("org.apache.qpid.client.AMQConnectionDelegate_%s_%s",
- pe.getMajorVersion(), pe.getMinorVersion()));
+ pe.getMajorVersion(), pe.getMinorVersion());
+ _logger.info("Looking up delegate '" + delegateClassName + "' Based on PE:" + pe);
+ Class c = Class.forName(delegateClassName);
Class partypes[] = new Class[1];
partypes[0] = AMQConnection.class;
_delegate = (AMQConnectionDelegate) c.getConstructor(partypes).newInstance(this);
_sessions.setMaxChannelID(_delegate.getMaxChannelID());
+ //Update our session to use this new protocol version
+ _protocolHandler.getProtocolSession().setProtocolVersion(_delegate.getProtocolVersion());
+
}
catch (ClassNotFoundException e)
{
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index a567c2c215..f8012d044a 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -470,6 +470,7 @@ public class AMQProtocolHandler implements ProtocolEngine
// connection.
ProtocolInitiation protocolInit = (ProtocolInitiation) message;
_suggestedProtocolVersion = protocolInit.checkVersion();
+ _logger.info("Broker suggested using protocol version:" + _suggestedProtocolVersion);
// get round a bug in old versions of qpid whereby the connection is not closed
_stateManager.changeState(AMQState.CONNECTION_CLOSED);
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 2d59146b43..318e9fea4c 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
@@ -104,6 +104,7 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession
{
_protocolHandler = protocolHandler;
_protocolVersion = connection.getProtocolVersion();
+ _logger.info("Using ProtocolVersion for Session:" + _protocolVersion);
_methodDispatcher = ClientMethodDispatcherImpl.newMethodDispatcher(ProtocolVersion.getLatestSupportedVersion(),
this);
_connection = connection;
@@ -400,6 +401,7 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession
public void setProtocolVersion(final ProtocolVersion pv)
{
+ _logger.info("Setting ProtocolVersion to :" + pv);
_protocolVersion = pv;
_methodRegistry = MethodRegistry.getMethodRegistry(pv);
_methodDispatcher = ClientMethodDispatcherImpl.newMethodDispatcher(pv, this);
diff --git a/java/module.xml b/java/module.xml
index 568359f7ea..820f7ce036 100644
--- a/java/module.xml
+++ b/java/module.xml
@@ -278,6 +278,7 @@
<sysproperty key="broker.stopped" value="${broker.stopped}" />
<sysproperty key="broker.config" value="${broker.config}" />
<sysproperty key="test.output" value="${module.results}"/>
+ <sysproperty key="qpid.amqp.version" value="${qpid.amqp.version}"/>
<syspropertyset>
<propertyref prefix="test"/>
diff --git a/java/test-profiles/Excludes b/java/test-profiles/Excludes
index b2f438e487..ccb907e597 100644
--- a/java/test-profiles/Excludes
+++ b/java/test-profiles/Excludes
@@ -29,8 +29,3 @@ org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverTest#testClientAck
org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverOnMessageTest#*
org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverTest#*
-// The following tests exibit random failures and are temporarily excluded.
-// QPID-2224 Random Test failures - The test needs to be fixed.
-org.apache.qpid.transport.network.mina.MINANetworkDriverTest#*
-// QPID-2225 Random Test failures against the in-vm broker.
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecover#*
diff --git a/java/test-profiles/java.testprofile b/java/test-profiles/java.testprofile
index a301fb1b65..ce73d5b5de 100644
--- a/java/test-profiles/java.testprofile
+++ b/java/test-profiles/java.testprofile
@@ -3,5 +3,8 @@ broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT --exclude-0-10 @
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work/derbyDB
broker.ready=BRK-1004
broker.stopped=Exception
-qpid.amqp.version=0-9
+#
+# Do not enable. Allow client to attempt 0-10 and negotiate downwards
+#
+#qpid.amqp.version=0-91
profile.excludes=JavaTransientExcludes JavaStandaloneExcludes 08StandaloneExcludes