Adrian Brock [
http://community.jboss.org/people/warjort] created the discussion
"Re: DistributedCache replication"
To view the discussion, visit:
http://community.jboss.org/message/627490#627490
--------------------------------------------------------------
Incidently, I think the following code is wrong in the infinispan implementation of
DistributedCacheManager
| | @Override |
| | public void storeSessionData(final T sessionData) { |
| | final K key = this.keyFactory.createKey(sessionData.getRealId()); |
| | trace("storeSessionData(%s)", key.getSessionId()); |
| | Operation<Void> operation = new Operation<Void>() { |
| | @Override |
| | public Void invoke(Cache<K, Map<Object, Object>> cache) { |
| | Map<Object, Object> map = cache.putIfAbsent(key, null); |
| | SessionMapEntry.VERSION.put(map,
Integer.valueOf(sessionData.getVersion())); |
| | SessionMapEntry.METADATA.put(map, sessionData.getMetadata()); |
| | SessionMapEntry.TIMESTAMP.put(map, sessionData.getTimestamp()); |
| | try { |
| | DistributedCacheManager.this.attributeStorage.store(map,
sessionData); |
| | } catch (IOException e) { |
| | throw getRuntimeException("Failed to store session attributes
for session: " + mask(key.getSessionId()), e); |
| | } |
| | return null; |
| | } |
| | }; |
| | this.batch(operation); |
| | } |
In that it will overwrite thinks like the metadata with null if it hasn't changed.
see isSessionMetaDataDirty() referenced in the code above.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/627490#627490]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]