infinispan/infinispan — pull request #1476 by galderz (2012-11-21 17:44:04+00:00)
Title: ISPN-1884 & ISPN-2351

Double present from yours truly, just in time Xmas:

https://issues.jboss.org/browse/ISPN-1884
https://issues.jboss.org/browse/ISPN-2351

Separate commits, but fixed these two one after the ones since they require code in the same areas. The original fix for 1884 was further improved to accomodate 2351, bear that in mind when reviewing the code.