Repository: incubator-stratos Updated Branches: refs/heads/master 7f4b680cb -> 6338416d3
fixing the can not login via lb issue Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/3b10b49c Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/3b10b49c Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/3b10b49c Branch: refs/heads/master Commit: 3b10b49cdfa45d07ed35c6eec3141cac1c18f2c3 Parents: a3c0948 Author: Udara Liyanage <[email protected]> Authored: Mon Mar 10 09:55:54 2014 -0400 Committer: Udara Liyanage <[email protected]> Committed: Mon Mar 10 09:55:54 2014 -0400 ---------------------------------------------------------------------- .../endpoint/TenantAwareLoadBalanceEndpoint.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/3b10b49c/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/endpoint/TenantAwareLoadBalanceEndpoint.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/endpoint/TenantAwareLoadBalanceEndpoint.java b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/endpoint/TenantAwareLoadBalanceEndpoint.java index b88848e..048b26c 100644 --- a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/endpoint/TenantAwareLoadBalanceEndpoint.java +++ b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/endpoint/TenantAwareLoadBalanceEndpoint.java @@ -518,14 +518,18 @@ public class TenantAwareLoadBalanceEndpoint extends org.apache.synapse.endpoints synCtx.getEnvelope().build(); } - if (isSessionAffinityBasedLB() && newSession) { - prepareEndPointSequence(synCtx, endpoint); - synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER, currentMember); + if (isSessionAffinityBasedLB()) { + synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_DEFAULT_SESSION_TIMEOUT, getSessionTimeout()); synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_DISPATCHER, dispatcher); - // we should also indicate that this is the first message in the session. so that - // onFault(...) method can resend only the failed attempts for the first message. - synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_FIRST_MESSAGE_IN_SESSION, - Boolean.TRUE); + + if (newSession) { + prepareEndPointSequence(synCtx, endpoint); + synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER, currentMember); + // we should also indicate that this is the first message in the session. so that + // onFault(...) method can resend only the failed attempts for the first message. + synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_FIRST_MESSAGE_IN_SESSION, + Boolean.TRUE); + } } Map<String, String> memberHosts;
