[jboss-dev-forums] [JBoss AS7 Development] - Re: DistributedCache replication
Adrian Brock
do-not-reply at jboss.com
Tue Sep 20 09:26:44 EDT 2011
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&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110920/c91713a0/attachment.html
More information about the jboss-dev-forums
mailing list