These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How does Hibernate use Tangosol Coherence?
PostPosted: Wed Apr 13, 2005 12:12 pm 
Newbie

Joined: Wed Apr 13, 2005 11:53 am
Posts: 1
Location: London, UK
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)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.