diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeMessage.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeMessage.java index 1a3f20a41..677f0b54a 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeMessage.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeMessage.java @@ -26,15 +26,26 @@ public class AttributeMessage implements Serializable { private String sessionId; + private String nodeId; + public AttributeMessage() { } public AttributeMessage(String sessionId) { this.sessionId = sessionId; } - + + public AttributeMessage(String nodeId, String sessionId) { + this.nodeId = nodeId; + this.sessionId = sessionId; + } + public String getSessionId() { return sessionId; } + + public String getNodeId() { + return nodeId; + } } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java index 03fac65b3..f98577cc1 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -33,6 +26,11 @@ public class AttributeRemoveMessage extends AttributeMessage { this.name = name; } + public AttributeRemoveMessage(String nodeId, String sessionId, String name) { + super(nodeId, sessionId); + this.name = name; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java index ac8a43af9..83233a9ef 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -34,6 +27,12 @@ public class AttributeUpdateMessage extends AttributeMessage { this.value = value; } + public AttributeUpdateMessage(String nodeId, String sessionId, String name, Object value) { + super(nodeId, sessionId); + this.name = name; + this.value = value; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesClearMessage.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesClearMessage.java index 79195e0dc..c8ccc371e 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesClearMessage.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesClearMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -29,4 +22,8 @@ public class AttributesClearMessage extends AttributeMessage { super(sessionId); } + public AttributesClearMessage(String nodeId, String sessionId) { + super(nodeId, sessionId); + } + } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java index 462ee0622..9a9765ceb 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; import java.util.Map; @@ -33,7 +26,12 @@ public class AttributesPutAllMessage extends AttributeMessage { super(sessionId); this.attrs = attrs; } - + + public AttributesPutAllMessage(String nodeId, String sessionId, Map attrs) { + super(nodeId, sessionId); + this.attrs = attrs; + } + public Map getAttrs() { return attrs; } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSession.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSession.java index 05772af11..62f9a3b4a 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSession.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSession.java @@ -90,7 +90,7 @@ public class RedissonSession extends StandardSession { public void delete() { map.delete(); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributesClearMessage(getId())); + topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; } @@ -134,7 +134,7 @@ public class RedissonSession extends StandardSession { for (Entry entry : newMap.entrySet()) { map.put(entry.getKey(), entry.getValue()); } - return new AttributesPutAllMessage(getId(), map); + return new AttributesPutAllMessage(redissonManager.getNodeId(), getId(), map); } @Override @@ -152,7 +152,7 @@ public class RedissonSession extends StandardSession { private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeUpdateMessage(getId(), name, value)); + topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } } @@ -212,7 +212,7 @@ public class RedissonSession extends StandardSession { if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeRemoveMessage(getId(), name)); + topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } } diff --git a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 963dd6f33..5458abcf7 100644 --- a/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-6/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.UUID; import javax.servlet.http.HttpSession; @@ -61,6 +62,10 @@ public class RedissonSessionManager extends ManagerBase implements Lifecycle { private UpdateMode updateMode = UpdateMode.DEFAULT; private String keyPrefix = ""; + private final String nodeId = UUID.randomUUID().toString(); + + public String getNodeId() { return nodeId; } + public String getUpdateMode() { return updateMode.toString(); } @@ -225,7 +230,7 @@ public class RedissonSessionManager extends ManagerBase implements Lifecycle { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); - if (session != null) { + if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeMessage.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeMessage.java index 1a3f20a41..677f0b54a 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeMessage.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeMessage.java @@ -26,15 +26,26 @@ public class AttributeMessage implements Serializable { private String sessionId; + private String nodeId; + public AttributeMessage() { } public AttributeMessage(String sessionId) { this.sessionId = sessionId; } - + + public AttributeMessage(String nodeId, String sessionId) { + this.nodeId = nodeId; + this.sessionId = sessionId; + } + public String getSessionId() { return sessionId; } + + public String getNodeId() { + return nodeId; + } } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java index 03fac65b3..f98577cc1 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -33,6 +26,11 @@ public class AttributeRemoveMessage extends AttributeMessage { this.name = name; } + public AttributeRemoveMessage(String nodeId, String sessionId, String name) { + super(nodeId, sessionId); + this.name = name; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java index ac8a43af9..83233a9ef 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -34,6 +27,12 @@ public class AttributeUpdateMessage extends AttributeMessage { this.value = value; } + public AttributeUpdateMessage(String nodeId, String sessionId, String name, Object value) { + super(nodeId, sessionId); + this.name = name; + this.value = value; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesClearMessage.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesClearMessage.java index 79195e0dc..c8ccc371e 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesClearMessage.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesClearMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -29,4 +22,8 @@ public class AttributesClearMessage extends AttributeMessage { super(sessionId); } + public AttributesClearMessage(String nodeId, String sessionId) { + super(nodeId, sessionId); + } + } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java index 462ee0622..9a9765ceb 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; import java.util.Map; @@ -33,7 +26,12 @@ public class AttributesPutAllMessage extends AttributeMessage { super(sessionId); this.attrs = attrs; } - + + public AttributesPutAllMessage(String nodeId, String sessionId, Map attrs) { + super(nodeId, sessionId); + this.attrs = attrs; + } + public Map getAttrs() { return attrs; } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSession.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSession.java index 05772af11..62f9a3b4a 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSession.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSession.java @@ -90,7 +90,7 @@ public class RedissonSession extends StandardSession { public void delete() { map.delete(); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributesClearMessage(getId())); + topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; } @@ -134,7 +134,7 @@ public class RedissonSession extends StandardSession { for (Entry entry : newMap.entrySet()) { map.put(entry.getKey(), entry.getValue()); } - return new AttributesPutAllMessage(getId(), map); + return new AttributesPutAllMessage(redissonManager.getNodeId(), getId(), map); } @Override @@ -152,7 +152,7 @@ public class RedissonSession extends StandardSession { private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeUpdateMessage(getId(), name, value)); + topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } } @@ -212,7 +212,7 @@ public class RedissonSession extends StandardSession { if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeRemoveMessage(getId(), name)); + topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 710696e14..94f33ebef 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.UUID; import javax.servlet.http.HttpSession; @@ -59,6 +60,10 @@ public class RedissonSessionManager extends ManagerBase { private String keyPrefix = ""; + private final String nodeId = UUID.randomUUID().toString(); + + public String getNodeId() { return nodeId; } + public String getUpdateMode() { return updateMode.toString(); } @@ -205,7 +210,7 @@ public class RedissonSessionManager extends ManagerBase { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); - if (session != null) { + if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeMessage.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeMessage.java index 1a3f20a41..677f0b54a 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeMessage.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeMessage.java @@ -26,15 +26,26 @@ public class AttributeMessage implements Serializable { private String sessionId; + private String nodeId; + public AttributeMessage() { } public AttributeMessage(String sessionId) { this.sessionId = sessionId; } - + + public AttributeMessage(String nodeId, String sessionId) { + this.nodeId = nodeId; + this.sessionId = sessionId; + } + public String getSessionId() { return sessionId; } + + public String getNodeId() { + return nodeId; + } } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java index 03fac65b3..f98577cc1 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -33,6 +26,11 @@ public class AttributeRemoveMessage extends AttributeMessage { this.name = name; } + public AttributeRemoveMessage(String nodeId, String sessionId, String name) { + super(nodeId, sessionId); + this.name = name; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java index ac8a43af9..83233a9ef 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -34,6 +27,12 @@ public class AttributeUpdateMessage extends AttributeMessage { this.value = value; } + public AttributeUpdateMessage(String nodeId, String sessionId, String name, Object value) { + super(nodeId, sessionId); + this.name = name; + this.value = value; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesClearMessage.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesClearMessage.java index 79195e0dc..c8ccc371e 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesClearMessage.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesClearMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -29,4 +22,8 @@ public class AttributesClearMessage extends AttributeMessage { super(sessionId); } + public AttributesClearMessage(String nodeId, String sessionId) { + super(nodeId, sessionId); + } + } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java index 462ee0622..9a9765ceb 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; import java.util.Map; @@ -33,7 +26,12 @@ public class AttributesPutAllMessage extends AttributeMessage { super(sessionId); this.attrs = attrs; } - + + public AttributesPutAllMessage(String nodeId, String sessionId, Map attrs) { + super(nodeId, sessionId); + this.attrs = attrs; + } + public Map getAttrs() { return attrs; } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSession.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSession.java index c1ff54eda..1ca9afcaf 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSession.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSession.java @@ -90,7 +90,7 @@ public class RedissonSession extends StandardSession { public void delete() { map.delete(); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributesClearMessage(getId())); + topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; } @@ -134,7 +134,7 @@ public class RedissonSession extends StandardSession { for (Entry entry : newMap.entrySet()) { map.put(entry.getKey(), entry.getValue()); } - return new AttributesPutAllMessage(getId(), map); + return new AttributesPutAllMessage(redissonManager.getNodeId(), getId(), map); } @Override @@ -152,7 +152,7 @@ public class RedissonSession extends StandardSession { private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeUpdateMessage(getId(), name, value)); + topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } } @@ -212,7 +212,7 @@ public class RedissonSession extends StandardSession { if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeRemoveMessage(getId(), name)); + topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 4d1ae4c9b..a4a5b419d 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.UUID; import javax.servlet.http.HttpSession; @@ -58,6 +59,10 @@ public class RedissonSessionManager extends ManagerBase { private String keyPrefix = ""; + private final String nodeId = UUID.randomUUID().toString(); + + public String getNodeId() { return nodeId; } + public String getUpdateMode() { return updateMode.toString(); } @@ -204,7 +209,7 @@ public class RedissonSessionManager extends ManagerBase { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); - if (session != null) { + if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeMessage.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeMessage.java index 1a3f20a41..677f0b54a 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeMessage.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeMessage.java @@ -26,15 +26,26 @@ public class AttributeMessage implements Serializable { private String sessionId; + private String nodeId; + public AttributeMessage() { } public AttributeMessage(String sessionId) { this.sessionId = sessionId; } - + + public AttributeMessage(String nodeId, String sessionId) { + this.nodeId = nodeId; + this.sessionId = sessionId; + } + public String getSessionId() { return sessionId; } + + public String getNodeId() { + return nodeId; + } } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java index 03fac65b3..f98577cc1 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeRemoveMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -33,6 +26,11 @@ public class AttributeRemoveMessage extends AttributeMessage { this.name = name; } + public AttributeRemoveMessage(String nodeId, String sessionId, String name) { + super(nodeId, sessionId); + this.name = name; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java index ac8a43af9..83233a9ef 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributeUpdateMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -34,6 +27,12 @@ public class AttributeUpdateMessage extends AttributeMessage { this.value = value; } + public AttributeUpdateMessage(String nodeId, String sessionId, String name, Object value) { + super(nodeId, sessionId); + this.name = name; + this.value = value; + } + public String getName() { return name; } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesClearMessage.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesClearMessage.java index 79195e0dc..c8ccc371e 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesClearMessage.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesClearMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; /** @@ -29,4 +22,8 @@ public class AttributesClearMessage extends AttributeMessage { super(sessionId); } + public AttributesClearMessage(String nodeId, String sessionId) { + super(nodeId, sessionId); + } + } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java index 462ee0622..9a9765ceb 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/AttributesPutAllMessage.java @@ -1,18 +1,11 @@ -/** - * Copyright 2018 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright (c) 2018. Engie-Electrabel. All rights reserved. +// +// Engie-Electrabel n.v./s.a., Simon Bolivarlaan 34 Boulevard Simón Bolivar, BTW BE 0403.107.701 - 1000 Brussel/Bruxelles, Belgium. +// +// Proprietary Notice: +// This software is the confidential and proprietary information of Engie-Electrabel s.a./n.v. and/or its licensors. +// You shall not disclose this Confidential Information to any third parties and any use thereof shall be subject to the terms and conditions of use, as agreed upon with Engie-Electrabel in writing. +// package org.redisson.tomcat; import java.util.Map; @@ -33,7 +26,12 @@ public class AttributesPutAllMessage extends AttributeMessage { super(sessionId); this.attrs = attrs; } - + + public AttributesPutAllMessage(String nodeId, String sessionId, Map attrs) { + super(nodeId, sessionId); + this.attrs = attrs; + } + public Map getAttrs() { return attrs; } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSession.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSession.java index c1ff54eda..1ca9afcaf 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSession.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSession.java @@ -90,7 +90,7 @@ public class RedissonSession extends StandardSession { public void delete() { map.delete(); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributesClearMessage(getId())); + topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; } @@ -134,7 +134,7 @@ public class RedissonSession extends StandardSession { for (Entry entry : newMap.entrySet()) { map.put(entry.getKey(), entry.getValue()); } - return new AttributesPutAllMessage(getId(), map); + return new AttributesPutAllMessage(redissonManager.getNodeId(), getId(), map); } @Override @@ -152,7 +152,7 @@ public class RedissonSession extends StandardSession { private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeUpdateMessage(getId(), name, value)); + topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } } @@ -212,7 +212,7 @@ public class RedissonSession extends StandardSession { if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { - topic.publish(new AttributeRemoveMessage(getId(), name)); + topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 4d1ae4c9b..a4a5b419d 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.UUID; import javax.servlet.http.HttpSession; @@ -58,6 +59,10 @@ public class RedissonSessionManager extends ManagerBase { private String keyPrefix = ""; + private final String nodeId = UUID.randomUUID().toString(); + + public String getNodeId() { return nodeId; } + public String getUpdateMode() { return updateMode.toString(); } @@ -204,7 +209,7 @@ public class RedissonSessionManager extends ManagerBase { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); - if (session != null) { + if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); }