use of org.glassfish.ha.common.HACookieInfo in project Payara by payara.
the class GlassFishKeyMapper method makeCookie.
public HACookieInfo makeCookie(String groupName, Object key, String oldReplicaCookie) {
String cookieStr = null;
if (key != null) {
// super.getReplicaChoices(groupName, key);
cookieStr = super.getMappedInstance(groupName, key);
}
HACookieInfo ha = new HACookieInfo(cookieStr, oldReplicaCookie);
return ha;
}
use of org.glassfish.ha.common.HACookieInfo in project Payara by payara.
the class ReplicationWebEventPersistentManager method getReplicaFromPredictor.
public String getReplicaFromPredictor(String sessionId, String oldJreplicaValue) {
if (isDisableJreplica()) {
return null;
}
String gmsClusterName = "";
HazelcastCore hazelcast = services.getService(HazelcastCore.class);
if (hazelcast.isEnabled()) {
gmsClusterName = hazelcast.getMemberGroup();
}
HACookieInfo cookieInfo = predictor.makeCookie(gmsClusterName, sessionId, oldJreplicaValue);
HACookieManager.setCurrrent(cookieInfo);
return cookieInfo.getNewReplicaCookie();
}
Aggregations