Q1: Am I right that only this vendors support Hibernate L2 cache on cluster?
Q2: Are there are any alternatives to Hibernate L2 cache? (Maybe some DB caching?)
Q1. EhCache works very well as the Hibernate L2 Cache, distributed. We are using this for our project.
Q2. Several caches are possible.
However, the problem with the database cache is that it is physically on the database server, so each query involves a network call (latency, bandwith ..). That's the whole point of the caches on the application server.
In a distributed context, this often translates into invalidating a category at a time when one of their entities is modified, which is functionally logical for us (and essential for performance, as otherwise we would have to invalidate all of these entities ; this is because the cache invalidates a whole region, or a specific object, but in between you have to loop which is bad for performance)
And others I'm sure ...
So this case is not closely database-related, it usually doesn't store our Hibernate entities. We put it in the Business Tier (and not the Data Access or Daos), make it available directly to business codes. Note that for us, it is not a transparent cache, but a call to an explicit business service (responsible for this cache : loading it if the data is not present, invalidating as needed) that does operations or deliver values.
A fun Threading issue in this cache : because this cache is accessed by our hundred web threads, it needs to be thread-safe. You probably know why a thread-safe value is either immutable or cloned at each call (which often is a performance problem). So all our business caches use immutable objects, and performance is great.