|
I don't have a problem per se, more of a question.
I am using Hibernate 3 with Tangosol Coherence, with Gavin's CacheProvider and Cache. It all works nicely in that I don't get any errors, but I would like to see what is happening within Coherence, so I know it is all working.
Using the Coherence command line console (java -jar coherence.jar) I can see that Hibernate creates two caches, named
org.hibernate.cache.UpdateTimestampsCache
org.hibernate.cache.StandardQueryCache
But there isn't much meaningful in there. The timestamp cache contains one entry, mapping my persistent class name to a long timestamp (fair enough). The query cache is empty.
I kind of expected to see a cache containing all my objects...ok I don't know what the strategy is, but I had assumed that if I saved a load of objects to the database and then read them back, the cache would have some record of them.
FYI my simple test code is as follows:
for(int i=0;i<1000;i++)
{
Organisation org = new Organisation("Org" + i, "Organisation A", "Org A Street", "", "ATown", "W1A 1AA", "Aland", "A Industry");
session.save(org);
}
Criteria c1 = session.createCriteria(Organisation.class);
Iterator iter = c1.list().iterator();
while(iter.hasNext())
{
System.out.println(iter.next());
}
Doesn't matter if I let the code run through, or stop it at any point, the Coherence cache show no sign of containing the objects.
Help appreciated! First time poster so go easy on me :o)
|