1. The javadoc of StatelessSession states that "a stateless session does not [...] interact with any second-level cache", meaning that maybe our "cacheable" parameter makes no sense? Also, the "cacheable" parameter in the Criteria API seems to ultimately instruct hibernate to use {{org.hibernate.loader.Loader.listUsingQueryCache(SharedSessionContractImplementor, QueryParameters, Set<Serializable>, Type[])}}, which seems to simple cache query results, which has nothing to do with entity caching, so I'm not sure how this would help. 2. The javadoc of StatelessSession states that "Collections are ignored by a stateless session": what if we want to index a collection? Does it even work? 3. Did we make sure to use read-only transactions? 4. We do have a fetch size parameter, but do we check that it's lower than the partition size? It may be a good idea... |
|