In order to get decent performance out of our application with EJB3.0, I desperately need to be able to use Hibernate's query cache and the second-level cache.
I've created my hibernate.properties file as:
# Clustered cache with TreeCache
However, I don't see any way to configure queries to actually use the query cache without both using named queries (which aren't supported until Preview 5) and setting the Hibernate mapping to indicate that the query is cacheable (which isn't available in the EJB3.0 annotations).
Is there anyway to set a default Hibernate property to cache all queries somehow? Or some other way to hack around this?
I later posts you seem to imply you have managed to get the query cache to work. If this is the case can you please explain the steps?