-
1. Re: Migrating to 2.0.0 using PropertyConfigurator
manik Oct 31, 2007 12:17 PM (in response to shelly2k)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. -
2. Re: Migrating to 2.0.0 using PropertyConfigurator
shelly2k Oct 31, 2007 12:47 PM (in response to shelly2k)Manik
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
http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/2.0.0.GA/JBossCache-UserGuide/en/html_single/index.html#configuration
The bizare schemes I had in my head can now go and make way for the more elegant solution you have suggested... Thanks again! -
3. Re: Migrating to 2.0.0 using PropertyConfigurator
brian.stansberry Oct 31, 2007 12:53 PM (in response to shelly2k)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.