Hi,
We are trying to plug in CacheProvider into hibernate-2.1.
We have implemented the CacheProvider and Cache Interfaces.
When running a test program - at the Cache.put method we are getting always the same key value for different objects.
What we are missing?
The test program:
--------------------
public static void main(String[] args) throws Exception {
Configuration cfg = new Configuration()
.addClass(Record.class);
SessionFactory sf = cfg.buildSessionFactory();
new SchemaExport(cfg).create(true, true);
Session s = sf.openSession();
for ( int i=0; i<10; i++ ) {
Record rec = new Record();
rec.setDescription("a long description yadayadayada foo bar fee fi fo fum" + i);
rec.setName("Record " + i);
rec.setTimestamp( new Date() );
rec.setQuantity(i*50);
rec.setPrice( new BigDecimal(i*2.45) );
rec.setSerialNumber( Integer.toString(i*100) );
s.save(rec);
}
s.flush();
s.connection().commit();
s.close();
sf.close();
}
-------------------
Best Regards,
Shay
----------------------------------------------------
Shay Hassidim
Product Manager, GigaSpaces Technologies
Email:
shay@gigaspaces.com
Website:
www.gigaspaces.com