I am using hibernate 3.1. I have multiple transactions in each session. It seems that the items I put into the cache are only gettable for those sessions created later. It looks pretty weird to me that the DefaultLoadEventListener.loadFromSecondLevelCache(LoadEvent, EntityPersister, LoadType) uses the session timestamp as a transaction timestamp and passes it to ReadWriteCache.get(Object key, long txTimestamp). This prevents my loading code in a later transaction started from the same session hitting the cache. Does anyone know if this is designed that way?
|