The fix for bug https://jira.springsource.org/browse/SPR-8081 has introduced a new one.
It's related to ehcache and RMI replication.
If you try to use RMICacheManagerPeerListener , spring instantiated cache manager created with EhCacheManagerFactoryBean, and spring instantiated caches created with EhCacheFactoryBean, it won't replicate caches anymore.
This issue affected us when we tried to migrate from spring 3.1.1 to spring 3.1.2 to solve the statistics enable problem.
After surfing on spring sources, I found that RMICacheManagerPeerListener tries to create the RMI port to communicate with other cache instances in
1- Ehcache manager initialization
At this point, caches has not been created... so RMICacheManagerPeerListener won't create any rmi listener port.
2- After a new cache has been added to cacheManager
The problem is that RMICacheManagerPeerListener creates RMI ports based on the existence of net.sf.ehcache.distribution.CacheReplicator event listeners for caches.
This initialization will be executed after "this.cacheManager.addCache(rawCache)" sentences, but It won't find any CacheReplicator because the listeners
has not been added to the notifications service yet. In the previous spring version, the event listeners were added after cache creation time and before addCache call.