Hello,
Can you give us your console logs?
For example, it's possible that your specific declaration (case B) have a syntax problem, EHCache ignore your ehcache.xml file and use ehcache-failsafe.xml (default configuration for ehcache).
I don't know how you're called your specific cache, but the cache name is different of the class name...
Can you give us more details on your configuration?
Test without your ehcache.xml file to see if you are in the same case of the case B.