[infinispan-dev] Calling DefaultCacheManager.start() does not start DefaultCacheManager

Olaf Bergner olaf.bergner at gmx.de
Tue Mar 22 13:17:27 EDT 2011


One minor glitch I stumbled upon while implementing Spring Infinispan:

         final DefaultCacheManager cm = new DefaultCacheManager(false);
         cm.start();
         assertEquals(ComponentStatus.RUNNING, cm.getStatus());

fails with

        java.lang.AssertionError: expected:<RUNNING> but was:<INSTANTIATED>

since you need to call getCache() or getCache(name) before 
DefaultCacheManager is actually started.

Obviously not a big deal, but it arguably doesn't follow the principle 
of least surprise. Is it worth doing something about it?

Cheers,
Olaf


More information about the infinispan-dev mailing list