Hmm. From 2.1.0.GA onwards, I can overload ConfigurationFactory.createCache(String, boolean) with createCache(InputStream, boolean) and createCache(URL, boolean).
But for 2.0.0, you'd have to spin this by hand, unfortunately, doing something like the following:
1. Subclass org.jboss.cache.factories.XmlConfigurationParser and add a method to parse a URL.
2. In your method, call (protected) method XmlConfigurationParser.parseStream(InputStream is)
3. ... and get a hold of a Configuration object which you can then pass in to the ConfigurationFactory.
Thanks for the swift response, sanity returns. phew...
I've spent a good deal of time trying to figure out how I was going to achieve this as the docs quite clearly state that I can use an input stream but I just could not find the class or subclass that could do this.
Section 2.2 and 3.2 of
The bizare schemes I had in my head can now go and make way for the more elegant solution you have suggested... Thanks again!
Yeah, that's my bad. :( At one point earlier in the 2.0 dev process the method that takes InputStream was public, later got changed. I didn't notice that reference to it when I edited the docs.