Hi all,
I am trying to use OSCache within my Hibernate application. I want the cache to be clustered.
So, I have 2 desktop applications running on different machines connected by LAN.
In the first applications, i am loading an object from the database:
GroupData group = (GroupData) session.get(GroupData.class, 1);
Then, I run the second application on the second machine, which does the same thing. I expect it to take the object from the cache (because the first app has already loaded this object into the cache). However, it goes to the DB once more and executes the select again.
The two machines know about one another, they are in the same cluster. I am saying this, because when the second app is running, the first one prints
"Feb 27, 2009 4:37:29 AM com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener memberJoined
INFO: A new member at address '10.37.7.18:4069' has joined the cluster"
Can you please help me to connect those caches in a way that once one of the applications has loaded an object, the other one will get it from the cache.
Thanks a lot!
Lili
Hibernate version: 3.2.2
Name and version of the database you are using: MySQL
|