Hibernate's cluster aware caches in conjunction with WebSphere Application Server
The title comes from the following link: Using Spring and Hibernate with WebSphere Application Server
Wonder if that is still a true statement?
I am interested in moving the application from using IBM DistributedMap and DistributedObjectCache to something along the lines of ehCache or osCache. From my reading so far of the two cache models from IBM I do not see where I can cache a query. I might be missing something and if so please direct me to the right spot. We are using WAS 7.x.
Any concerns using either ehCache or osC开发者_运维技巧ache in a clustered environment?
Wonder if that is still a true statement?
I assume you meant the statement in the box near to the "Integrating a second-level cache" section. In this case, I would first confirm with IBM. Any information about official support from IBM should come directly from them, not from someone in StackOverflow ;-)
From my reading so far of the two cache models from IBM I do not see where I can cache a query.
From the cache provider's point of view, how Hibernate will use it isn't relevant, as the configuration is the same for either 2L entity caching and query caching*. So, just configure the cache provider and Hibernate will take care of using it for the backend for 2L caching and query caching. Just note that you still need to tell Hibernate which entities to cache and which queries to cache. One last advice: understand caching before using. Most people think that they understand, but they get surprised to see that a query caching slows things down instead of improving the performance...
[*] that statement is not 100% true, as you may still need to create/configure the different cache regions, but it's not really specific to query caching or 2L entity caching... it's just a cache configuration.
精彩评论