After some initial tinkering, everything worked fine when I had a single web service deployed, but when I tried to deploy multiple services that used Coherence, the following exception would get thrown during service startup...
Ugh! Maybe I needed to look at my class loader configuration in better detail, but I felt like there should be a very simple solution for this.
This article was a great help, but it wasn't the final solution. I didn't want to specify the entire Coherence cache configuration programatically but I did want to control which configuration file was loaded by Coherence using code in my web service's PostConstruct annotated method.
Discussing the issue with a Coherence engineer, this is something I ended up coming up with...
The key was the ExtensibleConfigurableCacheFactory.DependenciesHelper class. The file, my-coherence-cache-config.xml, was bundled with my web service (WEB-INF/classes) and contained all the Coherence cache configuration that was needed for a specific web service. Now different web services could load their own configurations! The main down-side was that I needed to keep track of the factory class.
In the end I didn't use this approach and opted for an even simpler solution, which I'll discuss in another article.