It would appear from searching around here and the web at large that it is not possible to implement EHCache as a write-behind cache for Hibernate, as that would require substantial changes to the Hibernate code.
Are there any other solutions (preferably open source) for a JPA provider that can 'transparently' hook into a write-behind cache implementation, and preferably one that can be distributed with something like Terracotta?
I've read that EclipseLink and Oracle Coherence can achieve this, but Coherence is sadly not a cheap solution!