This is a really complex topic and you should try to understand the differences between the different concurrency strategies before you use a cache. If the current reference documentation is not enough, try "Hibernate in Action".
Yes, JBossCache/Treecache only supports transactional (and read only, of course). You would only use it in a cluster and EHCache only as a local single VM cache. You should not change the TreeCache isolation level, leave it at the default "repeatable read", which is what "transactional" in Hibernate guarantees.
There is a huge performance hit if you use "transactional", of course. It might even be not worth it to run the second-level cache! But this is not surprising nor special: You should only enable the second-level cache for read-mostly classes in any case. See the book for a more detailed discussion.
JBossCache supports the Hibernate query cache, as does EHCache.
I don't understand your question or problem about "class level config".
_________________ JAVA PERSISTENCE WITH HIBERNATE http://jpwh.org Get the book, training, and consulting for your Hibernate team.
|