The java client currently fails to do proper failover due to session attach failing. This affects the currently published rpms.
Created attachment 338758 [details] Patch to address the failover issue The java client failover issues was caused by a change in broker where it will not allow (since we don't support session resume) to use the same session name when attaching the session after failover. This patch will create a new session id, instead of reusing the same when it tries to attach the session.
Comment on attachment 338758 [details] Patch to address the failover issue Index: common/src/main/java/org/apache/qpid/transport/Session.java =================================================================== --- common/src/main/java/org/apache/qpid/transport/Session.java (revision 763327) +++ common/src/main/java/org/apache/qpid/transport/Session.java (working copy) @@ -41,6 +41,7 @@ import static org.apache.qpid.transport.util.Functions.*; import static org.apache.qpid.util.Serial.*; import static org.apache.qpid.util.Strings.*; +import java.util.UUID; /** * Session @@ -225,6 +226,7 @@ void attach() { initReceiver(); + name = new Binary(toUTF8(UUID.randomUUID().toString())); sessionAttach(name.getBytes()); // XXX: when the broker and client support full session // recovery we should use expiry as the requested timeout
Created attachment 338767 [details] Patch to be used in rpm I have reworked the patch so the import statements are not reorganized. The attach patch has been simplified to show only the intended changes
The issue has been fixed, validated by long term run on RHEL 5.3 i386 / x86_64 on packages: openais-0.80.3-22.el5_3.4 python-qpid-0.5.752581-1.el5 qpidc-0.5.752581-3.el5 qpidc-debuginfo-0.5.752581-3.el5 qpidc-devel-0.5.752581-3.el5 qpidc-perftest-0.5.752581-3.el5 qpidc-rdma-0.5.752581-3.el5 qpidc-ssl-0.5.752581-3.el5 qpidd-0.5.752581-3.el5 qpidd-acl-0.5.752581-3.el5 qpidd-cluster-0.5.752581-3.el5 qpidd-devel-0.5.752581-3.el5 qpidd-rdma-0.5.752581-3.el5 qpidd-ssl-0.5.752581-3.el5 qpidd-xml-0.5.752581-3.el5 qpid-java-client-0.5.751061-2.el5 qpid-java-common-0.5.751061-2.el5 rhm-0.5.3206-1.el5 rhm-docs-0.5.756148-1.el5 The test procedure consist of 'ant test -Dtest=FailoverTest -Dprofile=cpp.cluster' on packaged qpidd and compiled & patched java code from rev.751061. ->VERIFIED
The attached patch results in session resources not cleaned properly. The session 'name' was not designed to be mutable. If the name is changed during failover, then at connection close time only the current session is entry is removed and not the previous one. Since then a broker fix has been made and now there is no need to apply this fix anyways. I will be removing this patch from 0:0.5.751061-9 in the java package
This has been fixed another way; closing.