[jboss-user] [JBossCache] - TreeCache CacheLoader Issue
robnor
do-not-reply at jboss.com
Tue May 8 03:06:40 EDT 2007
Hi,
I have not used JBossCache before the project I am in, so I am green.
Background:
We have a application that we have split up into three parts; core, import and distribution. Each part is an ear, with ejb3's and a Jbosscache.
There is no problem at all in getting all caches to start and to function storing in memory data.
However. We need the cache to be persistent, thus I we have cacheloader, JDBC Cacheloader (to be more preicse).
I am using the TreeCache to store an object (ImportTracker), which holds data about the different imports. If the server somehow goes down, or if we drop an updated ear in the deploy directory, we want the application to be able to resume import, distribution etc where it was. Thus I need the in-memory cache to always write everything to the persistent store directly.
My issue is that regardless if I use filecacheloader or jdbccacheloader no data at all gets stored. If I activate debug level on jboss.cache, I can see that the transaction interceptor gets called but never the storage interceptor.
It is a bit unclear as to how the treecache is suppoed to work. If I create a node say: import/host1/
The map object has two entries, tracker and distribution
Tracker is an object with other object inside each describing a import, and distribution is also a object hoding info about different distributions.
Question: After creation of node and put of object (something like) cache.put("/import/host1", "tracker", myobject);
Later in the app when I retrieve the object, and make changes to it. Does the changes automatically update cache? or do I need to make a put everytime (to trigger update).
Anyways, my issue is that I cannot get the cacheloader to store the data. The only time I can get it to work as I want is when I retrieve the cache, and from the cahce retrieve the cacheloader and then make a put directly on that. This cannot be the way to go?
Please advice :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043832#4043832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043832
More information about the jboss-user
mailing list