Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate/impl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7349/src/org/hibernate/impl
Modified Files:
SessionFactoryImpl.java
Log Message:
HHH-1457 : JBossCache 1.3.0 optimistic locking support
Index: SessionFactoryImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/impl/SessionFactoryImpl.java,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- SessionFactoryImpl.java 8 Feb 2006 18:48:21 -0000 1.106
+++ SessionFactoryImpl.java 9 Feb 2006 20:48:42 -0000 1.107
@@ -43,6 +43,7 @@
import org.hibernate.cache.CacheKey;
import org.hibernate.cache.QueryCache;
import org.hibernate.cache.UpdateTimestampsCache;
+import org.hibernate.cache.OptimisticCache;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Settings;
import org.hibernate.cfg.Environment;
@@ -215,6 +216,9 @@
}
}
EntityPersister cp = PersisterFactory.createClassPersister(model, cache, this, mapping);
+ if ( cache != null && cache.getCache() instanceof OptimisticCache ) {
+ ( ( OptimisticCache ) cache.getCache() ).setSource( cp );
+ }
entityPersisters.put( model.getEntityName(), cp );
classMeta.put( model.getEntityName(), cp.getClassMetadata() );
}
|