The fact that Ehcache offers Write-Behind Caching does NOT mean that any piece of software using Ehcache, like Hibernate, can leverage it without modification. From Terracotta's Hibernate Integration (note that this is a non independent post i.e. pro caching):
Write-Behind Caching
When you think of cache you will arrive at
these cache strategies : Read-Through
Caching, Write-Through Caching,
Write-Behind Caching. Hibernate Second
Level cache is Read-Write-Through
Cache where if cache miss occurs,
entity is read from database and then
handed over to cache for susequent
access. But H2LC is not Write-Behind
caching. With Terracotta's disk
persistence and asynchronsous module
it would be really efficient for
certain use-cases to implement
write-behind. Currently Hibernate just
directly writes to database. Instead
if its modified to write to second
level cache and persistent
async-database-queue, this would
decrease latency and increase
throughput dramatically.
In other words, write-behind caching is just not how Hibernate currently works (and I may be wrong but I don't think this is going to change in a a near future). But feel free to raise a Jira issue :)