This content has been marked as final.
Show 2 replies
-
1. Re: How to, Flush data stored in TreeCache to disk?
manik Nov 20, 2006 10:15 AM (in response to sjeevan)The code you have above, the getSingleCacheLoaderConfig() method generates a block of XML corresponding to a cache loader config (see the chapter on cache loaders in the docs).
Make sure you generate XML that sets __async__ to false. If async is true, flushes will not happen in realtime and will be deferred to a queue and processed by a separate thread. Perhaps you could check the XML that getSingleCacheLoaderConfig() generates? -
2. Re: How to, Flush data stored in TreeCache to disk?
sjeevan Nov 21, 2006 5:12 AM (in response to sjeevan)Manik,
Thank you.
My problem has been resolved but in a different way.
I checked the code you pointed out and the xml used to configure the CacheLoader is as#DEBUG 15:35:02 [recovery.LedgerImpl] (main) Cache loader configuration XML= <config> <passivation>false</passivation> <preload></preload> <cacheloader> <class>org.jboss.cache.loader.bdbje.BdbjeCacheLoader</class> <properties>location=C:\DOCUME~1\124872\LOCALS~1\Temp\dev\Ledgers\INTTEST2</properties> <async>false</async> <shared>false</shared> <fetchPersistentState>true</fetchPersistentState> <purgeOnStartup>false</purgeOnStartup> </cacheloader> </config>
As pointed out the value of __async__ is false, but that did not help in acheiving flush to disk.
Anyways I discovered that by setting the TransactionManager of the TreeCache I could achieve flushing to disk.this.cache = new TreeCache(); cache.setClusterName(eventSourceName); cache.setCacheMode("local"); //set the Transaction Manager to enable flushing of cache to disk cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName()); cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", BdbjeCacheLoader.class.getName(), "location=" + f.getAbsolutePath(), false, true, false));
thank u
~g1