pull/2179/head
Zhelyazko Chobantonov 6 years ago
parent 77055134c2
commit 22c1332e29

@ -279,13 +279,13 @@ public class RedissonSessionManager extends ManagerBase implements Lifecycle {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.add(((Context) getContainer()).getName());
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (readMode == ReadMode.MEMORY || broadcastSessionEvents) {
RTopic updatesTopic = getTopic();
@ -381,18 +381,18 @@ public class RedissonSessionManager extends ManagerBase implements Lifecycle {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.remove(((Context) getContainer()).getName());
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
}
if (messageListener != null) {
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
}
codecToUse = null;

@ -259,13 +259,13 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.add(((Context) getContainer()).getName());
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (readMode == ReadMode.MEMORY || broadcastSessionEvents) {
RTopic updatesTopic = getTopic();
@ -366,18 +366,18 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.remove(((Context) getContainer()).getName());
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
}
if (messageListener != null) {
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
}
codecToUse = null;

@ -257,13 +257,13 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.add(getContext().getName());
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (readMode == ReadMode.MEMORY || broadcastSessionEvents) {
RTopic updatesTopic = getTopic();
@ -364,18 +364,18 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.remove(getContext().getName());
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
}
if (messageListener != null) {
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
}
codecToUse = null;

@ -257,13 +257,13 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.add(getContext().getName());
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
if (updateValve == null) {
updateValve = new UpdateValve();
pipeline.addValve(updateValve);
}
}
}
if (readMode == ReadMode.MEMORY || broadcastSessionEvents) {
RTopic updatesTopic = getTopic();
@ -364,18 +364,18 @@ public class RedissonSessionManager extends ManagerBase {
Pipeline pipeline = getEngine().getPipeline();
synchronized (pipeline) {
contextInUse.remove(getContext().getName());
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
//remove valves when all of the RedissonSessionManagers (web apps) are not in use anymore
if (contextInUse.size() == 0) {
if (updateValve != null) {
pipeline.removeValve(updateValve);
updateValve = null;
}
}
}
if (messageListener != null) {
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
RTopic updatesTopic = getTopic();
updatesTopic.removeListener(messageListener);
}
codecToUse = null;

Loading…
Cancel
Save