<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 18 May 2011, at 12:17, Emmanuel Bernard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On 18 mai 2011, at 12:23, Manik Surtani wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On 30 Apr 2011, at 20:14, Emmanuel Bernard wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Another behavior I'm seeing that is surprising me is:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tx.begin();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Map&lt;?,?&gt; map = AtomicMapLookup.getAtomicMap(cache, key);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">assert map.size() == 3;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">AtomicMapLookup.removeAtomicMap(cache, key);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">assert map.size() == 0;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tx.commit();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I can sort understand in a twisted way that removeAtomicMap clears the underlying map but that's for sure surprising and can lead to weird bugs for ATM users. Is that necessary?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is weird, from a usage perspective, agreed.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Realistically, any operations that happen on an atomic map handle after the atomic map has been removed should result in an exception. &nbsp;I can't think of any existing JDK exceptions being valid - perhaps InvalidAtomicMapException?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">@Emmanuel, WDYT?<br></blockquote><br>IllegalStateException works, I'd say<br></div></blockquote><div><br></div><div>Ok, ISE it is then.</div><div><br></div><div><a href="https://issues.jboss.org/browse/ISPN-1121">https://issues.jboss.org/browse/ISPN-1121</a></div><div><br></div><div><br></div></div><div>
<div><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div>Lead, Infinispan</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><br></div></div><br class="Apple-interchange-newline">
</div>
<br></body></html>